drivers: remove static driver names
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Sat, 9 Jul 2016 01:06:11 +0000 (02:06 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 10 Jul 2016 12:51:09 +0000 (14:51 +0200)
Since now the PMD_REGISTER_DRIVER macro sets the driver names,
there is no need to have the rte_driver structure setting it
statically, as it will get overridden.

Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
16 files changed:
drivers/net/af_packet/rte_eth_af_packet.c
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bonding/rte_eth_bond_pmd.c
drivers/net/cxgbe/cxgbe_ethdev.c
drivers/net/ena/ena_ethdev.c
drivers/net/mlx4/mlx4.c
drivers/net/mlx5/mlx5.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/szedata2/rte_eth_szedata2.c
drivers/net/thunderx/nicvf_ethdev.c
drivers/net/vhost/rte_eth_vhost.c
drivers/net/virtio/virtio_user_ethdev.c
drivers/net/xenvirt/rte_eth_xenvirt.c

index 1d48e97..238eed8 100644 (file)
@@ -890,7 +890,6 @@ rte_pmd_af_packet_devuninit(const char *name)
 }
 
 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,
index 9531abf..9a2123e 100644 (file)
@@ -1041,7 +1041,6 @@ static int bnxt_rte_pmd_init(const char *name, const char *params __rte_unused)
 }
 
 static struct rte_driver bnxt_pmd_drv = {
-       .name = "eth_bnxt",
        .type = PMD_PDEV,
        .init = bnxt_rte_pmd_init,
 };
index c373746..0361be3 100644 (file)
@@ -2509,7 +2509,6 @@ bond_ethdev_configure(struct rte_eth_dev *dev)
 }
 
 static struct rte_driver bond_drv = {
-       .name = "eth_bond",
        .type = PMD_VDEV,
        .init = bond_init,
        .uninit = bond_uninit,
index 7e0e819..0c12bec 100644 (file)
@@ -1056,7 +1056,6 @@ static int rte_cxgbe_pmd_init(const char *name __rte_unused,
 }
 
 static struct rte_driver rte_cxgbe_driver = {
-       .name = "cxgbe_driver",
        .type = PMD_PDEV,
        .init = rte_cxgbe_pmd_init,
 };
index 702289b..11c7218 100644 (file)
@@ -1445,7 +1445,6 @@ rte_ena_pmd_init(const char *name __rte_unused,
 };
 
 struct rte_driver ena_pmd_drv = {
-       .name = "ena_driver",
        .type = PMD_PDEV,
        .init = rte_ena_pmd_init,
 };
index d9ffb13..8e1f7cb 100644 (file)
@@ -5857,7 +5857,6 @@ rte_mlx4_pmd_init(const char *name, const char *args)
 
 static struct rte_driver rte_mlx4_driver = {
        .type = PMD_PDEV,
-       .name = MLX4_DRIVER_NAME,
        .init = rte_mlx4_pmd_init,
 };
 
index 8d32252..d96a9af 100644 (file)
@@ -758,7 +758,6 @@ rte_mlx5_pmd_init(const char *name, const char *args)
 
 static struct rte_driver rte_mlx5_driver = {
        .type = PMD_PDEV,
-       .name = MLX5_DRIVER_NAME,
        .init = rte_mlx5_pmd_init,
 };
 
index 64f4251..93f8730 100644 (file)
@@ -1624,13 +1624,11 @@ rte_pmd_mpipe_devinit(const char *ifname,
 }
 
 static struct rte_driver pmd_mpipe_xgbe_drv = {
-       .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,
 };
index ae0ff77..367b884 100644 (file)
@@ -687,7 +687,6 @@ rte_pmd_null_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_null_drv = {
-       .name = "eth_null",
        .type = PMD_VDEV,
        .init = rte_pmd_null_devinit,
        .uninit = rte_pmd_null_devuninit,
index 7125823..1bcd7e5 100644 (file)
@@ -1084,7 +1084,6 @@ rte_pmd_pcap_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_pcap_drv = {
-       .name = "eth_pcap",
        .type = PMD_VDEV,
        .init = rte_pmd_pcap_devinit,
        .uninit = rte_pmd_pcap_devuninit,
index f2f5217..dee5038 100644 (file)
@@ -624,7 +624,6 @@ rte_pmd_ring_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_ring_drv = {
-       .name = "eth_ring",
        .type = PMD_VDEV,
        .init = rte_pmd_ring_devinit,
        .uninit = rte_pmd_ring_devuninit,
index e71bce5..483d789 100644 (file)
@@ -62,7 +62,7 @@
  */
 #define RTE_SZE2_PACKET_HEADER_SIZE_ALIGNED 8
 
-#define RTE_SZEDATA2_DRIVER_NAME "rte_szedata2_pmd"
+#define RTE_SZEDATA2_DRIVER_NAME rte_szedata2_pmd
 #define RTE_SZEDATA2_PCI_DRIVER_NAME "rte_szedata2_pmd"
 
 #define SZEDATA2_DEV_PATH_FMT "/dev/szedataII%u"
@@ -1596,10 +1596,9 @@ rte_szedata2_uninit(const char *name __rte_unused)
 
 static struct rte_driver rte_szedata2_driver = {
        .type = PMD_PDEV,
-       .name = RTE_SZEDATA2_DRIVER_NAME,
        .init = rte_szedata2_init,
        .uninit = rte_szedata2_uninit,
 };
 
-PMD_REGISTER_DRIVER(rte_szedata2_driver, rte_szedata2_pmd);
-DRIVER_REGISTER_PCI_TABLE(rte_szedata2_pmd, rte_szedata2_pci_id_table);
+PMD_REGISTER_DRIVER(rte_szedata2_driver, RTE_SZEDATA2_DRIVER_NAME);
+DRIVER_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table);
index 03bf458..6e58d82 100644 (file)
@@ -1783,7 +1783,6 @@ rte_nicvf_pmd_init(const char *name __rte_unused, const char *para __rte_unused)
 }
 
 static struct rte_driver rte_nicvf_driver = {
-       .name = "nicvf_driver",
        .type = PMD_PDEV,
        .init = rte_nicvf_pmd_init,
 };
index a02dd55..e42ee2c 100644 (file)
@@ -915,7 +915,6 @@ rte_pmd_vhost_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_vhost_drv = {
-       .name = "eth_vhost",
        .type = PMD_VDEV,
        .init = rte_pmd_vhost_devinit,
        .uninit = rte_pmd_vhost_devuninit,
index 2ed4380..8eb166e 100644 (file)
@@ -431,7 +431,6 @@ virtio_user_pmd_devuninit(const char *name)
 }
 
 static struct rte_driver virtio_user_driver = {
-       .name   = "virtio-user",
        .type   = PMD_VDEV,
        .init   = virtio_user_pmd_devinit,
        .uninit = virtio_user_pmd_devuninit,
index 5122559..b940e94 100644 (file)
@@ -760,7 +760,6 @@ rte_pmd_xenvirt_devuninit(const char *name)
 }
 
 static struct rte_driver pmd_xenvirt_drv = {
-       .name = "eth_xenvirt",
        .type = PMD_VDEV,
        .init = rte_pmd_xenvirt_devinit,
        .uninit = rte_pmd_xenvirt_devuninit,