From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from wes1-so1.wedos.net (wes1-so1.wedos.net [46.28.106.15]) by dpdk.org (Postfix) with ESMTP id 5AEA2ADB7 for ; Fri, 8 Jul 2016 21:10:36 +0200 (CEST) Received: from pcviktorin.fit.vutbr.cz (pcviktorin.fit.vutbr.cz [147.229.13.147]) by wes1-so1.wedos.net (Postfix) with ESMTPSA id 3rmPG411k7zCCD; Fri, 8 Jul 2016 21:10:36 +0200 (CEST) From: Jan Viktorin To: dev@dpdk.org Cc: Jan Viktorin , Shreyansh Jain , thomas.monjalon@6wind.com, David Marchand Date: Fri, 8 Jul 2016 21:09:34 +0200 Message-Id: <20160708190945.24225-5-viktorin@rehivetech.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160708190945.24225-1-viktorin@rehivetech.com> References: <20160708190945.24225-1-viktorin@rehivetech.com> Subject: [dpdk-dev] [PATCH v1 04/15] drivers: convert PMD_VDEV drivers to use 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, 08 Jul 2016 19:10:36 -0000 All PMD_VDEV drivers can now use rte_vdev_driver instead of the rte_driver (which is embedded in the rte_vdev_driver). Signed-off-by: Jan Viktorin --- drivers/crypto/aesni_gcm/aesni_gcm_pmd.c | 16 +++++++++------- drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 16 +++++++++------- drivers/crypto/kasumi/rte_kasumi_pmd.c | 16 +++++++++------- drivers/crypto/null/null_crypto_pmd.c | 16 +++++++++------- drivers/crypto/snow3g/rte_snow3g_pmd.c | 16 +++++++++------- drivers/net/af_packet/rte_eth_af_packet.c | 16 +++++++++------- drivers/net/bonding/rte_eth_bond_pmd.c | 16 +++++++++------- drivers/net/mpipe/mpipe_tilegx.c | 26 +++++++++++++++----------- drivers/net/null/rte_eth_null.c | 16 +++++++++------- drivers/net/pcap/rte_eth_pcap.c | 16 +++++++++------- drivers/net/ring/rte_eth_ring.c | 16 +++++++++------- drivers/net/vhost/rte_eth_vhost.c | 16 +++++++++------- drivers/net/xenvirt/rte_eth_xenvirt.c | 16 +++++++++------- 13 files changed, 123 insertions(+), 95 deletions(-) diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 2987ef6..e6720e8 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -514,11 +514,13 @@ aesni_gcm_uninit(const char *name) return 0; } -static struct rte_driver aesni_gcm_pmd_drv = { - .name = CRYPTODEV_NAME_AESNI_GCM_PMD, - .type = PMD_VDEV, - .init = aesni_gcm_init, - .uninit = aesni_gcm_uninit +static struct rte_vdev_driver aesni_gcm_pmd_drv = { + .driver = { + .name = CRYPTODEV_NAME_AESNI_GCM_PMD, + .type = PMD_VDEV, + .init = aesni_gcm_init, + .uninit = aesni_gcm_uninit + }, }; -PMD_REGISTER_DRIVER(aesni_gcm_pmd_drv); +RTE_EAL_VDRV_REGISTER(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 6554fc4..6c6420b 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include @@ -714,11 +714,13 @@ cryptodev_aesni_mb_uninit(const char *name) return 0; } -static struct rte_driver cryptodev_aesni_mb_pmd_drv = { - .name = CRYPTODEV_NAME_AESNI_MB_PMD, - .type = PMD_VDEV, - .init = cryptodev_aesni_mb_init, - .uninit = cryptodev_aesni_mb_uninit +static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = { + .driver = { + .name = CRYPTODEV_NAME_AESNI_MB_PMD, + .type = PMD_VDEV, + .init = cryptodev_aesni_mb_init, + .uninit = cryptodev_aesni_mb_uninit + }, }; -PMD_REGISTER_DRIVER(cryptodev_aesni_mb_pmd_drv); +RTE_EAL_VDRV_REGISTER(cryptodev_aesni_mb_pmd_drv); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 0bf415d..91181c4 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -648,11 +648,13 @@ cryptodev_kasumi_uninit(const char *name) return 0; } -static struct rte_driver cryptodev_kasumi_pmd_drv = { - .name = CRYPTODEV_NAME_KASUMI_PMD, - .type = PMD_VDEV, - .init = cryptodev_kasumi_init, - .uninit = cryptodev_kasumi_uninit +static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = { + .driver = { + .name = CRYPTODEV_NAME_KASUMI_PMD, + .type = PMD_VDEV, + .init = cryptodev_kasumi_init, + .uninit = cryptodev_kasumi_uninit + }, }; -PMD_REGISTER_DRIVER(cryptodev_kasumi_pmd_drv); +RTE_EAL_VDRV_REGISTER(cryptodev_kasumi_pmd_drv); diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index bdaf13c..a015ee5 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include "null_crypto_pmd_private.h" @@ -268,11 +268,13 @@ cryptodev_null_uninit(const char *name) return 0; } -static struct rte_driver cryptodev_null_pmd_drv = { - .name = CRYPTODEV_NAME_NULL_PMD, - .type = PMD_VDEV, - .init = cryptodev_null_init, - .uninit = cryptodev_null_uninit +static struct rte_vdev_driver cryptodev_null_pmd_drv = { + .driver = { + .name = CRYPTODEV_NAME_NULL_PMD, + .type = PMD_VDEV, + .init = cryptodev_null_init, + .uninit = cryptodev_null_uninit + }, }; -PMD_REGISTER_DRIVER(cryptodev_null_pmd_drv); +RTE_EAL_VDRV_REGISTER(cryptodev_null_pmd_drv); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 6d59de7..060e819 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include @@ -639,11 +639,13 @@ cryptodev_snow3g_uninit(const char *name) return 0; } -static struct rte_driver cryptodev_snow3g_pmd_drv = { - .name = CRYPTODEV_NAME_SNOW3G_PMD, - .type = PMD_VDEV, - .init = cryptodev_snow3g_init, - .uninit = cryptodev_snow3g_uninit +static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = { + .driver = { + .name = CRYPTODEV_NAME_SNOW3G_PMD, + .type = PMD_VDEV, + .init = cryptodev_snow3g_init, + .uninit = cryptodev_snow3g_uninit + }, }; -PMD_REGISTER_DRIVER(cryptodev_snow3g_pmd_drv); +RTE_EAL_VDRV_REGISTER(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 36ac102..a42e1b4 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include @@ -871,11 +871,13 @@ rte_pmd_af_packet_devuninit(const char *name) return 0; } -static struct rte_driver pmd_af_packet_drv = { - .name = "eth_af_packet", - .type = PMD_VDEV, - .init = rte_pmd_af_packet_devinit, - .uninit = rte_pmd_af_packet_devuninit, +static struct rte_vdev_driver pmd_af_packet_drv = { + .driver = { + .name = "eth_af_packet", + .type = PMD_VDEV, + .init = rte_pmd_af_packet_devinit, + .uninit = rte_pmd_af_packet_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_af_packet_drv); +RTE_EAL_VDRV_REGISTER(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 129f04b..01e94b8 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -42,7 +42,7 @@ #include #include #include -#include +#include #include #include @@ -2504,11 +2504,13 @@ bond_ethdev_configure(struct rte_eth_dev *dev) return 0; } -static struct rte_driver bond_drv = { - .name = "eth_bond", - .type = PMD_VDEV, - .init = bond_init, - .uninit = bond_uninit, +static struct rte_vdev_driver bond_drv = { + .driver = { + .name = "eth_bond", + .type = PMD_VDEV, + .init = bond_init, + .uninit = bond_uninit, + }, }; -PMD_REGISTER_DRIVER(bond_drv); +RTE_EAL_VDRV_REGISTER(bond_drv); diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 9de556e..fd8c7a4 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include #include #include @@ -1623,20 +1623,24 @@ rte_pmd_mpipe_devinit(const char *ifname, return 0; } -static struct rte_driver pmd_mpipe_xgbe_drv = { - .name = "xgbe", - .type = PMD_VDEV, - .init = rte_pmd_mpipe_devinit, +static struct rte_vdev_driver pmd_mpipe_xgbe_drv = { + .driver = { + .name = "xgbe", + .type = PMD_VDEV, + .init = rte_pmd_mpipe_devinit, + }, }; -static struct rte_driver pmd_mpipe_gbe_drv = { - .name = "gbe", - .type = PMD_VDEV, - .init = rte_pmd_mpipe_devinit, +static struct rte_vdev_driver pmd_mpipe_gbe_drv = { + .driver = { + .name = "gbe", + .type = PMD_VDEV, + .init = rte_pmd_mpipe_devinit, + }, }; -PMD_REGISTER_DRIVER(pmd_mpipe_xgbe_drv); -PMD_REGISTER_DRIVER(pmd_mpipe_gbe_drv); +RTE_EAL_VDRV_REGISTER(pmd_mpipe_xgbe_drv); +RTE_EAL_VDRV_REGISTER(pmd_mpipe_gbe_drv); static void __attribute__((constructor, used)) mpipe_init_contexts(void) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index e6c74a6..56370c9 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include @@ -682,11 +682,13 @@ rte_pmd_null_devuninit(const char *name) return 0; } -static struct rte_driver pmd_null_drv = { - .name = "eth_null", - .type = PMD_VDEV, - .init = rte_pmd_null_devinit, - .uninit = rte_pmd_null_devuninit, +static struct rte_vdev_driver pmd_null_drv = { + .driver = { + .name = "eth_null", + .type = PMD_VDEV, + .init = rte_pmd_null_devinit, + .uninit = rte_pmd_null_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_null_drv); +RTE_EAL_VDRV_REGISTER(pmd_null_drv); diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 2d00d04..d59d9bb 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include @@ -1083,11 +1083,13 @@ rte_pmd_pcap_devuninit(const char *name) return 0; } -static struct rte_driver pmd_pcap_drv = { - .name = "eth_pcap", - .type = PMD_VDEV, - .init = rte_pmd_pcap_devinit, - .uninit = rte_pmd_pcap_devuninit, +static struct rte_vdev_driver pmd_pcap_drv = { + .driver = { + .name = "eth_pcap", + .type = PMD_VDEV, + .init = rte_pmd_pcap_devinit, + .uninit = rte_pmd_pcap_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_pcap_drv); +RTE_EAL_VDRV_REGISTER(pmd_pcap_drv); diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index b78d1cf..ff15cfd 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include @@ -623,11 +623,13 @@ rte_pmd_ring_devuninit(const char *name) return 0; } -static struct rte_driver pmd_ring_drv = { - .name = "eth_ring", - .type = PMD_VDEV, - .init = rte_pmd_ring_devinit, - .uninit = rte_pmd_ring_devuninit, +static struct rte_vdev_driver pmd_ring_drv = { + .driver = { + .name = "eth_ring", + .type = PMD_VDEV, + .init = rte_pmd_ring_devinit, + .uninit = rte_pmd_ring_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_ring_drv); +RTE_EAL_VDRV_REGISTER(pmd_ring_drv); diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 4e99360..f10944b 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include @@ -917,11 +917,13 @@ rte_pmd_vhost_devuninit(const char *name) return 0; } -static struct rte_driver pmd_vhost_drv = { - .name = "eth_vhost", - .type = PMD_VDEV, - .init = rte_pmd_vhost_devinit, - .uninit = rte_pmd_vhost_devuninit, +static struct rte_vdev_driver pmd_vhost_drv = { + .driver = { + .name = "eth_vhost", + .type = PMD_VDEV, + .init = rte_pmd_vhost_devinit, + .uninit = rte_pmd_vhost_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_vhost_drv); +RTE_EAL_VDRV_REGISTER(pmd_vhost_drv); diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index 72861d8..1e1a876 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -53,7 +53,7 @@ #include #include #include -#include +#include #include #include @@ -756,11 +756,13 @@ rte_pmd_xenvirt_devuninit(const char *name) return 0; } -static struct rte_driver pmd_xenvirt_drv = { - .name = "eth_xenvirt", - .type = PMD_VDEV, - .init = rte_pmd_xenvirt_devinit, - .uninit = rte_pmd_xenvirt_devuninit, +static struct rte_vdev_driver pmd_xenvirt_drv = { + .driver = { + .name = "eth_xenvirt", + .type = PMD_VDEV, + .init = rte_pmd_xenvirt_devinit, + .uninit = rte_pmd_xenvirt_devuninit, + }, }; -PMD_REGISTER_DRIVER(pmd_xenvirt_drv); +RTE_EAL_VDRV_REGISTER(pmd_xenvirt_drv); -- 2.9.0