From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0053.outbound.protection.outlook.com [104.47.38.53]) by dpdk.org (Postfix) with ESMTP id 36347FE5 for ; Fri, 31 Mar 2017 21:36:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+uD6Wmt4KlI2W3yPWWst21Z+N0+nM9H91zkaDEk/J4Y=; b=JBc44ULcI4PLpfV3KS5wCUW3f+GuNeK8E/2AEjLT9yKDyM/pjqodKwzWomLy6ks45SNfx/vwZBeiKzIagAS+0UYfcwQ6bP7xua5g/TujFbFEurxtZGDQJvXDal1eO2227D7vTJme5dDuHVtUkd6mT6PQbDK3SUFh+i8z75c/gmA= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:36:25 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sat, 1 Apr 2017 01:04:40 +0530 Message-Id: <1490988905-12584-14-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: 44588988-c362-4c51-8167-08d4786d3a96 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:t0efHE8371gm7T7V7uQ6Mx8cMMupgmp/pPAuECfNwP2dX0OuNziFtu7Y6juT6BDq1dcE8bsyVxhO3q+hBuG9+vL99Y3bgwSjswkiqDq/537fV9tRZjE0ch/kmmPRviiWXRz0o4wHAd9162BLaG6BYYFTiZSo/lXCPlpPvXEZCuS93gNBejTnRm70BB5xzVu9FDC2zex3p6Yl6+KdVw0OLP30I2AzM/NDApkjPggE7FFZunmeYwkr96THPeGY6m3QqOXJFER3DZa7Z0o96R9+/Nfz/7/qO6mxK/7K4QYhZ7pl4s0pR3f8FFb8FHL5Ejjb0nI8paSr11LG+zi918LKNQ==; 25:E1Z0NMsCoMeg2TjkBsk3yG/YsLeScHMJB9Yiaa6k+eWEHE874U7rXCykYGr7G89rC3HUqTq3qF7R14MSbKMmhsT/iU2mf1cIeNAmTqQL2iugfVdtadobOXMTqSfcjt364QtcxX9f7Xwgy8v/JdgOiKDBzVrcHUUVlcdClBlhHKKzF6aFaBODeqKR1AVGRePDa9yW0VwvmvfcmMWdUdz1MdlrvbU5aqj73gj+bygYoU9FNH7cHIHn0r9L/q3M2dF0BdOLIvn6Cf8CWkMCMLFagzlTy69qy+U3feOV11vMd1+hv1QXHINo47zndRtkmr7ngdrgk5Qj5aaYkfVt4hTvLpH0fyKmWNw7sl000OQNBJq5LanL2pJ+xUKe3sAqPSDzYNYON4dijlMrsGs3HCRE3agAjpypWKygY07rIMu1qgZdC5dFJz29QEFdmWeaf0I2V9nOTeNkqWzvHhPAG1+GJA== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:mS74kjpCbBxOry0HYLU1Ty3C5IXV9u4nbVGUWx/Sglaqsmi2EYgAzArHgSkPbTR4M874mvouBmeuOkTWf+nA0V6c6kZPNrG59Z3ZOBIz6TZ//AcuhlPzmXbVcIc5GXXGhHvwXpOsWpbjjkglJk3pny9HHeYP/BeYmYokd+EzUe7X18R3JGdv1UqsLVvoEBgldntSfNPXtVfjG4OugES5CbBl8URXk7CMZisiKaW16NtZ9C7IP3G7GOxOXKWx/Z7O; 20:XjVz/0qjPoPi16TPPGRvdZC1N3CIpoDE+zWTtDWTIFyFMnsLqh7s53sC3t8z5klljGyYMR1cIKEa3hI2/P0TeSOxEB+FHummelj4KqMaQrVoZsnGNqMt+S5qNU0UFbi4gLRujsDCmjdGMaDlM9R3kFgqSgPlYK5v4LJ2AD+V09j+5tSnAaE+QG1mpy33+gmLzCYY4n2UsudCdU1LCOlzmxJiCGMshnrB5gfYaZgAsABX57taNDGHd8SLXn38DaaMmW6v1GsXVNjX01+E8IUwXQ9R5KLT+z4BSeEb+aJmfRS0VWRwviFft3TdNfq+0kXodPx8WOiqLfl8jUW2bUcRp2bJ3xK+Ejj4yEOsg/d52QZBxKu9DiLzLscEG13fHV9ff6g+IP+1H5dhc/p1AcfXT7PhnqFZXoHAfwk09PKc4W1Cj0XGHy0SNrxWvZnvrD6t3fOoRpeFRnOM2iWX/RLHeXGbWDT87Mqt1exGESZru1Hz8rAt4GejsFz70Wy5cQq1aDat5ZIwvDr468SGC+tCBg5nj6VwHavTMYGH37PKPUxNmNQ+zUfL59MIY6VrTLQ860h6NBZwnXqUzGdySwywJM2atWriRygfCmfPMhvxkII= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:J83O0ljyTNIoeYla+CGC1AnbpofF6hSmh4QjWDdTBxfcEub616KXwkxG1u4LgPCOJoDl4iJb9BU8aYlgtWcSX5h1B3d162oFa4Q7BsnAJqvvLoO18EJgA2cGxhvIUWTkgsy3WOn4IjbEKMrd2xJ0m48xQ9NO+Znk96MNHj3zqH6URzxTnZl0ipZJ9Fy9AWxlXC4k3gdurHKXooKgyUC/j0/xCd/KKQmuo8KvFgxj/RvClG06Afl3YFJLzvOGWP2vmdeh40tdxWXGguycTxqFX623Ix6JNW4/sIIfTA8xLDkvmbnvWH8WCGVPWOvJ2J12DMxLjVBa2ElGxc/m6fV53myLyfvzk1llQ+hcZDyhX3L9fdpS+YNRwXgBBylgDUTjh4loqjBOmYOmyMnkeVyJM0gvrM7XFI3Gq9dePg3cuCKmOfed/xxxRqyQDuY9RQ10Q+qo5fpGGGXjCo2W0lIrynKNyyBGbL11qJR2GYvrC/eyvi/3n+iJgPCaAKN9Owcctqw2ptftVFq8yjarv3YLgiidcQoTFVBZ3c8kbh4fyZ1Ou+hBOwUSLZQEJbjRLDS1FRcR/la5Bwu5ZRxztRIfl8wxMHY1wQU0VOmYjoxcXlONCYAfDuRlDup0t68mhO5lWfvnFPlsdHlsK1iHYlN3gpWE1vHIdk8Byx2RAAmUZuNcbrm5EgBwXAooOYUvcxVAl2MKNLDzU1ij8kC/Hybkhr2zCCl/ByS9O3l5VDx7YkdTmAgs25Mb99b19WZ353Zv X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(6666003)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:xNSBTFgmtcYERKoUDktYSWAFXCoW6dh3lhIivhg?= =?us-ascii?Q?5iNCbmCbhqtF6oRIFZ+dfx5gzDEQYiwpxPIpBm0WPlCSO7i0CAWMbV3vsFAo?= =?us-ascii?Q?UBlhmV6r7swf6OGtVoMAIWDTXLPyuQF3IezJF6A/h5sBvdMUK6PiC+UcCX7m?= =?us-ascii?Q?gJgmtYs6nOSG/N0Kc3IuggBm3fR2FhiBwId+mO7IUs9QaJ5Ov49mSkN81qlP?= =?us-ascii?Q?LP/KeCvAoZN6Z/wNXfaqSoNfdh9lxQsQSko7LP0ua5CTW7sakERsurVPXZS+?= =?us-ascii?Q?TNY8aAAl3AGUwTlRrqKt0CdO04tuCg8Zkvc6Wn1ikz7QzfYlnx+evKJ2jLAq?= =?us-ascii?Q?xFqwZHP4BLfmdgeHl4F9iru/EIIBu5NNHVpv0OBg5ZgcgQLh0VQY5tHFOWoo?= =?us-ascii?Q?3UxAgGr1rPgxXiY21IQY+2KUgLPo4YLT3Shuvmc67gJroMlcsds/WrclN+Cw?= =?us-ascii?Q?2L7PnhgdANaEU6OhtiQ6K142hT3TzNJG4/kmJ7X+fPeEZ5Twn29hLvFan8UL?= =?us-ascii?Q?gvZZGNLHK7LFVOwWvTZY/1TohyLukIl7oeZN/v19pG/8bCRX6s0JJ1r9uDc/?= =?us-ascii?Q?e+M0pFGiDrP2sTkWGjXW4VFG5czX0+PgydABIf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HwVyB48Y5qnyPTcfQdkOeHzfjPy2djYRTBgknIhFxlA9bRX/U/fN859jKo+EF9frX7eL/Y2HpJZ8wNkjFTb6V3ZgnKtu4RTQ==; 5:61AJxijiU9wkwor2FxRshvglPVLkxJuWPiTLcOEMA/ylrmtJjN20UsFNUAidSrOdgkrYPbV/OKKr2y17Jzx9m8S0jBbTIGpZdc5XfDIsnIbj+0SrjCMHrZ/zWlrhQgZ7l/IoKJ27xJi+WdzBUQRIJDP/5LoMxjqUM8nq4n5rLZw=; 24:bWqkiCBiL8YGXH31PGzuTiav9vRzsorf3jx2ZD3PABANwcCNOlIKgdDB/A7tkHXf4rs7SFhdwvQCryVZ/5nemStx8Ks67kVtd2QeRP2Eb34= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:P9kHuMn2QJNQS2mcgEqHeLUb/1KT7LY/7vYhQE01PRPOdQarrL1NUod5btWN53F4oGe/0f2/W6QRVdowVwTEbWj5TW8zk6KK5XoznCZ/7WGj9YbWJH1DZNuxCETT2Vm5KiOOiss0YWIIh18Syqje0ep/3IQqXTlw0yp3PL49zuhQX9GfhhZFwDN/WtGAFM/1ExDTGOpq7HrzLHI13WpHEp+AGl7lVSGchF86dGYYveZiEcYevizGrXG6S6PhQqIcA51FGO8LEqYEMbrJqa8wyMVOKWGnz2JX5xqCfcjGndf8t/PTKadueAK3VybaMLkrk/FX9kZljmZ480xyk4aY0w== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:36:25.8128 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 13/38] event/octeontx: add dump function for easier debugging X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Mar 2017 19:36:32 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla Acked-by: Gage Eads --- drivers/event/octeontx/ssovf_evdev.c | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 1f3996d..4fb515c 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -337,6 +337,51 @@ ssovf_timeout_ticks(struct rte_eventdev *dev, uint64_t ns, uint64_t *tmo_ticks) return ssovf_mbox_timeout_ticks(ns, tmo_ticks); } +static void +ssows_dump(struct ssows *ws, FILE *f) +{ + uint8_t *base = ws->base; + uint64_t val; + + fprintf(f, "\t---------------port%d---------------\n", ws->port); + val = ssovf_read64(base + SSOW_VHWS_TAG); + fprintf(f, "\ttag=0x%x tt=%d head=%d tail=%d grp=%d index=%d tail=%d\n", + (uint32_t)(val & 0xffffffff), (int)(val >> 32) & 0x3, + (int)(val >> 34) & 0x1, (int)(val >> 35) & 0x1, + (int)(val >> 36) & 0x3ff, (int)(val >> 48) & 0x3ff, + (int)(val >> 63) & 0x1); + + val = ssovf_read64(base + SSOW_VHWS_WQP); + fprintf(f, "\twqp=0x%"PRIx64"\n", val); + + val = ssovf_read64(base + SSOW_VHWS_LINKS); + fprintf(f, "\tindex=%d valid=%d revlink=%d tail=%d head=%d grp=%d\n", + (int)(val & 0x3ff), (int)(val >> 10) & 0x1, + (int)(val >> 11) & 0x3ff, (int)(val >> 26) & 0x1, + (int)(val >> 27) & 0x1, (int)(val >> 28) & 0x3ff); + + val = ssovf_read64(base + SSOW_VHWS_PENDTAG); + fprintf(f, "\tptag=0x%x ptt=%d pgwi=%d pdesc=%d pgw=%d pgww=%d ps=%d\n", + (uint32_t)(val & 0xffffffff), (int)(val >> 32) & 0x3, + (int)(val >> 56) & 0x1, (int)(val >> 58) & 0x1, + (int)(val >> 61) & 0x1, (int)(val >> 62) & 0x1, + (int)(val >> 63) & 0x1); + + val = ssovf_read64(base + SSOW_VHWS_PENDWQP); + fprintf(f, "\tpwqp=0x%"PRIx64"\n", val); +} + +static void +ssovf_dump(struct rte_eventdev *dev, FILE *f) +{ + struct ssovf_evdev *edev = ssovf_pmd_priv(dev); + uint8_t port; + + /* Dump SSOWVF debug registers */ + for (port = 0; port < edev->nb_event_ports; port++) + ssows_dump(dev->data->ports[port], f); +} + /* Initialize and register event driver with DPDK Application */ static const struct rte_eventdev_ops ssovf_ops = { .dev_infos_get = ssovf_info_get, @@ -350,6 +395,7 @@ static const struct rte_eventdev_ops ssovf_ops = { .port_link = ssovf_port_link, .port_unlink = ssovf_port_unlink, .timeout_ticks = ssovf_timeout_ticks, + .dump = ssovf_dump, }; static int -- 2.5.5