From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0047.outbound.protection.outlook.com [104.47.34.47]) by dpdk.org (Postfix) with ESMTP id 103BB72FC for ; Fri, 9 Sep 2016 10:45:12 +0200 (CEST) Received: from BN3PR0301CA0066.namprd03.prod.outlook.com (10.160.152.162) by SN1PR0301MB2015.namprd03.prod.outlook.com (10.163.225.158) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Fri, 9 Sep 2016 08:45:10 +0000 Received: from BL2FFO11FD055.protection.gbl (2a01:111:f400:7c09::133) by BN3PR0301CA0066.outlook.office365.com (2a01:111:e400:401e::34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9 via Frontend Transport; Fri, 9 Sep 2016 08:45:10 +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 BL2FFO11FD055.mail.protection.outlook.com (10.173.161.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Fri, 9 Sep 2016 08:45:10 +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 u898hoZ7018305; Fri, 9 Sep 2016 01:45:08 -0700 From: Shreyansh Jain To: CC: , , Shreyansh Jain Date: Fri, 9 Sep 2016 14:13:57 +0530 Message-ID: <1473410639-10367-14-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473410639-10367-1-git-send-email-shreyansh.jain@nxp.com> References: <1451682326-5834-1-git-send-email-viktorin@rehivetech.com> <1473410639-10367-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131178843108371330; (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)(1110001)(1109001)(339900001)(189002)(199003)(19580405001)(33646002)(105606002)(47776003)(50466002)(50986999)(2950100001)(106466001)(48376002)(76176999)(2351001)(19580395003)(229853001)(11100500001)(356003)(36756003)(4326007)(189998001)(86362001)(2906002)(92566002)(626004)(5003940100001)(8676002)(5660300001)(586003)(7846002)(68736007)(97736004)(85426001)(81156014)(8936002)(104016004)(81166006)(305945005)(50226002)(110136002)(77096005)(8666005)(87936001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR0301MB2015; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD055; 1:A06bGpiJPcQZYEyVRKj/4n/YUEkmLY1SgORl0ZgMCpurpAwLBa9Sqn7B5jf1wIKklzmsNYGagNmf5C9itWZla76DYXTC4zs3Y6Si97VF7pMaExQl4quP1XUemA4sL3yufL1G71CqYVKQjdSpXtAF4QeIehlvAaa1mSjia5Aaylf+vABdKaeW2BzWQYD/akK7f4ZtgbpeVxtWi6T88Lafv7ZVESNcc+f0T1RObQhsklHt+VKqsoFGmHfjpNR1nvFgfZbVBC/rpMD6n4stg/NzP9Kt6r0KncXi8ewOjZRby1xTCtIW5xZMfY1Wc6RGCFDIiArx+Ijp3lNE0vhoR0JZOUGV7xwKL7rqKz8g2zwGbcxO/j3Vp1WVPrN5mD+a7NuOubQIWvbLsMgrtfOp9aIwdEoBwg8gu20gs4bGzprgHKhtppWE2hd/om4YqmxBp7zGzNXhODgNAThTtM3XFph+a9ONmVMgFr4Pmt7J60Bfv+7CUATHdB8wwYpOK2E52DDK3VMuzPwzyyvSLlfBokj2OG6EZ2/iCPPen3jtRFAAIJyEWGuG81FZhtr+mS2ayN59Xx9rkytnNKESGUnZk0qDc6r9w2x18STGuWTIJ55HSPnvOqYmwHAd9a/OcGwcx06GenezQI5QFKDZ0J42B4SbNNIE3cZY3RLE8f2EiXtpgmv0tR6+SirVRVAg7DA34YkfZbCXIJDcopRIiqdtw7logDhla0UhruNUwdAsoEV8/FQ= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 7d435ff0-76c9-4ca7-0a25-08d3d88d9bfa X-Microsoft-Exchange-Diagnostics: 1; SN1PR0301MB2015; 2:MYXOkhSU6X3F8OoECdA2qt0wy0HnE1kjZ5vHkeayrUKTtJylYnfDht961ta2NK2S7z7YsAmjAo37fTh03fqh26sDmPd1JwgbkS/1Dvp+1olIKIuzzCgfdewTj73Hsn7lJfavkVWx1TMVojxFS7vRZKKxd+s0lv32IjwadpkFdIQMdtDgwCWfM0e4+SeX5Dqp; 3:yqtAf350ANFVHqxauaMApuOtuCbLHSYoVIhNse8L68MdDlZiCnuUSWSjhCSy19fD3w2O9h3qH5A/kFzCHIIghzRNlQz41/tY2BQbIJEMIyFK9j5GOBhin8GZP3XdopYvVMvFHrGwOTFjbkZ/DpBwX5UP9SaI/uSZWwagEBMjU2UzW5st92lo+LbmwKzuZZNAIxTSALbJuoD+o+I0TQQMq/H5fPbWKNc1f/iG1SqYooY=; 25:bjgflZ6wj3YPFrN8vxX+ZMfB36TahhZ/KIkUOM6poyL6yS49fFNGcLmyc8ilbvjioCMzrXk/F9UW6/QLnslA36aNtBG1rDnYOY61bk+CGHXZrNEA7/i4/7mACdnp4zMt2CeEJGp/QVz6kXrmPVvDPlHWm3FoxwW15FtC18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luYwwGRigh9AZtLc6mlhVmBGcmc8js/IzD0wyhYe7MlcFDxBJ/C0nqyzjho6NOT+XnlEVPECEGTS/e5X2RQ= 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)(13024025)(13018025)(13023025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:SN1PR0301MB2015; BCL:0; PCL:0; RULEID:(400006); SRVR:SN1PR0301MB2015; X-Forefront-PRVS: 00603B7EEF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR0301MB2015; 23:CBANtq6UQJVTC1rTAo4cDwN56S9dQu+YyBem+UQ?= =?us-ascii?Q?E1zdaUDt3/Q6sD/8gUYTGMOrtlLAaTRFrMKNdKgado8oBgPSVI7rE/juxR27?= =?us-ascii?Q?PyY6GhVDL+Yb9qEEzBMvC2Ju4YQANZ/P5SEVgQA+dCWVqR49aOhWhDfgwXx2?= =?us-ascii?Q?Vgx3Km/52ydexZxUM119EQuDWjRzLw0wYJV066sjaGehU7EiOZ3oklu3vMfe?= =?us-ascii?Q?wInzDVXjlmQqHIxqOJRLZ/RMRgwH4Yxb35CI3QWCBxCn8MdIpAQKauR/P7Vr?= =?us-ascii?Q?Yvsqdm8Wy/Z2bvVJRfUvXwmAysxKKLZk9E4OdojhlyWGFCwbDFCfQIc36bnN?= =?us-ascii?Q?5w6jGCLxUPdtxWewde7odwg6b6aOsZSJJ754aPzG2lgtZjqMvwsvuB5ba014?= =?us-ascii?Q?Jr/PxMoc5gmGpjn4Lv7OkNf0P6ErO0ME8E4P34cDBzqUC1Pv+gk3HEvBo36V?= =?us-ascii?Q?UR867wBj+MpzzX4HZUHYfKM0p/GynPSPc6rcA7cQcH0eGFgO25jhoRYRq/xX?= =?us-ascii?Q?zxy0AyrTBmYheC8H37Lzz9b3kO74eATMCzI7G+RzYO+F3Zj/IxYa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6e0+Sm8sw4uHuQnAPx+oWJUobLQYAglRB7aU=; 5:xD+revlXV+D8x/2+f/Q6ZA9//DEfMq4YJ9AmYc+X+vH8jXk1KDPoX2GfHwyJHyIo+BTiSNxGpOpz2gfGZncu4kweOxEx3dncZn4YS6J9DgPW7gjmU5hB7AXxVzEj47OUV+kCAVdKIHrXOiQMOLinxAQmG92n0s4xwSRIz8XJo8w=; 24:T4L0Tg1xAVEtGJX3xIK3pvUW73pUTuky5o2Jl0JLb0O38ipOSz9VIWUFHl+AC+TJBFh2DJbZuKz6tOblmfUeTBYBOPwU4i2nNZpozUfP1zc=; 7:vaMna5nsVfs7tgvslZnCoXYLM/XxWPiZO/4WZ4ODyI3Fd4ABTNs+8fk7qHedcB0FxvDuBmOz8fn11cfght2C10R3yLZscUZBRiHiiGQn30iHYEfM3XC1UXaDKoXpg2UTNlGqGlpGUXXOx0UyMx3NsDai/rRQe77i/yC6+aqdDHUQJYOViDbBwMEyLZjNb22pKWWoNudhVk+oHctlk6s6SA7EbeHp1TR5RZLt7zc0Hq0zc9rNhN3ZF58lEMvqyopl SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2016 08:45:10.6343 (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: SN1PR0301MB2015 Subject: [dpdk-dev] [PATCH v3 13/15] 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: Fri, 09 Sep 2016 08:45:12 -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