From: Jan Viktorin Date: Tue, 20 Sep 2016 12:41:30 +0000 (+0530) Subject: eal: remove unused PMD types X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2695c6df698400c0d9a48b982f1e902a43018305;p=dpdk.git eal: remove unused PMD types - All devices register themselfs by calling a kind of DRIVER_REGISTER_XXX. The PMD_REGISTER_DRIVER is not used anymore. - PMD_VDEV type is also not being used - can be removed from all VDEVs. Signed-off-by: Jan Viktorin Signed-off-by: Shreyansh Jain Acked-by: David Marchand --- diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index c93ebfe454..fc939fa0da 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -515,9 +515,6 @@ 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 }; diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index 30c07062c7..2047269c50 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -715,9 +715,6 @@ 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 }; diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index ba2829d38d..d1b0b996c3 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -651,9 +651,6 @@ 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 }; diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index 4c12faa9b6..bd139b4f56 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -269,9 +269,6 @@ 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 }; diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 10c6b8376c..c46d7e5e71 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -639,9 +639,6 @@ 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 }; diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 050f8fc56e..5f48ead4b2 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -890,9 +890,6 @@ 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, }; diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index e19fc5ee9d..92024816a6 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2509,9 +2509,6 @@ 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, }; diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index 135b78f6ba..5b2e8cde71 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1624,16 +1624,10 @@ 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, }; static struct rte_vdev_driver pmd_mpipe_gbe_drv = { - .driver = { - .type = PMD_VDEV, - }, .init = rte_pmd_mpipe_devinit, }; diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index c83b62bf0c..2adc43e6bb 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -687,9 +687,6 @@ 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, }; diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 8c7f6eb33d..29cc54ba5d 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1084,9 +1084,6 @@ 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, }; diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 9cdeb51a4e..ee435c19d8 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -624,9 +624,6 @@ 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, }; diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 01a1f18a45..1c41613484 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -925,9 +925,6 @@ 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, }; diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 50de48481a..6afbf39d2c 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -463,9 +463,6 @@ 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, }; diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index 605aba91f4..4ade78cfc5 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -760,9 +760,6 @@ 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, }; diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 8796f97b9f..3d0d2b8210 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -104,20 +104,11 @@ rte_pmd_debug_trace(const char *func_name, const char *fmt, ...) /** Double linked list of device drivers. */ TAILQ_HEAD(rte_driver_list, rte_driver); -/** - * Driver type enumeration - */ -enum pmd_type { - PMD_VDEV = 0, - PMD_PDEV = 1, -}; - /** * A structure describing a device driver. */ struct rte_driver { TAILQ_ENTRY(rte_driver) next; /**< Next in list. */ - enum pmd_type type; /**< PMD Driver type */ const char *name; /**< Driver name. */ }; @@ -198,15 +189,6 @@ int rte_eal_dev_detach(const char *name); static const char DRIVER_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ __attribute__((used)) = RTE_STR(name) -#define PMD_REGISTER_DRIVER(drv, nm)\ -RTE_INIT(probefn_ ##drv);\ -static void probefn_ ##drv(void)\ -{\ - (drv).name = RTE_STR(nm);\ - rte_eal_driver_register(&drv);\ -} \ -DRIVER_EXPORT_NAME(nm, __COUNTER__) - #define DRV_EXP_TAG(name, tag) __##name##_##tag #define DRIVER_REGISTER_PCI_TABLE(name, table) \