From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0070.outbound.protection.outlook.com [157.56.111.70]) by dpdk.org (Postfix) with ESMTP id 2D50BCBD6 for ; Fri, 17 Jun 2016 15:31:27 +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=g03V0bUYvOfxAD6Q7Dm/XVb2m+nVNNzyjb6+h/K+R78=; b=PO8+en+JUwlH8Vvw8jo3fiywq1SBdauZVcIhDwxguyFshNfzlP7R4ZLrH1kYj2QXFf0x4f2HwVmAxPzQgC44kPnBuT69CDrNoGumdoyTkGylSjoG8d5EbE1sy39jwJfdpir5SnxonjYG/3//SG5vIGOQpY5nhPapPlfDZ6t7eY8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (171.48.17.70) by BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) with Microsoft SMTP Server (TLS) id 15.1.517.8; Fri, 17 Jun 2016 13:31:22 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Date: Fri, 17 Jun 2016 18:59:37 +0530 Message-ID: <1466170194-28393-11-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1465931200-23912-1-git-send-email-jerin.jacob@caviumnetworks.com> <1466170194-28393-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.48.17.70] X-ClientProxiedBy: BM1PR01CA0028.INDPRD01.PROD.OUTLOOK.COM (10.163.198.163) To BN3PR0701MB1718.namprd07.prod.outlook.com (10.163.39.17) X-MS-Office365-Filtering-Correlation-Id: efb681d9-2962-403e-3658-08d396b3ae8d X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 2:griaxaohAGODa0v/p4pc3DunUUhl2bJIn2CsaeQhoMGxFkjoMli0wcUZWcy5IMSksPEl9MBSO4MSeBAchMry178UA8EDdhz/0veKkFtZP8oOq6PZQibGjomSj7yFtA1V4hG+Wdn3l6DVHK/1yANeNtRjWubD/zKI9onOdpzplaGunPWFboeYIlbSOn/3Ps5v; 3:vOshNIe9mKcxh4iErTLpr7f03AM0JaW8Tw/vvpp0ZiVYq9LSkQVT6bXemkFxHJuXmW/ZWeYxfBzTidnUKghu3dF18Idve8oHz/u5FR43r2x7gUd+vhT7XEl4ZBPn8fJT X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 25:36GCBYp3dWi8dNhgAGmZ4Lb7eA7y4VK7+BqhZoy+x3p+6UdI88O8RW7to6V98MmawNd+3+7MSqIuTKd/7WR97IE+8Z30FBeV7s5FmibBTjAoM/IzZk3OlZ8Sbi53LoIvfwJbw61aSI+A30vzBDIwZf1TJFYwBSBj6nZwtFErnwhBaEUKobMUJljGFyRQAt/fwJaKszo8McWRTmU1eQbIzfC1LUMrueEjgP8NjUtJV1DxTutTVDxijlGwe9UFy6tBLGmXHOhGaVVdl4UzWk+cAtMvRZICiRC1Lh4TDI8vFaT2LQU3pskT2Y7msXa0G0gsHnFMex2cNeabOdsKH/ddRAOgFjcJthJW8cK1yu7ovTHDtdSYUz7ec9HlsLy0k0B601+lqSVlYh0in4GvU3pRyBf/xIgKcGqGM5YfAbWTIqX2pJli0R37/dEiNaCKh7Z/zDx+XgF0FCc5TPDpDDTlWsdf7ylKo5MSOwTnH77CvFxoMa8g+bi5FDPu47xSekxtTCCfXljxIqlsk3o69r79YT/cfyxq69SUHytgzavzBnhKLfRK67cqAenmv1SVZ1mVXZN8dDyyIikdsDDD+l51t7/PLdPtHL36urpPdj2cf8S1tnZploucJnw4F7e5mfe4V04uccDFPb2kpc4mf/t2o1ebkPXx03Vl3nL0iT00qGRLCjqXvbf5Mu7CLWvTs2uCWJgYkBP7Nt4eRSrb1xpHinIkDeM00+hP7j5OSkAayIeeKL1FAlVL5mKlxMZlYK1Ybo5OSWmNsk8/Qxl0eX7AhA== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 20:k2At6aXrSWYgC5oTCCzCrLOH/EsgdX311oxR/ec5E9ZkFOrcbeojVFGFT8GqR8W54Ml8xzLcgJ28PuKzFekET8NePgZlZUe47hgildw9Tz5jIazWU2YbYdy5oQcOFJdddgg+SIwtU6BWEyOQgg310qvmxm4tDcD4Y38SorwHjj1oAlg+s+fwOSLkiZGvumSNbLfjycTJ+yezgb/DHoxa8LqzClJgVuS6BvMaHcXi1/8cais3bsg/UBvUvOUu8T8e4txuiTsBmULIeQrUHEODuDwYTWONlptZS77gY41N0xOP10M8J7mk373A+2PUtbxKSjWq1kIjca8H7QYVogKWr6K0NYm6jVOL8c8E41Sy6IduGRsC+b16NJR5u7sins328MeKEbVgOt/WfLKTDbhoEvFarjGz7ASrpUKpkyZWdf5DuEIwRj8gPm+yoNy0pa5T4GGiRIstt4WVf7T9PQXmqy0xJPEvoNcZxC4AH27o8gKTlVg/MrjAD872kqCEOA/1zztG8LShw6+eaRm1u4IgXs3tWk8Xuih/UumBqdAayNJYFWPZiMTUbpyu+NpigISgbhIFq2NI91n5HOFWTrnvfNv6K/2Z3mrDKp6JUQh1wZo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1718; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1718; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 4:js02w2ButEkqq70wMVmKEm4Ydm6juKcIk8zkZE5MxaBaCPs9SArtXW6D3ZsS+4uPEjF4jlX5uHD/nuS1TrDjwF1pr81Ma5D12BBJmrl/xExWdkrFzivZYULg35lx7EsJsaie57trEPs27HvX0SYTEcqzgyxylU9TvP9acHqTHYZhCh6uLzjko1fS2mvqyeTOPhlCqJKm4GVsEdlDabbRS4vX0KYml4CnnFwMTRRacdlzhtsKntLJ5z6ey209yUEg3rINVTWO3ZREK5vIHDWWj8FoO7r0U21/Coq+8SayO5FgGz65TjBZeTQitVnUXsPqvVt6+cUgi2AzCyJgI3LauMPreX/RUBSFynAU3DT3IsF/Cpvgr+N5RiHq72M9DQgK X-Forefront-PRVS: 09760A0505 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(199003)(189002)(48376002)(19580395003)(68736007)(2351001)(47776003)(229853001)(97736004)(19580405001)(586003)(50986999)(110136002)(36756003)(3846002)(66066001)(92566002)(105586002)(189998001)(76176999)(33646002)(42186005)(81156014)(5004730100002)(101416001)(50466002)(2950100001)(5003940100001)(4326007)(5008740100001)(50226002)(2906002)(6116002)(77096005)(81166006)(8676002)(106356001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1718; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1718; 23:v2b4NT0WoYZiS5Jd9xpdOzfBPLyr8RvN+3ETtxB?= =?us-ascii?Q?DBwfKIRv3Nz23Gd7eAdRxcMy3fkuSt0MGFc9mV7yEI0CR360ULpWUV4UeKNe?= =?us-ascii?Q?tRIoGVISqc5yUKUVCaP84+ZIoEX9WTde6MBBVOukNN4Gf3ym4LMAms5FP/N+?= =?us-ascii?Q?bybx+vCbF5VarTD3V5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ascii?Q?in6ptS+rGRDEN8/mw0Y9+Gy0mgRc0?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1718; 6:N9wSxx/qo0+ruBFXLHeO1YtZ8TjXk4PkolNES7ZTszxno47gbQZMAUygWPH7dBmNNDr9pV+l29utjwLw+J4zwvl5bXG+3YIF6bGP7HkA2X7k+ZDe1dv8BhxOLBwALa9uttbsxzaTCyMfmbMBVMuBibj9M1C25C7hagkprguK+1KdWIs/zj+CvnRQJjDo2MBc1Z7KpE3dx1yc+BaafQDqdvVzgboGz4dgOKTBGPopH6vZlL89Ybv6+vZk0jpbwnFDnHzCjSrmfZ/43XKKc0z6Drtp44Y3z54cLrqoaxLtPD8=; 5:0lhEv7heBQwWEyg3W0QcUatCe24pc/eonodLacUBDTmgqSQslojXfbNhuDEoPYmEn8Zk3qXRrJEOy/S8fNIy0aJQlemxG53n2XKVkswnNV0pK3YriL8R0p2Vz0UoGKX9S8xycfO9m5LqYIra5haaJg==; 24:kSgLfrGtvSFkLemo5yQG7soCeF8LO8UlKq6vL2os/MHhWcFaOd7UGd9DhWvtQ3zVquD7gPTLhhHvu7+fLBVFPorDvPpdGRT3xt6FPqGrzvg=; 7:lfzZQV7fq85/oUV5oYbWAveWQympEWh5x7oKXRUOQ1qSzd7dhKrRg2aD02lt6L5CPwl31zmsYUKy6sy1hX1YvCacryuPTMIzbgVqF+HrtXUC453cocVlOM4rO8tGU6bSBGKC8b3JUH4Tccfzlyx4WxUIKYdoS0NUpoAiXDgjyz1+R1vVgSvyrutaLHhiWrz0u/gtcUrkt/wiwF6ftoD/sw== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2016 13:31:22.0391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1718 Subject: [dpdk-dev] [PATCH v6 10/27] net/thunderx: add registers dump support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jun 2016 13:31:27 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Maciej Czekaj Signed-off-by: Kamil Rytarowski Signed-off-by: Zyta Szpak Signed-off-by: Slawomir Rosek Signed-off-by: Radoslaw Biernacki --- drivers/net/thunderx/nicvf_ethdev.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index ec5407b..6811718 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -143,9 +143,36 @@ nicvf_dev_link_update(struct rte_eth_dev *dev, return nicvf_atomic_write_link_status(dev, &link); } +static int +nicvf_dev_get_reg_length(struct rte_eth_dev *dev __rte_unused) +{ + return nicvf_reg_get_count(); +} + +static int +nicvf_dev_get_regs(struct rte_eth_dev *dev, struct rte_dev_reg_info *regs) +{ + uint64_t *data = regs->data; + struct nicvf *nic = nicvf_pmd_priv(dev); + + if (data == NULL) + return -EINVAL; + + /* Support only full register dump */ + if ((regs->length == 0) || + (regs->length == (uint32_t)nicvf_reg_get_count())) { + regs->version = nic->vendor_id << 16 | nic->device_id; + nicvf_reg_dump(nic, data); + return 0; + } + return -ENOTSUP; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops nicvf_eth_dev_ops = { .link_update = nicvf_dev_link_update, + .get_reg_length = nicvf_dev_get_reg_length, + .get_reg = nicvf_dev_get_regs, }; static int -- 2.5.5