eal: remove unused PMD types
authorJan Viktorin <viktorin@rehivetech.com>
Tue, 20 Sep 2016 12:41:30 +0000 (18:11 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Oct 2016 14:33:51 +0000 (16:33 +0200)
- 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 <viktorin@rehivetech.com>
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: David Marchand <david.marchand@6wind.com>
15 files changed:
drivers/crypto/aesni_gcm/aesni_gcm_pmd.c
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/kasumi/rte_kasumi_pmd.c
drivers/crypto/null/null_crypto_pmd.c
drivers/crypto/snow3g/rte_snow3g_pmd.c
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/mpipe/mpipe_tilegx.c
drivers/net/null/rte_eth_null.c
drivers/net/pcap/rte_eth_pcap.c
drivers/net/ring/rte_eth_ring.c
drivers/net/vhost/rte_eth_vhost.c
drivers/net/virtio/virtio_user_ethdev.c
drivers/net/xenvirt/rte_eth_xenvirt.c
lib/librte_eal/common/include/rte_dev.h

index c93ebfe..fc939fa 100644 (file)
@@ -515,9 +515,6 @@ aesni_gcm_uninit(const char *name)
 }
 
 static struct rte_vdev_driver aesni_gcm_pmd_drv = {
 }
 
 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
 };
index 30c0706..2047269 100644 (file)
@@ -715,9 +715,6 @@ cryptodev_aesni_mb_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = {
 }
 
 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
 };
index ba2829d..d1b0b99 100644 (file)
@@ -651,9 +651,6 @@ cryptodev_kasumi_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = {
 }
 
 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
 };
index 4c12faa..bd139b4 100644 (file)
@@ -269,9 +269,6 @@ cryptodev_null_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_null_pmd_drv = {
 }
 
 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
 };
index 10c6b83..c46d7e5 100644 (file)
@@ -639,9 +639,6 @@ cryptodev_snow3g_uninit(const char *name)
 }
 
 static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = {
 }
 
 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
 };
index 050f8fc..5f48ead 100644 (file)
@@ -890,9 +890,6 @@ rte_pmd_af_packet_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_af_packet_drv = {
 }
 
 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,
 };
index e19fc5e..9202481 100644 (file)
@@ -2509,9 +2509,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 }
 
 static struct rte_vdev_driver bond_drv = {
 }
 
 static struct rte_vdev_driver bond_drv = {
-       .driver = {
-               .type = PMD_VDEV,
-       },
        .init = bond_init,
        .uninit = bond_uninit,
 };
        .init = bond_init,
        .uninit = bond_uninit,
 };
index 135b78f..5b2e8cd 100644 (file)
@@ -1624,16 +1624,10 @@ rte_pmd_mpipe_devinit(const char *ifname,
 }
 
 static struct rte_vdev_driver pmd_mpipe_xgbe_drv = {
 }
 
 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 = {
        .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,
 };
 
index c83b62b..2adc43e 100644 (file)
@@ -687,9 +687,6 @@ rte_pmd_null_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_null_drv = {
 }
 
 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,
 };
index 8c7f6eb..29cc54b 100644 (file)
@@ -1084,9 +1084,6 @@ rte_pmd_pcap_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_pcap_drv = {
 }
 
 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,
 };
index 9cdeb51..ee435c1 100644 (file)
@@ -624,9 +624,6 @@ rte_pmd_ring_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_ring_drv = {
 }
 
 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,
 };
index 01a1f18..1c41613 100644 (file)
@@ -925,9 +925,6 @@ rte_pmd_vhost_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_vhost_drv = {
 }
 
 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,
 };
index 50de484..6afbf39 100644 (file)
@@ -463,9 +463,6 @@ virtio_user_pmd_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver virtio_user_driver = {
 }
 
 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,
 };
index 605aba9..4ade78c 100644 (file)
@@ -760,9 +760,6 @@ rte_pmd_xenvirt_devuninit(const char *name)
 }
 
 static struct rte_vdev_driver pmd_xenvirt_drv = {
 }
 
 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,
 };
index 8796f97..3d0d2b8 100644 (file)
@@ -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);
 
 /** 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. */
 /**
  * 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. */
 };
 
        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)
 
 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) \
 #define DRV_EXP_TAG(name, tag) __##name##_##tag
 
 #define DRIVER_REGISTER_PCI_TABLE(name, table) \