From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0059.outbound.protection.outlook.com [104.47.37.59]) by dpdk.org (Postfix) with ESMTP id 5DCB35A64 for ; Fri, 26 Aug 2016 15:58:17 +0200 (CEST) Received: from DM2PR03CA0006.namprd03.prod.outlook.com (10.141.96.16) by BN1PR0301MB0708.namprd03.prod.outlook.com (10.160.78.14) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.599.9; Fri, 26 Aug 2016 13:58:14 +0000 Received: from BN1BFFO11FD007.protection.gbl (2a01:111:f400:7c10::1:169) by DM2PR03CA0006.outlook.office365.com (2a01:111:e400:2428::16) 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; Fri, 26 Aug 2016 13:58:12 +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 BN1BFFO11FD007.mail.protection.outlook.com (10.58.144.70) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.587.6 via Frontend Transport; Fri, 26 Aug 2016 13:58:13 +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 u7QDvHpt023630; Fri, 26 Aug 2016 06:58:10 -0700 From: Shreyansh Jain To: CC: , , , , Shreyansh Jain Date: Fri, 26 Aug 2016 19:26:56 +0530 Message-ID: <1472219823-29486-19-git-send-email-shreyansh.jain@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1472219823-29486-1-git-send-email-shreyansh.jain@nxp.com> References: <1466510566-9240-1-git-send-email-shreyansh.jain@nxp.com> <1472219823-29486-1-git-send-email-shreyansh.jain@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131166934935270464; (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)(189002)(199003)(8676002)(47776003)(81156014)(8936002)(50226002)(2950100001)(586003)(105606002)(106466001)(81166006)(36756003)(2351001)(7846002)(356003)(305945005)(85426001)(8666005)(48376002)(76176999)(5003940100001)(4326007)(2906002)(19580395003)(19580405001)(92566002)(68736007)(5660300001)(110136002)(50986999)(86362001)(575784001)(189998001)(50466002)(97736004)(626004)(33646002)(77096005)(104016004)(229853001)(87936001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0708; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD007; 1:Asu8MDfX/iZdxwy7OFul9sCwowF7Yxh7U45q9GqGFOhyO2OpKtAuzHTVRXQn/IlHHrlA4AxNOgQ0Kk8ZaQ1ozlkfBJVl1xkSJqq2GZ8emYLG/PK5/+f0ctAHWZny3EibF3HFWI0ddM/BlOrrZnvQBB91qmhNmzdJUxDAnNLOO7y2J7gKXdtwMU8AUM+iG3EUo5MprzWgxM48zKTFEaudIadPhtGplaqRB7dwX2WysnNeuYKPsT8E3KPwNCSxfpyE4gCLbq4eXTrh3icmZQpijA5ybF+5XulFbC+LD+I7iK0TXMFFDFuEJ8BlqKZHWmQzhdzfNwCnd2ipV8t766dQ0ynkiv3OAWIkqn8LIQzJo7w+dpE9mG5duK8sVHGbuuc19Bv0EAWPbGB4PA24UQefJ9P0OoHbzfFtN1uFzUgtWi9GQsj8n18SPkULMXVEjotiBONCVjN3MN7CBEoKcqeMdAN1jkmx1Og01uzJ1OdVHwXPslZickM01pplpwMuMWcPHw5Gld/waCmqzYK5VhjX5W2PJQJn1FCwULZeiUPmHUvhoDEqHYGGfnGaPYweljrzkE+h3zxKpFwHgHJDNs7i+/nADukHs04qqTtaQfKOE5lI3uPZg4pP6i0MpyHFZOaNqpxq538cxMjc/6I8eZuzPc/t3p/kvAQDPAxKe65InfpxjULqLd9oPEkeHFyYUt0du/ynGMW8JoRbyFIYRMHKyobYC6q1vTdp9ixvQXOIYaU= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: bd2a1e29-93f9-4e8f-92df-08d3cdb9058c X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 2:lNNSGZRfcnMmf/CAD3qrevjAE+RjPsBTSDPtTEFcKIVOcmuGJP/Zlbrwqc0gskEwvA3raFaUeNr2W2+Bi7zQO7JZ3RBsbnbaVqhQg6JGkeR+hyLyqM02kt462G1rKENhjY6m66EpR/PPY8i4Yb5V1tXi9H4kPxLcSM+az07W0qTQUek1f4xwkM8wNKoM7f6l; 3:/CCPg//AAAg9QefbFNmyephvUi3QkXABwKBLD/74qYMZB8HyK9bRGfKW2db7rmNxRs6g5vXhsXSVtPA4N3CjsXyNDGntIbFkjx6fsGSDMlqozdDjCUoGpPos2k12cCKoU4xVtMUPmNLI2Bv/nsVcCF7dJ5LWqiVXSbrVbdmqGb1PmeeZLb3xOyvWcX85Ot7++6qb0x83HP4yhkVXQ93AtYxshXbn1ilM/IDa/6Zh1+I=; 25:cswR+6nGBg93L/+wtq1VWKZQRR14zCHEx+zXU40PZJnssQlC7wQSsZGp8LyrWhBdibFE/wYKo6jWRF6VaOVwhZja+B+qNQCf1K6GbJf534jgU3RWeYAQRxHsKQW2WqGvFWmq+7WxqIvvlYxoOO322ZcGLuOrlrol7nRz6kUfTQIquLs9ZZwurf27+xfX8NsFZKlNudkEAn63LWnfiO/4mDG9C0aS2OC5//LDJPYJnekseB9ZSXNyBlGEoSiVVuETONtk2e5mRfi8PdVLTW4LBh4TJO9x8o9R5FGVuruFH5aDOfNSVwLBsioIzxW2kdTShlGMSjvkJ1prTl8At3c8Swln3qa6Drqb5FQX6ll922cao0jjeIJPPd8euehEKpvapCZ4/7itKiQQixw/JCn+mD/Q7BSMJY8nd6QcZfX8V6Y= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN1PR0301MB0708; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 31:YE41xu9lM5cOfoYz5iwhsFxfPccahNsJjxbOGilzVO/mQhqOQgkLcDXnAuskpDWS821rnXggXGl6kfN4UYXho7ZFGHIbdd7ZcilRY3Uz4B6ksOvCaf5E2BEqRyoKA1+m7f443uDwgoMrCZaKhDTq85iSQuYUNwwc57kyhtH7OPzWhETJ7ZctdfPdIRJPZCEA7iavy0lpdLiTWGD95riPhuzWwgCBx3UM/W1Cf33Kv2Y=; 4:0p/v0QpyMkVKIHBH5wp+E7vCRgOM5UdneZDUsY56ec8V4wl4oqa8GZf7o9kpERLfE9koRajZeLGN14AKMmJcTOXFbuWnhS8oEmCswJIhh/kfFSIsNbkO+smTC+FptAEbEfDjTr29178rKt9AoCzO51u4fuwxTwWdGZcUGUZVobAcmka92G4Irr9Gu01KddUKqEII2nXkAGAKueZv2W2zrinhxcXe64XQfs6HXOlgXOWWumdIuyI5ez149XtudHkxqcv34cbQzSvh3fy9kJyt88q7U1DZRDn4i3k4Kna3iZywty1MWjPWWH8PQV+OuuAh7DmnJeWsQykJAP7YCm/HPoZsqdNdSbTcNqWGr86/Y8ox1iJSCBq8Dm6ET2lX+cmdKQT+fVzTJySfKuc9adM/Ctwr0Dvp2CDWyOogq0a9UNvivcyEDxa1Yh3IjLfpDk67gJosUmPIzSYrDza9wsG/VoCRYbx2hT9rZ7rS2be08Ey7KyUKk3d8zp9W0IGyO210QReciaohYKU37YZVE8MGiOdvvPL+qIj4CnLAQkIYCQ8= 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)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BN1PR0301MB0708; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR0301MB0708; X-Forefront-PRVS: 00462943DE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0708; 23:GjSzuLB2qCIh/CNgD4eBfvVwt0tjSAzxIPYM8x+?= =?us-ascii?Q?sIIl/+WLteNSNRTjgxnPXrRTyibI1jA2QnHSoLuAyZpBJOM6TNqXtk8gho6Z?= =?us-ascii?Q?3ERSwkGuO/jd35U1Wll3zOqWMHz9Kqr3OltF0E9FkWoiqqj5AUJQuv5WuLgJ?= =?us-ascii?Q?sPyxXa2W6AUY/oljgmkq7nKWh3xXR8V7bLR50EghnQBYJGMaokEuzJ43QHuK?= =?us-ascii?Q?Hmw6mRQKbjtc/fIfXJ8IIQxXxxWZlGzbpt6Texhv/v+kfSkV8SvtrC7Ira0+?= =?us-ascii?Q?Oc4MtoZt3fwd6aJniaDGS8zSmxhZ80k9Ri7W4jpUfmTwUtHQxsqjBrKJaA2+?= =?us-ascii?Q?JWPvkkUuOwx8wNa0X65fo0hMGI1CTdqATvwsIwKZtSS7v/TLwJSwQ0U3s1nV?= =?us-ascii?Q?t1Mx9GH6SWZnm991BcA2kKrMafF3+njCmg34cDaKXT5Fj4UguLbDNWNowjJL?= =?us-ascii?Q?KfM6DbXeikVj7uDGjGErb9ohJByBjFg2W6FZq5T+KQhUW6HUdpDrkOgOdyz4?= =?us-ascii?Q?+7E4AnrGcJc50qOzUZ9nMXCFAuOAZqDiUnW6YgxjnajkVNNz9eNkZIbbLMvP?= =?us-ascii?Q?+LvuFn5BBVALsQ7AdwtvP37XYOGncaB4NPOwp9cnwEn6vZLCjSs8kdgFdHjT?= =?us-ascii?Q?mvnpiMf6dpCgYHwRVtIerZwklQJkksqMRS6sFa44uJVgI69tNzAt0zjht55Y?= =?us-ascii?Q?0LwpS0W8hV/d68Uuez5DUkGgCjF2eEvdEZASaW8q2Ka0ypDvgWn/teTllMoJ?= =?us-ascii?Q?wQKwRVUv+VzY9Pl4raZ8IJ/VB1YfgPRHOpBiG0D/0f9G+1bcVccTxZLbSHzM?= =?us-ascii?Q?vMoBLiV77i9cKBCwEW3rhMfXJJ4c2fKXgXReDzSEyaeNM1IHR0xmcFrmxiAP?= =?us-ascii?Q?0WNLTWZmy7G24MypJBEQkE2Awzxlst/ZnxU8LfN5wJzU94bpTdrvem9iRNFU?= =?us-ascii?Q?wAMlNbpaN14ODJGHwlkKw3xb8qxEg8qw8GC3g3XuMwahwg7lMUeiExWZhKgN?= =?us-ascii?Q?Jz/Ju2fm23BSEsRPRMKUmdwom8WmCSJsebt8FRqvKRamwh2on2KDPoa4iq9X?= =?us-ascii?Q?Aw0bskTgVEG+EwzwkM8C4rOnAI/Ht5aO++q/lrRPow2LkkwO5O4m6QR9V9ga?= =?us-ascii?Q?AAkaGtS4SYWkaZxhaHNpAFKlSD1XPYqUnrQ5js0NHtkwIFAZV1pOXRQ=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0708; 6:PuU2gxRGMf6a0StS29U5i4AT1ps4Nu6x0jWLF8qkqvrbui1j/UaKn7D+6UtM1on+XP6s3A4oNxttA0Ob1UTW8UpS9V37E/timlvT37vmgDt5hzKnMzZo3DyaJkml+IE3xGqpAt3LpUSttU+SvdhgMH6J5ofxOXFFTLkCqQvHHZtfnChVYnN+PsppaQuH5B+TZgYFrqV0ALBRuPhuS4V5mRg00hA/Dqq/zIYSNOBZ6GdMdVS8rvAoRymY4Z7k/ujdqmp40KmGZ3zsRlt7V070k0OHXkkUIS0/fL007rMbRD0=; 5:Cz7ORWdvlueU8K9TiIcSmR2Xtno+tKaCOVh1M/QMT7gesrzE253RROWZIAHlpl0WYxsR5WYjnHJlywKO+bnSb4fY2B+sz0CP95VQNVWnykvyebXJibgn25L9I0UAlGT/7OJBaajrT5v6OINyXbQismaW0qxcxTTSxNDKLmYgaoU=; 24:xPuJEe3mJRRDEUGYpOl0QxQQwBGpfvSZUU32ZuMqsGnq6G5ibMlt89YxSiwzDx6yUsGDPq7RzbCdmWm8iqUOZska8qLwy54iX3feGJltNAk=; 7:sRRgqTM7oJvF6if+2IlgqmXQeof0oQvOZn7rxTgCkMud+Zpl+m+9EEy2vN5tbW0zZv0yKuYmDoxRakSZIpGjX+2euG3JckcgpeHL80wwdK207zQBQmPif2Gp35wGkhSrYysx0/rDcORMGLpl8LvM/m+EZrsNnY1Qu/srVjkJ9mHMawGr6FAGelt+PuUvcCvOjl48kfeO99MFYkjdZhwcRBGuZ4JWJ8nM7BTINQoCVvDimxx/dNFle0iBENVuE5wc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 13:58:13.2150 (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: BN1PR0301MB0708 Subject: [dpdk-dev] [PATCH v8 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: Fri, 26 Aug 2016 13:58: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 fa00e52..0bbe130 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