From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0076.outbound.protection.outlook.com [104.47.32.76]) by dpdk.org (Postfix) with ESMTP id CD1C9FA8F for ; Fri, 3 Mar 2017 18:30:01 +0100 (CET) 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=oDXw3TzzctFnF2OU1dl71OGqdS3B0XQrHbRu02ozwhw=; b=BRHRnv/9gdkCrzHDflkDEW/0EvKByc90o2KhPdY7PAIHFHrk/WPoHZiYvt4PowPk+eN8jh34axE4uXjpppQWQqQGQb2JD7aGuGEJWW+rT2yQJ+BzjluJeCW+ve7qvvFFA6pCKLQeWr2EDx7qcLRcJxu9fZlF8uFzw1wtw2ajRSM= 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.localdomain (14.140.2.178) by BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.933.12; Fri, 3 Mar 2017 17:29:57 +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: Fri, 3 Mar 2017 22:57:58 +0530 Message-Id: <1488562101-6658-17-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-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: BMXPR01CA0021.INDPRD01.PROD.OUTLOOK.COM (10.174.214.159) To BN3PR0701MB1719.namprd07.prod.outlook.com (10.163.39.18) X-MS-Office365-Filtering-Correlation-Id: b7fadb27-4999-4046-e051-08d4625aebab X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 3:7Tih4R2iTygDletGpNTqThyAvp6/856XXYe2Y+Rgyols4BLKxUSykL3qtmmD+p3K6lvvd8/VUo9WPSd8EyuKTnFMPOZG9H8tcgxdo8Y89HCvyKuHyZFpSpM3gDp5hH370fVhdErtyc/6crlJjTPPrDr4dfIE3qkqISgkLMXnht9uG3gHvj1byDUN6qtzBZTQ4lwpqeLTLrHpOHTURQzvpw9r4SQITz2qKYT3bOVUay/dgou4KbV6Nv3axcteVZMhGTTlrwY5RNLWzAix6K0VnA==; 25:8d0o/F45I58Ylot7jFGajI1DvunUeaza6jMIrFPzwJez4YwvyqngwrCARtb09HxoXSeNtF4C5ivhGWym1Y9+6Ovom23l8QjDBI2c991zh4Z/NWexAwpet10X4ijpYwX5vl9lHMMI+G0f/nDwcw9WKf78Zp+pdLUo3nKmz6TudNFJEcacbEt8OmMPwqszmQULXwRING9agmftV3rojBJUvf75D8obHqXicsUqw/pwQx8ruzrxScEne2yv1U6sUAiOQJV9nzOqNb+38hlIoXu+pkdIkU1NPduawI14DBTEMNu1fB7EWubm6Cb45E49haNhPmvwBHRLWTxdAxiHOvUCLsS+uDexnGAEEfmFgHfLM/pnsVspgSgN7PgZn1DYDN9yYaj3ihJ5TBd+U7Bh+hGahYWDJOEgVS/2UFI2slhFBLfZ9n+ybaUWfnppw5eXx/zbflCn+IiNwL9rlrxDlXNJ4g== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 31:lxw26RRPZmzYMcWTO/PFNNsb+rXNi9UtUNTzq+1LFFbNXgoGYgKLziAgj0/80mVTalCtpDLscTIRpHu43sahjkckpSmJZTtqLaGDmFpYrGKxJNsU3C+cIUSICeJfedLq3XmWhIwhsYSK2R9HSYMTWGnjhkhd3uFOOc7CUSjdJZKTnTZ22DykyDCUkNYuKRdXMpH2sXW9jvrP4LDO5BCLn1usPfl5QmTQIyXKLTDs/PEmIeur6JcvX/SIE7tqc0j6; 20:1nizpPm/1qha1NawV0Zscxcm+INd3gMHahWIwiRh5A7/xYZF9W4zqHaCaBkQOwbDV+13/UT7KllX/tmeCeqFg0aRpDHCcJgWkjJXevFaoZ+BUtC+ed+EcZMJMCqAwLlSZMZMPJfp+ufEa2AdkAJry2BPFOz4opcDjoQWNbID3O3UUh2mlyeeHVHXupRgs2SAmsjQW6A/tGQh/eumA5thqsg2ymBy3SJMhSXlhfOcM9sYxg7vqgi4VTM7/YoSIlCoLWnlmXRScr7zueeQMGVNT0B4qFUx3sDZfqDTr/xI9ABbGksaPu9I7zm9NIB72rKuxCiDYhr9VnHcaVPcQJg/M6rQAVEYqFp94GndmWKTFmcZNQILKYzgpKMeQmfSAY7TZsu2yaeWJ1g55IqAy/GK1Yp7vBpXy7JkdpJTZyXGaCvggIB+qflCXE7YHHBnjHK7jtP3C/hm77phESSYb62lcj0QfjcbMRoahWhbssSYkCzkQpoeWOPGuDUHAod/R2gvRGDzvkdOpu81L4p6eCpelHuXhYxERnbkNnFexLSCjtneU/+D2lXegp/YlnINLYnD5ngid9sJaTXktHqgAqDCPMppg58/70pyDoYL9zn7erA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6041248)(20161123555025)(20161123560025)(20161123562025)(20161123558025)(20161123564025)(6072148); SRVR:BN3PR0701MB1719; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1719; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 4:jnbE2ZthT1mceHhimEa49ckQOUFqwWsFdEvYPNMpvtX/ZWsF+wsZ846wWQfV8zHoezX398kyQlz2lyCJ4m6TDytb7eQxiYOd3oWaZeE3BGHVDd3KuELXLu40ehZ+sntDC9n1N/6a6Ejdxtmxc354yJf2EviBN0oAZkuXhjAZCVlAgHIHHXmzdFAL8Jpl0WLdDFjI5Km/q9GaKkNVmvNg6ywSIZRxeei15lzuxoA/tud1JcQPYHLQl9wPRy6qlyJo7/hhzsDisgWc015eNn1EWPSQpxbnAsNhlYrvXlF5FJaEUlVJ2zV792XG4RWwqDCWyK4aQmrWAFTDK9t+OHWjuwL5h3jA5jDM5hThDrw4xIfqbg5tAzIY+5eP0UmZQSMnFROUMpf9pQ4HRw7cLgoZF2a48PGwkpvPu9jVXnfckOkhe4fWA6TTMdEG9TLWiYf9RY7HVNikCAI3FQt86pAjYAQxwDELLvRucsBssM7yenX/qpOjhasPuHMTkBO4PBkylHnalnOA0SZHCXE/FndACsYBxwj7yuEWUlK3cFTT2qLHORWohb1TRPr99sAJxNFrJG/ZzvuFhIRcyzwZMN/Xx5kQVdP/+r3R7bvysSTEznQ= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(39450400003)(3846002)(50986999)(6116002)(36756003)(81166006)(6512007)(97736004)(2361001)(2351001)(6506006)(5660300001)(42186005)(50226002)(8676002)(106356001)(8656002)(2950100002)(2906002)(25786008)(47776003)(6486002)(76176999)(33646002)(7736002)(107886003)(42882006)(66066001)(110136004)(4326008)(38730400002)(6916009)(305945005)(48376002)(92566002)(5009440100003)(5003940100001)(50466002)(189998001)(53936002)(7099028)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1719; H:localhost.localdomain.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1719; 23:gzRrud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adata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1719; 7:uO76HLRYofvVkTVAVO5lBok10TwF0Elyb/+D0N4JDc54SuGj5iGLTJuykFyGN/JJV1A69opq8rRssQb2taR+CBEaXax/tx/iaANE5izKMVCELgFGPQwIU/oQ6lAiYx6+91379b8YzMEBEBkltOSLhhxHWXKe9i+K/SQEbVu7luSIs14vMTpjZ5GbMDT4HPrGWB+hm2OzoHxSxOzWVzp3Vj3Y2jSQ3kZplbQOC5+QkPCaQLYzBEIcPYc4C5HTcglYKB+UyP4Xe94vhNMLc0Qd2RlSKESgK1/lRR7doON9Slt4D8NtWyolaXHpHOYFK5rr5CcRrkX2R3D3s/i0pOV/uQ== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 17:29:57.3288 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1719 Subject: [dpdk-dev] [PATCH 16/39] 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, 03 Mar 2017 17:30:02 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla --- 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 d1be360..babd59f 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -332,6 +332,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, @@ -345,6 +390,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