From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0049.outbound.protection.outlook.com [104.47.33.49]) by dpdk.org (Postfix) with ESMTP id 4827B8E8D for ; Wed, 7 Sep 2016 16:10:18 +0200 (CEST) Received: from DM2PR03CA0047.namprd03.prod.outlook.com (10.141.96.46) by BLUPR0301MB2001.namprd03.prod.outlook.com (10.164.22.15) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Wed, 7 Sep 2016 14:10:17 +0000 Received: from BN1BFFO11FD051.protection.gbl (2a01:111:f400:7c10::1:185) by DM2PR03CA0047.outlook.office365.com (2a01:111:e400:2428::46) 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; Wed, 7 Sep 2016 14:10:16 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; rehivetech.com; dkim=none (message not signed) header.d=none;rehivetech.com; dmarc=fail action=none header.from=nxp.com; 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 BN1BFFO11FD051.mail.protection.outlook.com (10.58.145.6) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Wed, 7 Sep 2016 14:10:15 +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 u87E8BD3013556; Wed, 7 Sep 2016 07:10:12 -0700 From: Shreyansh Jain To: CC: , Shreyansh Jain , "Jan Viktorin" Date: Wed, 7 Sep 2016 19:38:10 +0530 Message-ID: <1473257297-7221-19-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1473257297-7221-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1473257297-7221-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131177310155801266; (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)(110136002)(105606002)(4326007)(2351001)(50986999)(77096005)(5003940100001)(81166006)(81156014)(19580405001)(50466002)(48376002)(68736007)(85426001)(19580395003)(86362001)(8676002)(76176999)(586003)(50226002)(229853001)(97736004)(36756003)(7846002)(5660300001)(92566002)(8936002)(47776003)(2950100001)(87936001)(356003)(2906002)(189998001)(106466001)(305945005)(33646002)(104016004)(626004)(575784001)(8666005)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB2001; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD051; 1:nqovqUbLqJAQkIVWbrkhcwV2z6NkLvax2MLAnRkCGeojUwiEeKAIsjxt/eNaIXxmcyiSo4HISLrVvlAZ2R4KIt63hiUrE3a3W88SyxBgJncIyg5pWLE9LpAc3RfDC9vUDowxGbZ9CW+wfCe6Y9a2Q34AFQBG2d3p5Ry6IosULawKlndGGPGyF3lGSON25ngxtZmkatNcqKsEhGd0ykghbRPePavIzRNvPWvFFwZ+Mae9wjXAcJXE2tF0rFdyOo0P3pRUnBVALIPFA8fCypqTHe69P2FvnOD+EjFKRSabYtzN2ctaxgfjywUe9jBmiUGMkO/g9HcXtfJpWGSQAT8u6cjl55aV14SOEHvYdMSt/pEFEkHZC54cgQ8Iqdu5wBc+E93MoGkJIEV7hLWxvjFspXCa79iu8m4XAORBzxwq6FBc7YttyfSxFOREzck8tcovCmlbjvi868x3qn4KDNKy0y2+j5tLo4EXdrlW+Heco2z8qvWehfodi42mIhl0GeSfJYbFQrLQJ41pfji0sJmbJCeSrelxSR/WKgNfQJ+N/54eMmJTzwCL3Hf9VgCC72Gu1WvHubuLU8CO7t4oOOWh//u19xbd+QjJsAbd2NfRVBbWGplzZgtPhu1KkszrIaWI MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: 769a9c60-ee5e-4c42-2155-08d3d728b0e2 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2001; 2:XtDlnEgv/qPl7ewmMhD18Uz4McMKxQhAqPrZDH8aYDQfvfNe2b1/nbHLVa6PVtbW5MYzhYKkxJAdUoxZoyBRMceUiZnV4v51OIQcDqAagqNw2QmZ4as3+xWawCpD6WloWu/SAirXHWv7xoaf/fhubML/9RkGsHBVA4zofwo91HJjgKv03Q/DyjdCe2Y3x/I6; 3:YnHvVIyyxswOMHH/t5blQPzalLIgoc8RmIGoJt3ar8+AfZ384EYExYIMSF3Hbxat1GvOLPD2hDa7P8plulzqc9Smxv29UR1Mu1HagO5n3RR4pF9z0ftFHxuntLmUEUH7lsd10uhRog8o8LWAgRB/xft6w0Q1w01cpU+iYK3VV5P7/2eFSzADM8qoZ7h7hl+TrLXpSsAWLumLSR1umiJq2kD5Ru2VJ+ySw7B9+sElcFk= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0301MB2001; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB2001; 25:DJlqi4nRJLpP2T7Y5JjjfQp84LlKpGQO8poWK0ImoRI4xTtWl8/7BwlHjkdkcechdmt0wxJcMjTxnMy7cPHvmvgFlzRIzEjQzRWRsEeelF9DlJHKOikWL0sRpgJ4LeY1SumEYhLpY0vdbZ/fHjbwJU/JiGn3qT2BLUjVcCsfXtholV6jAZFgFr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lO53yenFt2mXJ+sI25eBKD29Zb7AitGvn0chL7B6eQXYTsetHtgocwZGLsAx+MxE6xBHlxEa0TVYyoQ28IMCFRc2u2hhmFA0btFVI84+p3mxQ2CNfU7szqtLb2vst85AjBh7XNORFoosxHd4qtY5gVsLSM1OELd08QYscwFvf8tDIRmtZ2heeqfvq10MxzCW05/xsgOOzDwO74DlAQ0qgCHco5E9pMgQMh+0IHTkDo9MF/MNbNJgKAj/SnAhaq5IJ9W2HKnHc6PwlFI9k2FBSlsuSqzgOxSSx2WC8momCJQzTYgdPEYMmRRWodjkRqLpfRelYs= 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)(3002001)(10201501046)(6055026); SRVR:BLUPR0301MB2001; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB2001; X-Forefront-PRVS: 0058ABBBC7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0301MB2001; 23:t5otqYPSAnpTWIlbPLBrVOTAjra53xdoaVjFSGt?= =?us-ascii?Q?9/OBwd5nyw26GCkyjUP2qidAP/ttr9ivje/quDyPaUioARcbqd2ebuJ/z2R/?= =?us-ascii?Q?CVmnhB2/lpmHdXfm1dNXGHgrhe2XDhMd6E+g/a7piLuehpyQFq+IDrs+nRoM?= =?us-ascii?Q?E+0EWdz7yU+JmCQTZOS9j6QfL/Ii9bTUpLKpUGJeYWZR1QVzxmIsXUxh3i4f?= =?us-ascii?Q?kgbUN1FpVw0ojPAquAL8R7Rg36TTkgl0HI/wUXkT/owwmXHsABaD9DVW8opR?= =?us-ascii?Q?qubGMmKR7DvwhEIOKHLDNVwY7g/Wc3hbzfWD28atHoNG/5u9JwKAoGn6gkAC?= =?us-ascii?Q?E0yBVN4J9p3JHuFFeR65IS/HUhP2j+JEFc4pQCF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lwiqG7k0ehPOlMFIv8jhjsKHYaE2cyPxVfiD2XXIYPOSVnRR/giXIkYMViz63RGAAj+inaOUa4kGU1+AddOKTtnsqKzv07hTu88dA6L0rLv+q39nPo6wIB99xMSwdaLZAe6SfGO1AK63H+K+HdtPqA0dnhb/qMah1NUPUvA7GdG4TqhtJ/XqkAZpccxboHy+fTdebVqGB2FQJjTT9ZWKWkiY1P9JI8xDoU5F58T8ODiZ0ulzlzIYmCMhfgaD8Qmr6/6eeygID/YG4=; 5:XdbMO9TGJ4I+4YcQeYuT1RvY/IQ/Kbi6M2/AOSr+araUp7P7kqSFJMkuAcc6jNJ81H6Af1ooxNv8QlnfvPg22m05cvmm69DFQ0LGu2fKUFNOC0tCtCKTXLGEb4hwm/48kluHFgQy5WMknjhr9ZfrRALjR3T0utipaJLUZn3yy4c=; 24:Xaz3KLj6YnPMUMoGLu4FNW0yHffEsPqr6ujkZhHY9Isdgpfz85jQ6vr2XCdBVBPC3WQiWW5dT3fQkgHkLiXFcTL2neAO6On8BIelG5kQvpo=; 7:cxXEIjXbz+UK1C1eshdFB3hMJ549ceYBpdWsjNjfe4t3cEQn7jX+pADIhmpi4cyPppCDxi2IGk+b5GwTZUSvme3cbU0LUyQuz6Sx7AMXMOiokhIHx9VJHz0HjznWK/LvJOmk/0Ukh54UnOlodU9sY9nw6oJ7Eq2dYczcU6VOdjLJnUawd59q3BIGoti74z6D6RpfnCC3NzlkVWdB35misc2LiMHxAo55LuZBq6YxbYHMr9PS7sKOXmr0gw1qroJX SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2016 14:10:15.3617 (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: BLUPR0301MB2001 Subject: [dpdk-dev] [PATCH v9 18/25] eal: move init/uninit to rte_vdev_driver 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, 07 Sep 2016 14:10:18 -0000 These functions are virtual-device specific and they are never called for any PCI driver (after introducing DRIVER_REGISTER_PCI, there is no way to do it). All affected drivers are updated. The prototypes are renamed to rte_vdev_init_t and rte_vdev_uninit_t. Signed-off-by: Jan Viktorin Signed-off-by: Shreyansh Jain --- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 4 ++-- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 4 ++-- drivers/crypto/kasumi/rte_kasumi_pmd.c | 4 ++-- drivers/crypto/null/null_crypto_pmd.c | 4 ++-- drivers/crypto/snow3g/rte_snow3g_pmd.c | 4 ++-- drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- drivers/net/mpipe/mpipe_tilegx.c | 4 ++-- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/pcap/rte_eth_pcap.c | 4 ++-- drivers/net/ring/rte_eth_ring.c | 4 ++-- drivers/net/vhost/rte_eth_vhost.c | 4 ++-- drivers/net/virtio/virtio_user_ethdev.c | 4 ++-- drivers/net/xenvirt/rte_eth_xenvirt.c | 4 ++-- lib/librte_eal/common/eal_common_vdev.c | 4 ++-- lib/librte_eal/common/include/rte_dev.h | 12 ------------ lib/librte_eal/common/include/rte_vdev.h | 12 ++++++++++++ 17 files changed, 42 insertions(+), 42 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index e1d5e37..c93ebfe 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -517,9 +517,9 @@ aesni_gcm_uninit(const char *name) static struct rte_vdev_driver aesni_gcm_pmd_drv = { .driver = { .type = PMD_VDEV, - .init = aesni_gcm_init, - .uninit = aesni_gcm_uninit }, + .init = aesni_gcm_init, + .uninit = aesni_gcm_uninit }; DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv); diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 2ba5389..30c0706 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -717,9 +717,9 @@ cryptodev_aesni_mb_uninit(const char *name) static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = { .driver = { .type = PMD_VDEV, - .init = cryptodev_aesni_mb_init, - .uninit = cryptodev_aesni_mb_uninit }, + .init = cryptodev_aesni_mb_init, + .uninit = cryptodev_aesni_mb_uninit }; DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index a30e776..ba2829d 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -653,9 +653,9 @@ cryptodev_kasumi_uninit(const char *name) static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = { .driver = { .type = PMD_VDEV, - .init = cryptodev_kasumi_init, - .uninit = cryptodev_kasumi_uninit }, + .init = cryptodev_kasumi_init, + .uninit = cryptodev_kasumi_uninit }; DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv); diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index 8ab34de..4c12faa 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -271,9 +271,9 @@ cryptodev_null_uninit(const char *name) static struct rte_vdev_driver cryptodev_null_pmd_drv = { .driver = { .type = PMD_VDEV, - .init = cryptodev_null_init, - .uninit = cryptodev_null_uninit }, + .init = cryptodev_null_init, + .uninit = cryptodev_null_uninit }; DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 8b356a3..10c6b83 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -641,9 +641,9 @@ cryptodev_snow3g_uninit(const char *name) static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = { .driver = { .type = PMD_VDEV, - .init = cryptodev_snow3g_init, - .uninit = cryptodev_snow3g_uninit }, + .init = cryptodev_snow3g_init, + .uninit = cryptodev_snow3g_uninit }; DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv); diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 95aa573..9a9a2ee 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -892,9 +892,9 @@ rte_pmd_af_packet_devuninit(const char *name) static struct rte_vdev_driver pmd_af_packet_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_af_packet_devinit, - .uninit = rte_pmd_af_packet_devuninit }, + .init = rte_pmd_af_packet_devinit, + .uninit = rte_pmd_af_packet_devuninit }; DRIVER_REGISTER_VDEV(eth_af_packet, pmd_af_packet_drv); diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index 3209dbc..5fa2a93 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2511,9 +2511,9 @@ bond_ethdev_configure(struct rte_eth_dev *dev) static struct rte_vdev_driver bond_drv = { .driver = { .type = PMD_VDEV, - .init = bond_init, - .uninit = bond_uninit }, + .init = bond_init, + .uninit = bond_uninit }; DRIVER_REGISTER_VDEV(eth_bond, bond_drv); diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 6d0dc86..efb000b 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1626,15 +1626,15 @@ rte_pmd_mpipe_devinit(const char *ifname, static struct rte_vdev_driver pmd_mpipe_xgbe_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_mpipe_devinit }, + .init = rte_pmd_mpipe_devinit }; static struct rte_vdev_driver pmd_mpipe_gbe_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_mpipe_devinit }, + .init = rte_pmd_mpipe_devinit }; DRIVER_REGISTER_VDEV(xgbe, pmd_mpipe_xgbe_drv); diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 75bad6c..be4169e 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -689,9 +689,9 @@ rte_pmd_null_devuninit(const char *name) static struct rte_vdev_driver pmd_null_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_null_devinit, - .uninit = rte_pmd_null_devuninit }, + .init = rte_pmd_null_devinit, + .uninit = rte_pmd_null_devuninit }; DRIVER_REGISTER_VDEV(eth_null, pmd_null_drv); diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index b72d07e..d6718b8 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1086,9 +1086,9 @@ rte_pmd_pcap_devuninit(const char *name) static struct rte_vdev_driver pmd_pcap_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_pcap_devinit, - .uninit = rte_pmd_pcap_devuninit }, + .init = rte_pmd_pcap_devinit, + .uninit = rte_pmd_pcap_devuninit }; DRIVER_REGISTER_VDEV(eth_pcap, pmd_pcap_drv); diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 67cbee3..77bd664 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -626,9 +626,9 @@ rte_pmd_ring_devuninit(const char *name) static struct rte_vdev_driver pmd_ring_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_ring_devinit, - .uninit = rte_pmd_ring_devuninit }, + .init = rte_pmd_ring_devinit, + .uninit = rte_pmd_ring_devuninit }; DRIVER_REGISTER_VDEV(eth_ring, pmd_ring_drv); diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 94577e9..e2610b4 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -927,9 +927,9 @@ rte_pmd_vhost_devuninit(const char *name) static struct rte_vdev_driver pmd_vhost_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_vhost_devinit, - .uninit = rte_pmd_vhost_devuninit }, + .init = rte_pmd_vhost_devinit, + .uninit = rte_pmd_vhost_devuninit }; DRIVER_REGISTER_VDEV(eth_vhost, pmd_vhost_drv); diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 08cd4c2..7975298 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -465,9 +465,9 @@ virtio_user_pmd_devuninit(const char *name) static struct rte_vdev_driver virtio_user_driver = { .driver = { .type = PMD_VDEV, - .init = virtio_user_pmd_devinit, - .uninit = virtio_user_pmd_devuninit }, + .init = virtio_user_pmd_devinit, + .uninit = virtio_user_pmd_devuninit }; DRIVER_REGISTER_VDEV(virtio_user, virtio_user_driver); diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index c5d89fc..7da0f17 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -762,9 +762,9 @@ rte_pmd_xenvirt_devuninit(const char *name) static struct rte_vdev_driver pmd_xenvirt_drv = { .driver = { .type = PMD_VDEV, - .init = rte_pmd_xenvirt_devinit, - .uninit = rte_pmd_xenvirt_devuninit }, + .init = rte_pmd_xenvirt_devinit, + .uninit = rte_pmd_xenvirt_devuninit }; DRIVER_REGISTER_VDEV(eth_xenvirt, pmd_xenvirt_drv); diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index e1ca8e0..83f8ea8 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -73,7 +73,7 @@ rte_eal_vdev_init(const char *name, const char *args) * So use strncmp to compare. */ if (!strncmp(driver->driver.name, name, strlen(driver->driver.name))) - return driver->driver.init(name, args); + return driver->init(name, args); } RTE_LOG(ERR, EAL, "no driver found for %s\n", name); @@ -96,7 +96,7 @@ rte_eal_vdev_uninit(const char *name) * So use strncmp to compare. */ if (!strncmp(driver->driver.name, name, strlen(driver->driver.name))) - return driver->driver.uninit(name); + return driver->uninit(name); } RTE_LOG(ERR, EAL, "no driver found for %s\n", name); diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index a4f08b5..3097194 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -105,16 +105,6 @@ rte_pmd_debug_trace(const char *func_name, const char *fmt, ...) TAILQ_HEAD(rte_driver_list, rte_driver); /** - * Initialization function called for each device driver once. - */ -typedef int (rte_dev_init_t)(const char *name, const char *args); - -/** - * Uninitilization function called for each device driver once. - */ -typedef int (rte_dev_uninit_t)(const char *name); - -/** * Driver type enumeration */ enum pmd_type { @@ -129,8 +119,6 @@ struct rte_driver { TAILQ_ENTRY(rte_driver) next; /**< Next in list. */ enum pmd_type type; /**< PMD Driver type */ const char *name; /**< Driver name. */ - rte_dev_init_t *init; /**< Device init. function. */ - rte_dev_uninit_t *uninit; /**< Device uninit. function. */ }; /** diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 9a2e2d5..70a62c0 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -44,11 +44,23 @@ extern "C" { TAILQ_HEAD(vdev_driver_list, rte_vdev_driver); /** + * Initialization function called for each virtual device driver once. + */ +typedef int (rte_vdev_init_t)(const char *name, const char *args); + +/** + * Uninitilization function called for each virtual device driver once. + */ +typedef int (rte_vdev_uninit_t)(const char *name); + +/** * A virtual device driver abstraction. */ struct rte_vdev_driver { TAILQ_ENTRY(rte_vdev_driver) next; /**< Next in list. */ struct rte_driver driver; /**< Inherited general driver. */ + rte_vdev_init_t *init; /**< Virtual device init. function. */ + rte_vdev_uninit_t *uninit; /**< Virtual device uninit. function. */ }; /** -- 2.7.4