From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0059.outbound.protection.outlook.com [104.47.38.59]) by dpdk.org (Postfix) with ESMTP id 21947568E for ; Wed, 31 Aug 2016 13:02:03 +0200 (CEST) Received: from DM5PR03CA0008.namprd03.prod.outlook.com (10.175.104.18) by DM5PR03MB2444.namprd03.prod.outlook.com (10.168.233.14) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Wed, 31 Aug 2016 11:02:00 +0000 Received: from BN1AFFO11FD016.protection.gbl (2a01:111:f400:7c10::185) by DM5PR03CA0008.outlook.office365.com (2603:10b6:3:118::18) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9 via Frontend Transport; Wed, 31 Aug 2016 11:02:00 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1AFFO11FD016.mail.protection.outlook.com (10.58.52.76) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Wed, 31 Aug 2016 11:02:00 +0000 Received: from Tophie.ap.freescale.net ([10.232.14.87]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u7VB0lae010481; Wed, 31 Aug 2016 04:01:58 -0700 From: Shreyansh Jain To: CC: Shreyansh Jain , Jan Viktorin , Hemant Agrawal Date: Wed, 31 Aug 2016 16:30:34 +0530 Message-ID: <1472641235-23626-14-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472641235-23626-1-git-send-email-shreyansh.jain@nxp.com> References: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> <1472641235-23626-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131171149210573878; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(92566002)(356003)(106466001)(77096005)(229853001)(105606002)(11100500001)(2906002)(87936001)(47776003)(586003)(2950100001)(5660300001)(19580405001)(86362001)(8936002)(19580395003)(8666005)(97736004)(626004)(50226002)(76176999)(50466002)(7846002)(189998001)(305945005)(2351001)(8676002)(4326007)(81156014)(110136002)(85426001)(104016004)(5003940100001)(36756003)(48376002)(33646002)(50986999)(68736007)(81166006)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2444; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD016; 1:joOOeoqZJTu57Vto7YYb6qeblzCA3dWo46t846V9G+wGQzIM9cA06Z9f+bz2q6NY7+i5SmAhz8NlCMP+oNFNz4tTV92CYBhDL+ppLF5BaKw+pmOhjxmwsbVcjGKBbUmYbQDjlMXJ5kPM6OPhJpTmQlydy0NOiKML0/zOzPOG6MdCswYFNCdSr4PTdakvlLzzfNGw1s8cuRwmYvjd8gjLV/tzkhVhdFZ06jLNT+khpK5X5lB/2oCYwFFyT70A/eqNX6re+8rRKU7Lg1YJQMYrLhP1E/O5si90ln0iAlF7JJ+mhTmIw6WCnuh3BNsmKelDzs/kg+oSw2SxVJb3vhKKyEdn61r4Z4ORwKNP12zsonlg+ITFBa1VRAa7fPX2OwXJE8cXcaPEj25MeQ+aluQLeN/SqTp8pYklsLQ/+2CrFzgv5RGjB5dxafPYLdV+N2B3ncpw+Lf0+EsGMnKPyNVunNzaC6rESwmMnHoz4pzEJ+0rRx7mR3Sm3XFmdireVbXK7qrS670iUWsmELoX7iTH+PPXI0zn3JokmqZ3zCvb95s4layJQoDp5dUvtWjpEQ6bF4JpLRsCCxHKtxIESx/83l28QNQ1cFNgYkQ+HO9W6asMjrJSL7jVM+o0vHjPoxhmm8GtLg2cwd9muKnA+T6ZZBtDaxGilmQpXHd5vHjodOk8PRpjFM9qe3+CWje+rQn963V4bDIXwNj+l1ys3arxw95lc/cmGxVhciZitKj+KDM= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 6a770a32-3aaf-4fbb-7ad5-08d3d18e3bee X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2444; 2:VsY9H8EHpvkXWFVfkvChzOWhQoD5jMJGf1BJA18JFCh/XFLx4V3FcCT9F6F/0smNSPJgbK4uj0IA9lJh8h1ukfMyzUROeKHj7LLDj2j2/6HiXrtanwbNeAQp0A8JiV/ny1I7uWiM8Dm+Kk2i6ILdj1q9ezxMKMX41ftGGwHnznsnYSxWw25RCsOO5Iv5hlOi; 3:VKw4WRIxnw2fFMrWqJYw3eJqYCpeOTS5iTn2EUJFTOFHL0OUTnu8M64un+kSUcNKht6zgWPxW6a8V3hT1r++qjsPnHiqmcweTmcbVrvAC8rOqWf6uV9jNt0T+wPhBjGyfb5Rr7/L5tSB/Xnu3N57Oc3kPfA5WYbLFQicKRjXPIf1f4JnGuZVo5kWzjw4H589SeFeENwTj9hVRVZFruaXcQd60qzf/lxltiYSl8unUNQ=; 25:D0H3yY4igF8CF8D5fUYER6FY9at4vLlTwBtw+CjLy+h9otARS1S/OTg1jtUKQMUXJ4VKSsANRpx5cf+TEFjDrV73txBtoxzMdtYdi4UZmhhbQ+nNe35AtuhZVOblZww2P/xdcJ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VFLJwjsQtmq9fDaWbRiWRdU3Kt2XAAY/VMf+QytmsoxCowCwbJVa2ASJQ20euTOdVICPZ6ctZzTTswsOw1pMRfHmFwe2e0oAsD8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13015025)(13017025)(13023025)(13024025)(13018025)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:DM5PR03MB2444; BCL:0; PCL:0; RULEID:(400006); SRVR:DM5PR03MB2444; X-Forefront-PRVS: 00514A2FE6 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2444; 23:+kqIkWJWkwTHHvgq7fiW0cp3LAdQFFxmDWWTfmRM8?= =?us-ascii?Q?Mq4JvZKgGkyKxyl6Lg03HwQ6MKxkHoeBwTwiupysCM/bTotc0zuwOv3c5UHQ?= =?us-ascii?Q?EGamjwpjWYreuU63bNWjAknee1lSZl5XtZkkYENDjSaC7MuRncmaRYlToEGv?= =?us-ascii?Q?4gv5SyKlGxSba2PzSRYwY7a+zcm3x5ROMmWAHMwltMtaWK9mo9itcQa4JkDf?= =?us-ascii?Q?SyD+bMMBIFVntfW0zQE0ewWKdLptlr6+2f+V37OuSQH0vHv3issaBUNqix/2?= =?us-ascii?Q?meYnAirvv60afZorMhadYfXYNIP4/Tu3UCLSTQBGx/rSWW1bkEAjODLG9azf?= =?us-ascii?Q?/GItd/dKPzy01lX5BP5ZWIxCXdUpXCXYUAOEn+GaRiRWAxf3c3AomhW/wF8T?= =?us-ascii?Q?AvFv/CyNSn40qkhxg/LFkLPwiK/txOrUyXXVaqOsFnDnJGYJWtJ+gcxSOS5A?= =?us-ascii?Q?96K0qffnfkLAsjiLwXDs9PlsgqpoyCIExQXNC0f4dt13YVbAu5SrkjmkLUUc?= =?us-ascii?Q?PvdDiQGk3QpR0UUbt5LUv34WKRggB9EKjimWNX8NBJnNckm4bP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V5sl/87mJUAvBvo8Mb6Woa2A/kVTe6h3KEpa1EwCh85ToGSk=; 5:HXaPx4C33SFOk7ROm9ZlXIEYfHkXcXu7wTiiaSfibujjMIUezcRVGAJwuHvsriGAr3JM34P9ZYBPbX5CGA79SMm+q5zhmXtduaJuvFsh4mfQ0yGTtAjDl3OUmwtM3Ytz1gn17Xu/RWoT3Ug9vrNccvG0zPLt3AM+cwj8BdEGkDg=; 24:0IY0B8OYJkH2CC2HlNj08x73zJxdc4CnRukBJzLkDx2MsB3kjlbs/m6GRO27hGKXIrYDcVHv96D3mA5ScOIyQM9OD3X+afSntqopB04mfXY=; 7:Xpr03GzBKSJMwnowjH57nIHAalY2z3fx62t32T34DxrxDWWiLO/oMh0RHMsl+H8W8S2xAxjLGfRpvDFSIscgAfXI/L2Qv31KmLx2gVN+fNhphBP5YpmnrLLiNTybwYhcHlcMOtzufVHkTLcpPXt4mctgC6Bn0drBIad1uNzQ1eoO2n0Pvpo5C318L4tvjFUP73xNAmSynL9KebSQAal2AbvMRt8J1eLSvalNFA5NIAJn5mDP4EA1ZhnWJd1R8RPq SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2016 11:02:00.8545 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR03MB2444 Subject: [dpdk-dev] [PATCH v2 13/14] ether: extract function eth_dev_get_driver_name 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: Wed, 31 Aug 2016 11:02:03 -0000 Signed-off-by: Jan Viktorin Signed-off-by: Shreyansh Jain Signed-off-by: Hemant Agrawal --- lib/librte_ether/rte_ethdev.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 104ea4a..4fa65ca 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -2568,6 +2568,17 @@ rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) return 0; } +static inline +const char *eth_dev_get_driver_name(const struct rte_eth_dev *dev) +{ + if (dev->pci_dev) { + return dev->driver->pci_drv.driver.name; + } + + RTE_VERIFY(0); + return NULL; +} + const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name, uint16_t queue_id, size_t size, unsigned align, @@ -2575,9 +2586,11 @@ rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name, { char z_name[RTE_MEMZONE_NAMESIZE]; const struct rte_memzone *mz; + const char *drv_name; + drv_name = eth_dev_get_driver_name(dev); snprintf(z_name, sizeof(z_name), "%s_%s_%d_%d", - dev->driver->pci_drv.driver.name, ring_name, + drv_name, ring_name, dev->data->port_id, queue_id); mz = rte_memzone_lookup(z_name); -- 2.7.4