From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-eopbgr680086.outbound.protection.outlook.com [40.107.68.86]) by dpdk.org (Postfix) with ESMTP id DFE4C9ADB for ; Tue, 14 Jun 2016 21:07:48 +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=6hLlP7V3tEruijYf3PjoAfkPSIP/c1TOq6zFs4Smdaw=; b=fFqwNMcuQJUcTaILD0GR8zFOhMcqWwx6T1PFRE+4doxfHc0Jb5RjU/XdSdRGl4qSf4TGZA4pHf/bOs2MfP8OAZwb2O3sqc9kGoLwK+puZXJMhrtN/e3OluI5KgqIj4koinMbikW6MORjvhMqPKHxkMboNo67CV/Y6Mi6Sf/su7o= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.caveonetworks.com (111.93.218.67) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (TLS) id 15.1.511.8; Tue, 14 Jun 2016 19:07:44 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Date: Wed, 15 Jun 2016 00:36:25 +0530 Message-ID: <1465931200-23912-11-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465931200-23912-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1465826143-22159-1-git-send-email-jerin.jacob@caviumnetworks.com> <1465931200-23912-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MA1PR01CA0040.INDPRD01.PROD.OUTLOOK.COM (10.164.116.140) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: f42c9167-a4cf-4c50-31ac-08d394872c6b X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 2:HQ+5cOhgGH7/feHr6dXhUSq6oWCKX63QVz+REbyjrDw/+rCzkuhbNfCp1bkuEvsyCjxbMLIVc2s5I/ojySvXllrrsinZRWTRrlnHZDOAIixYsV4iUdWsDHzYE+eVdbHp1IJ6LK0H1N8tERhEcdvK4kvScc08Lhbk4dAY97lJn2D3jRFKkU0SFxC8FHs18nJg; 3:NtncXmj9W6zCvxmftKP8MS43/tk74p/tGARqYKJQCEKq/+LmjzIeJsqKu/KjWQbLxuVppg4l2kPg3R27nPhLQpOWOku1IrkxKQS6tZ5mm+VgCKKoRKSUQoRLISINykfG; 25:wUYSgTaC/kz24W8yK5mrbPV1BiQpqV2NmolM/rfDAOX2gVOf06GiftfCyrgWncuUySy/24qnSfmHNQuuTo0LjHNvj3ckHIQN2LHr9Cj3Ep4hczfUKpJZgi+r2GVxMsmbYBMyZ6QSwUtFHoYZkudjld2DrYk0JmT8haXw6UzPLZjf5p2GSrsWDdWJNiX/TZCIuj/qeOmztFU2zwwYciOIP/uZqmO7TRpxrf3kSXs8Duko4Z6QRYi83VCe/JFPdTVlGHj2gJ01w7GvxZ/9yTsEXHnFA0ZyWgevxgtWbqrN63sb/FWhvSGyviw2zeyEWMlZKJ0svZ85mfdjDKExLgZqxUYlYn4Pd7aLh8yBQWygkihYk493t+ylVLy6n3/goCwZya4jav3rqOVE2Fh2otnSjV94mYh7zHOIANKaBl+XpSk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 20:s8H9hR0ZW9T6KmjP4mFG/ZndMiA/QMJx8elrOUiNSTYcjqikh/OyRjBhqtzxnMuXV7xZduIZncVR6tp4/akI5qeWdUwlf+l4ooAaHgQMgAcyr0gP+aEnZWDwnXFLzro3BFZcfE+SSQO2wFy7svXnsUBgMsZeoLFmaNQSb/ehs+UByzpa0t/KCS7AjFwXl0gaKr8Ji03J/P5GhEi0UyH2tk8B/O1ogP0fxVaamIrPOp0e7XmA7czFIePegvwTTfap+A0ir1eQ1a5c9dmZxn8A1i8RtjvmFDHWDdzjdoyDavTf3F+8Wq0t74R5k5WIlaHEgPzOzETGFQzqDrrFsTkJL7aBnYz8JPhM34x6gFBXicMMbMoG1IHDLiq6WNun3JEoci78qo7ObEOgrKSHnv//vTXsv9/gRqkeVjOHbcfdXSV63KcpLcncXEp0e0JFk02XOGlkkTvLsDEPeAPAIy0IAbyKv5idCnEgQYkD6sEru4TdjnzaZjRJNYcJEmuwsfSzj4UfGghOHBK+c5357B8cYaoABOU+sN5ft+aDj9VphUayDf1UGGJ9jDyHK3FAp2QXCUK7x4u6YGColtjUtjpehFRxMo6qRgY+Pr1Uds+E4F4= 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:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:1daQipo2LP4bpGX7dT9w6RS4aUOjbK7I3PB5dkVS6Bv9VNy9R1YQaGoNsVX86d3vIq7b1Nqoi6n5dQTfun8wts9XpMnIO76sdpbXy+FIr31J5jMIFxD/ahdBGr3UUR6jC7iB6wf8rmyq9IVFjoqO2rZRUgxVIoATsT2nxh4+EsnDC/PS7kWdeNeTLNQm3/Micz3duDLPpN+H2W4d/RZnC8CAHWNcuqF3gTVZ6AjtIYzuuuM+Kjj9tEWR+Aj+rxPPvnSp7mS6yFQz2l72oBwwMVTdy69iR4Y+gPwnjjXbX4DGDQtvpVRz1qkbvyseBnqPDkGSjs4xWJQnS6KFVrbqXdMuvMfR9HC/+Cso1Frx7J7CvR0WaatC7q7lPtmavRse X-Forefront-PRVS: 09730BD177 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(199003)(69596002)(189998001)(2950100001)(48376002)(77096005)(36756003)(19580405001)(5004730100002)(19580395003)(76176999)(5009440100003)(50986999)(97736004)(5003940100001)(68736007)(110136002)(92566002)(101416001)(5008740100001)(81166006)(8676002)(229853001)(81156014)(66066001)(4326007)(50466002)(2906002)(105586002)(106356001)(2351001)(47776003)(53416004)(76506005)(42186005)(33646002)(586003)(3846002)(6116002)(50226002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:kzPgR6A8vSAK6j/WZpbtXqLyJ3jr/PKlTGYpXdP?= =?us-ascii?Q?5uLcYW7/mC9LdT/Y+c0TO4g8wz9rtF5TqFBpPXF9C2iqWXq9cRn3P+q17MnX?= =?us-ascii?Q?4wqwTTcM+TuTPLkkzGOK0dqKXknyGtOOxU6zGxTkbJAnnKb1sptoZCeiac5m?= =?us-ascii?Q?sXCxKNALLmWWRn1cgy2WDEXcXQRHZYDBKFmPbKtapwqKHdD3BnO+uyhUyfOk?= =?us-ascii?Q?ZikuVyDK5UmupaFM7g4A5Y3lzb1GcIWDgj5dch3N67hdvUf1Y0N+VKhY7hme?= =?us-ascii?Q?9ZByyYpfxV1UsmkHGXpbnPwCUtu0rtPYkNBO09Kq+PYhexD59Tfk4YRDLxns?= =?us-ascii?Q?cClcvAU2wnMe50zp+hCqvTDuXWXrGV/nKuxsSYJOyr7S2SqnQX+5ugZTDdgq?= =?us-ascii?Q?Oq/fPBMUq7/7iZu7KXcGTLV1zCvRMTtX5oqBuNJh35ddAqWgW/yqco+mgEn2?= =?us-ascii?Q?Es/IcXCnhdfhLRWFqWgBc0mEEox9ovrYfbeYBxDntxe3/70QoTlX9xyEEIMc?= =?us-ascii?Q?tC1uNDypY502tscXSlzWxW5EU6nuCd6tJOgcnCtvJ4xfVrD54FpHEaULguvo?= =?us-ascii?Q?dMA5W6Wm5TyjiUu66ijjlYDI2eByqgEncbnNHpMmXEVmJzzb2lGyEGiTeOz3?= =?us-ascii?Q?fpb84wMKPpAKipTFXNVzqdm9UVd2fO0bfXx75fFMIMgygHuBWegs+1jGCLVY?= =?us-ascii?Q?YxqlJDXp/yEQoTSq9Za2rSW/23YGHhNWzTtSstPphghFXfcv/2elutTpQFy1?= =?us-ascii?Q?DnZ6kRj4w4Ud46vMHGwmVtXixf6NuGj6V8LKQeatDy+Gw3WOm1U94OEwByHU?= =?us-ascii?Q?fdtUCnBuNdxCZKem9wY9qvtvdPUfuRCV4xWKAooK+5gde9cFv9X+4a6KGUf3?= =?us-ascii?Q?BKOUeKWw9mDPWrRg6/H+RmXAiwmAWes9nrtex4KMc4QZES9zKqCuv8Dl5yQ1?= =?us-ascii?Q?pBzp84u9YJwj/dBc2K5SrXVuce8tKON6FHHvOH40VGY1nQTmi9twt0hH11GM?= =?us-ascii?Q?U2fs7+2l/J78QC6jr0A/0EILjBbH5LyNXJNf/dewBddeVcRH6TvOnys3Lm8I?= =?us-ascii?Q?RtCo79YAhvnHU7ctT7NjKTTKOvcmP0Kpkhld/yZOEAp7agHOnwzv8oGHHVAs?= =?us-ascii?Q?gEXr2to3fVF8boBJBt577i8SlTtjXjPb0Gmq5P+Ox8SUplkx4m9mpLGDK+n2?= =?us-ascii?Q?nwqlPfJ3rRwrtBQ4=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 5:mYdNKCViz0o2MlIc3nNWMreFWxDE6P0iLE5BA5fRJSsjjjyzTWj2D8aLgjMnBVFRYDaHm5+R1PG4b0G4nqp8aaW5wdu3ALKa81juc7KpAqGBng0gtG4odKnqL7L64Q3y4jsV1w6pPl4S8OumOg5fwg==; 24:Hgtj66/zMPH4KU2fObUO9PSaQWjQivYkAncu7jhP0wb4HFaIHgac6Vf0miQj0lKRtnqq1jmgN2r9MS8nz4MVswyrQoxeGDc+1CNZ5G82dGE=; 7:tHxNB2D0BgtCkK4sqeBCGBOfxHWnLvDyan7btOV+01/J2jQy7yuw8mzUAZDPcn+9OyaQ6G/YTN8gQOe8tCSyNLNZEEPbxsfqsAHI2elXmntamnMYl0ZywpIC1d5hwAxced4r/Dl164UZYWk7D5tsHyBoiyLuws3rjk28D7fqFnk9Y+d0gLXgxg+DmBfWvQfB+jcYeCRhDpPuXqyspVIvYQ== SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jun 2016 19:07:44.9995 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v5 10/25] 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: Tue, 14 Jun 2016 19:07:49 -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 6fa486a..5c066e2 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