From 01f1922786a1e81672ac1ad576295ca47196bcbe Mon Sep 17 00:00:00 2001 From: Shreyansh Jain Date: Mon, 10 Oct 2016 11:13:15 +0530 Subject: [PATCH] drivers: rename register macro prefix All macros related to driver registeration renamed from DRIVER_* to RTE_PMD_* This includes: DRIVER_REGISTER_PCI -> RTE_PMD_REGISTER_PCI DRIVER_REGISTER_PCI_TABLE -> RTE_PMD_REGISTER_PCI_TABLE DRIVER_REGISTER_VDEV -> RTE_PMD_REGISTER_VDEV DRIVER_REGISTER_PARAM_STRING -> RTE_PMD_REGISTER_PARAM_STRING DRIVER_EXPORT_* -> RTE_PMD_EXPORT_* Fix PMDINFOGEN tool to look for matches of RTE_PMD_REGISTER_*. Signed-off-by: Shreyansh Jain Acked-by: Thomas Monjalon --- doc/guides/prog_guide/dev_kit_build_system.rst | 2 +- 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/libcrypto/rte_libcrypto_pmd.c | 5 +++-- drivers/crypto/null/null_crypto_pmd.c | 4 ++-- drivers/crypto/qat/rte_qat_cryptodev.c | 4 ++-- drivers/crypto/snow3g/rte_snow3g_pmd.c | 4 ++-- drivers/crypto/zuc/rte_zuc_pmd.c | 4 ++-- drivers/net/af_packet/rte_eth_af_packet.c | 4 ++-- drivers/net/bnx2x/bnx2x_ethdev.c | 8 ++++---- drivers/net/bnxt/bnxt_ethdev.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- drivers/net/cxgbe/cxgbe_ethdev.c | 4 ++-- drivers/net/e1000/em_ethdev.c | 4 ++-- drivers/net/e1000/igb_ethdev.c | 8 ++++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_ethdev.c | 4 ++-- drivers/net/fm10k/fm10k_ethdev.c | 4 ++-- drivers/net/i40e/i40e_ethdev.c | 4 ++-- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.c | 8 ++++---- drivers/net/mlx4/mlx4.c | 4 ++-- drivers/net/mlx5/mlx5.c | 4 ++-- drivers/net/mpipe/mpipe_tilegx.c | 4 ++-- drivers/net/nfp/nfp_net.c | 4 ++-- drivers/net/null/rte_eth_null.c | 4 ++-- drivers/net/pcap/rte_eth_pcap.c | 4 ++-- drivers/net/qede/qede_ethdev.c | 8 ++++---- drivers/net/ring/rte_eth_ring.c | 4 ++-- drivers/net/szedata2/rte_eth_szedata2.c | 4 ++-- drivers/net/thunderx/nicvf_ethdev.c | 4 ++-- drivers/net/vhost/rte_eth_vhost.c | 4 ++-- drivers/net/virtio/virtio_ethdev.c | 4 ++-- drivers/net/virtio/virtio_user_ethdev.c | 4 ++-- drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++-- drivers/net/xenvirt/rte_eth_xenvirt.c | 4 ++-- lib/librte_eal/common/eal_common_dev.c | 2 +- lib/librte_eal/common/include/rte_dev.h | 10 +++++----- lib/librte_eal/common/include/rte_pci.h | 4 ++-- lib/librte_eal/common/include/rte_vdev.h | 4 ++-- mk/internal/rte.compile-pre.mk | 2 +- 42 files changed, 93 insertions(+), 92 deletions(-) diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst index 05358d06f8..19de156360 100644 --- a/doc/guides/prog_guide/dev_kit_build_system.rst +++ b/doc/guides/prog_guide/dev_kit_build_system.rst @@ -264,7 +264,7 @@ instance the macro: .. code-block:: c - DRIVER_REGISTER_PCI(name, drv) + RTE_PMD_REGISTER_PCI(name, drv) Creates the following symbol: diff --git a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c index 76dce9cc51..0b3fd096e3 100644 --- a/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c +++ b/drivers/crypto/aesni_gcm/aesni_gcm_pmd.c @@ -528,8 +528,8 @@ static struct rte_vdev_driver aesni_gcm_pmd_drv = { .remove = aesni_gcm_remove }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_GCM_PMD, aesni_gcm_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_GCM_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c index ff2fc25e18..b936735383 100644 --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c @@ -719,8 +719,8 @@ static struct rte_vdev_driver cryptodev_aesni_mb_pmd_drv = { .remove = cryptodev_aesni_mb_remove }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_AESNI_MB_PMD, cryptodev_aesni_mb_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_AESNI_MB_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/kasumi/rte_kasumi_pmd.c b/drivers/crypto/kasumi/rte_kasumi_pmd.c index 03e7272391..11bbf807f5 100644 --- a/drivers/crypto/kasumi/rte_kasumi_pmd.c +++ b/drivers/crypto/kasumi/rte_kasumi_pmd.c @@ -655,8 +655,8 @@ static struct rte_vdev_driver cryptodev_kasumi_pmd_drv = { .remove = cryptodev_kasumi_remove }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_KASUMI_PMD, cryptodev_kasumi_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_KASUMI_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/libcrypto/rte_libcrypto_pmd.c b/drivers/crypto/libcrypto/rte_libcrypto_pmd.c index 535fb5795a..e991c57991 100644 --- a/drivers/crypto/libcrypto/rte_libcrypto_pmd.c +++ b/drivers/crypto/libcrypto/rte_libcrypto_pmd.c @@ -1054,8 +1054,9 @@ static struct rte_vdev_driver cryptodev_libcrypto_pmd_drv = { .remove = cryptodev_libcrypto_uninit }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_LIBCRYPTO_PMD, cryptodev_libcrypto_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_LIBCRYPTO_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_LIBCRYPTO_PMD, + cryptodev_libcrypto_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_LIBCRYPTO_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/null/null_crypto_pmd.c b/drivers/crypto/null/null_crypto_pmd.c index e41e8190c9..a7d3600890 100644 --- a/drivers/crypto/null/null_crypto_pmd.c +++ b/drivers/crypto/null/null_crypto_pmd.c @@ -273,8 +273,8 @@ static struct rte_vdev_driver cryptodev_null_pmd_drv = { .remove = cryptodev_null_remove }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_NULL_PMD, cryptodev_null_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_NULL_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index 4846b30f3f..1e7ee61c14 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -129,6 +129,6 @@ static struct rte_cryptodev_driver rte_qat_pmd = { .dev_private_size = sizeof(struct qat_pmd_private), }; -DRIVER_REGISTER_PCI(CRYPTODEV_NAME_QAT_SYM_PMD, rte_qat_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(CRYPTODEV_NAME_QAT_SYM_PMD, pci_id_qat_map); +RTE_PMD_REGISTER_PCI(CRYPTODEV_NAME_QAT_SYM_PMD, rte_qat_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(CRYPTODEV_NAME_QAT_SYM_PMD, pci_id_qat_map); diff --git a/drivers/crypto/snow3g/rte_snow3g_pmd.c b/drivers/crypto/snow3g/rte_snow3g_pmd.c index 60d896901a..a7942519a6 100644 --- a/drivers/crypto/snow3g/rte_snow3g_pmd.c +++ b/drivers/crypto/snow3g/rte_snow3g_pmd.c @@ -643,8 +643,8 @@ static struct rte_vdev_driver cryptodev_snow3g_pmd_drv = { .remove = cryptodev_snow3g_remove }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_SNOW3G_PMD, cryptodev_snow3g_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_SNOW3G_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/crypto/zuc/rte_zuc_pmd.c b/drivers/crypto/zuc/rte_zuc_pmd.c index 457f3cabf4..f46a16cf52 100644 --- a/drivers/crypto/zuc/rte_zuc_pmd.c +++ b/drivers/crypto/zuc/rte_zuc_pmd.c @@ -543,8 +543,8 @@ static struct rte_vdev_driver cryptodev_zuc_pmd_drv = { .remove = cryptodev_zuc_uninit }; -DRIVER_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv); -DRIVER_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD, +RTE_PMD_REGISTER_VDEV(CRYPTODEV_NAME_ZUC_PMD, cryptodev_zuc_pmd_drv); +RTE_PMD_REGISTER_PARAM_STRING(CRYPTODEV_NAME_ZUC_PMD, "max_nb_queue_pairs= " "max_nb_sessions= " "socket_id="); diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index 6777c41b52..201c1be789 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -894,8 +894,8 @@ static struct rte_vdev_driver pmd_af_packet_drv = { .remove = rte_pmd_af_packet_remove, }; -DRIVER_REGISTER_VDEV(net_af_packet, pmd_af_packet_drv); -DRIVER_REGISTER_PARAM_STRING(net_af_packet, +RTE_PMD_REGISTER_VDEV(net_af_packet, pmd_af_packet_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_af_packet, "iface= " "qpairs= " "blocksz= " diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c index 7375a4e250..0eae433f22 100644 --- a/drivers/net/bnx2x/bnx2x_ethdev.c +++ b/drivers/net/bnx2x/bnx2x_ethdev.c @@ -641,7 +641,7 @@ static struct eth_driver rte_bnx2xvf_pmd = { .dev_private_size = sizeof(struct bnx2x_softc), }; -DRIVER_REGISTER_PCI(net_bnx2x, rte_bnx2x_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_bnx2x, pci_id_bnx2x_map); -DRIVER_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map); +RTE_PMD_REGISTER_PCI(net_bnx2x, rte_bnx2x_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_bnx2x, pci_id_bnx2x_map); +RTE_PMD_REGISTER_PCI(net_bnx2xvf, rte_bnx2xvf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_bnx2xvf, pci_id_bnx2xvf_map); diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 791ab91a34..2a950318ca 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -1201,5 +1201,5 @@ static struct eth_driver bnxt_rte_pmd = { .dev_private_size = sizeof(struct bnxt), }; -DRIVER_REGISTER_PCI(net_bnxt, bnxt_rte_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map); +RTE_PMD_REGISTER_PCI(net_bnxt, bnxt_rte_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_bnxt, bnxt_pci_id_map); diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index fb4050c272..4d02a6bd5b 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -2559,9 +2559,9 @@ static struct rte_vdev_driver bond_drv = { .remove = bond_remove, }; -DRIVER_REGISTER_VDEV(net_bonding, bond_drv); +RTE_PMD_REGISTER_VDEV(net_bonding, bond_drv); -DRIVER_REGISTER_PARAM_STRING(net_bonding, +RTE_PMD_REGISTER_PARAM_STRING(net_bonding, "slave= " "primary= " "mode=[0-6] " diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c index d3ff94a7b2..b7f28ebbc6 100644 --- a/drivers/net/cxgbe/cxgbe_ethdev.c +++ b/drivers/net/cxgbe/cxgbe_ethdev.c @@ -1048,5 +1048,5 @@ static struct eth_driver rte_cxgbe_pmd = { .dev_private_size = sizeof(struct port_info), }; -DRIVER_REGISTER_PCI(net_cxgbe, rte_cxgbe_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_cxgbe, cxgb4_pci_tbl); +RTE_PMD_REGISTER_PCI(net_cxgbe, rte_cxgbe_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_cxgbe, cxgb4_pci_tbl); diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index f767e1cc2b..99d07f0598 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -1793,5 +1793,5 @@ eth_em_set_mc_addr_list(struct rte_eth_dev *dev, return 0; } -DRIVER_REGISTER_PCI(net_e1000_em, rte_em_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map); +RTE_PMD_REGISTER_PCI(net_e1000_em, rte_em_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_e1000_em, pci_id_em_map); diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 5a1a83e373..1a7d9b8733 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -5226,7 +5226,7 @@ eth_igb_configure_msix_intr(struct rte_eth_dev *dev) E1000_WRITE_FLUSH(hw); } -DRIVER_REGISTER_PCI(net_e1000_igb, rte_igb_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_e1000_igb, pci_id_igb_map); -DRIVER_REGISTER_PCI(net_e1000_igb_vf, rte_igbvf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_e1000_igb_vf, pci_id_igbvf_map); +RTE_PMD_REGISTER_PCI(net_e1000_igb, rte_igb_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_e1000_igb, pci_id_igb_map); +RTE_PMD_REGISTER_PCI(net_e1000_igb_vf, rte_igbvf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_e1000_igb_vf, pci_id_igbvf_map); diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 3ce26b9dd2..737ae87ee6 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -1697,5 +1697,5 @@ static struct eth_driver rte_ena_pmd = { .dev_private_size = sizeof(struct ena_adapter), }; -DRIVER_REGISTER_PCI(net_ena, rte_ena_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map); +RTE_PMD_REGISTER_PCI(net_ena, rte_ena_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_ena, pci_id_ena_map); diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index a9a8484cd5..d380d73653 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -647,5 +647,5 @@ static struct eth_driver rte_enic_pmd = { .dev_private_size = sizeof(struct enic), }; -DRIVER_REGISTER_PCI(net_enic, rte_enic_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_enic, pci_id_enic_map); +RTE_PMD_REGISTER_PCI(net_enic, rte_enic_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_enic, pci_id_enic_map); diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 372564bc0a..c804436964 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3071,5 +3071,5 @@ static struct eth_driver rte_pmd_fm10k = { .dev_private_size = sizeof(struct fm10k_adapter), }; -DRIVER_REGISTER_PCI(net_fm10k, rte_pmd_fm10k.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map); +RTE_PMD_REGISTER_PCI(net_fm10k, rte_pmd_fm10k.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_fm10k, pci_id_fm10k_map); diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 0a8c12c9b5..c1d2806767 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -702,8 +702,8 @@ rte_i40e_dev_atomic_write_link_status(struct rte_eth_dev *dev, return 0; } -DRIVER_REGISTER_PCI(net_i40e, rte_i40e_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_i40e, pci_id_i40e_map); +RTE_PMD_REGISTER_PCI(net_i40e, rte_i40e_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_i40e, pci_id_i40e_map); #ifndef I40E_GLQF_ORT #define I40E_GLQF_ORT(_i) (0x00268900 + ((_i) * 4)) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 34eb27410e..635a1705f0 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1564,8 +1564,8 @@ static struct eth_driver rte_i40evf_pmd = { .dev_private_size = sizeof(struct i40e_adapter), }; -DRIVER_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map); +RTE_PMD_REGISTER_PCI(net_i40e_vf, rte_i40evf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_i40e_vf, pci_id_i40evf_map); static int i40evf_dev_configure(struct rte_eth_dev *dev) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index cf5e60100a..f1b169a196 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -7592,7 +7592,7 @@ ixgbevf_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle, ixgbevf_dev_interrupt_action(dev); } -DRIVER_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map); -DRIVER_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map); +RTE_PMD_REGISTER_PCI(net_ixgbe, rte_ixgbe_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe, pci_id_ixgbe_map); +RTE_PMD_REGISTER_PCI(net_ixgbe_vf, rte_ixgbevf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_ixgbe_vf, pci_id_ixgbevf_map); diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 1553b2e6af..12ab7daf4c 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -5940,5 +5940,5 @@ rte_mlx4_pmd_init(void) rte_eal_pci_register(&mlx4_driver.pci_drv); } -DRIVER_EXPORT_NAME(net_mlx4, __COUNTER__); -DRIVER_REGISTER_PCI_TABLE(net_mlx4, mlx4_pci_id_map); +RTE_PMD_EXPORT_NAME(net_mlx4, __COUNTER__); +RTE_PMD_REGISTER_PCI_TABLE(net_mlx4, mlx4_pci_id_map); diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 758df6e24f..3678aad859 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -756,5 +756,5 @@ rte_mlx5_pmd_init(void) rte_eal_pci_register(&mlx5_driver.pci_drv); } -DRIVER_EXPORT_NAME(net_mlx5, __COUNTER__); -DRIVER_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map); +RTE_PMD_EXPORT_NAME(net_mlx5, __COUNTER__); +RTE_PMD_REGISTER_PCI_TABLE(net_mlx5, mlx5_pci_id_map); diff --git a/drivers/net/mpipe/mpipe_tilegx.c b/drivers/net/mpipe/mpipe_tilegx.c index b9eefdf328..adf299bee0 100644 --- a/drivers/net/mpipe/mpipe_tilegx.c +++ b/drivers/net/mpipe/mpipe_tilegx.c @@ -1631,8 +1631,8 @@ static struct rte_vdev_driver pmd_mpipe_gbe_drv = { .probe = rte_pmd_mpipe_probe, }; -DRIVER_REGISTER_VDEV(net_mpipe_xgbe, pmd_mpipe_xgbe_drv); -DRIVER_REGISTER_VDEV(net_mpipe_gbe, pmd_mpipe_gbe_drv); +RTE_PMD_REGISTER_VDEV(net_mpipe_xgbe, pmd_mpipe_xgbe_drv); +RTE_PMD_REGISTER_VDEV(net_mpipe_gbe, pmd_mpipe_gbe_drv); static void __attribute__((constructor, used)) mpipe_init_contexts(void) diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c index d526f34a29..faf725c841 100644 --- a/drivers/net/nfp/nfp_net.c +++ b/drivers/net/nfp/nfp_net.c @@ -2479,8 +2479,8 @@ static struct eth_driver rte_nfp_net_pmd = { .dev_private_size = sizeof(struct nfp_net_adapter), }; -DRIVER_REGISTER_PCI(net_nfp, rte_nfp_net_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_nfp, pci_id_nfp_net_map); +RTE_PMD_REGISTER_PCI(net_nfp, rte_nfp_net_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_nfp, pci_id_nfp_net_map); /* * Local variables: diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index c2e10a81ce..0b7cc3756a 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -691,7 +691,7 @@ static struct rte_vdev_driver pmd_null_drv = { .remove = rte_pmd_null_remove, }; -DRIVER_REGISTER_VDEV(net_null, pmd_null_drv); -DRIVER_REGISTER_PARAM_STRING(net_null, +RTE_PMD_REGISTER_VDEV(net_null, pmd_null_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_null, "size= " "copy="); diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 965c999954..0c4711d86e 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -1064,8 +1064,8 @@ static struct rte_vdev_driver pmd_pcap_drv = { .remove = pmd_pcap_remove, }; -DRIVER_REGISTER_VDEV(net_pcap, pmd_pcap_drv); -DRIVER_REGISTER_PARAM_STRING(net_pcap, +RTE_PMD_REGISTER_VDEV(net_pcap, pmd_pcap_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_pcap, ETH_PCAP_RX_PCAP_ARG "= " ETH_PCAP_TX_PCAP_ARG "= " ETH_PCAP_RX_IFACE_ARG "= " diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index d00c1d9a02..452139d44a 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -1502,7 +1502,7 @@ static struct eth_driver rte_qede_pmd = { .dev_private_size = sizeof(struct qede_dev), }; -DRIVER_REGISTER_PCI(net_qede, rte_qede_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_qede, pci_id_qede_map); -DRIVER_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map); +RTE_PMD_REGISTER_PCI(net_qede, rte_qede_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_qede, pci_id_qede_map); +RTE_PMD_REGISTER_PCI(net_qede_vf, rte_qedevf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_qede_vf, pci_id_qedevf_map); diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index b8e3cf7a9c..ee1fb76d5e 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -628,6 +628,6 @@ static struct rte_vdev_driver pmd_ring_drv = { .remove = rte_pmd_ring_remove, }; -DRIVER_REGISTER_VDEV(net_ring, pmd_ring_drv); -DRIVER_REGISTER_PARAM_STRING(net_ring, +RTE_PMD_REGISTER_VDEV(net_ring, pmd_ring_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_ring, ETH_RING_NUMA_NODE_ACTION_ARG "=name:node:action(ATTACH|CREATE)"); diff --git a/drivers/net/szedata2/rte_eth_szedata2.c b/drivers/net/szedata2/rte_eth_szedata2.c index f4ec5ea54d..f3cd52dc49 100644 --- a/drivers/net/szedata2/rte_eth_szedata2.c +++ b/drivers/net/szedata2/rte_eth_szedata2.c @@ -1581,5 +1581,5 @@ static struct eth_driver szedata2_eth_driver = { .dev_private_size = sizeof(struct pmd_internals), }; -DRIVER_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver.pci_drv); -DRIVER_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table); +RTE_PMD_REGISTER_PCI(RTE_SZEDATA2_DRIVER_NAME, szedata2_eth_driver.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(RTE_SZEDATA2_DRIVER_NAME, rte_szedata2_pci_id_table); diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 9925535244..8bafc78730 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -2102,5 +2102,5 @@ static struct eth_driver rte_nicvf_pmd = { .dev_private_size = sizeof(struct nicvf), }; -DRIVER_REGISTER_PCI(net_thunderx, rte_nicvf_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_thunderx, pci_id_nicvf_map); +RTE_PMD_REGISTER_PCI(net_thunderx, rte_nicvf_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_thunderx, pci_id_nicvf_map); diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c index 86c7a4d41b..170f1dd91b 100644 --- a/drivers/net/vhost/rte_eth_vhost.c +++ b/drivers/net/vhost/rte_eth_vhost.c @@ -1243,7 +1243,7 @@ static struct rte_vdev_driver pmd_vhost_drv = { .remove = rte_pmd_vhost_remove, }; -DRIVER_REGISTER_VDEV(net_vhost, pmd_vhost_drv); -DRIVER_REGISTER_PARAM_STRING(net_vhost, +RTE_PMD_REGISTER_VDEV(net_vhost, pmd_vhost_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_vhost, "iface= " "queues="); diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index e6cd671e9b..97438f96f2 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -1639,5 +1639,5 @@ __rte_unused uint8_t is_rx) return 0; } -DRIVER_EXPORT_NAME(net_virtio, __COUNTER__); -DRIVER_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map); +RTE_PMD_EXPORT_NAME(net_virtio, __COUNTER__); +RTE_PMD_REGISTER_PCI_TABLE(net_virtio, pci_id_virtio_map); diff --git a/drivers/net/virtio/virtio_user_ethdev.c b/drivers/net/virtio/virtio_user_ethdev.c index 6fcedd967f..bfdc3d0037 100644 --- a/drivers/net/virtio/virtio_user_ethdev.c +++ b/drivers/net/virtio/virtio_user_ethdev.c @@ -478,8 +478,8 @@ static struct rte_vdev_driver virtio_user_driver = { .remove = virtio_user_pmd_remove, }; -DRIVER_REGISTER_VDEV(net_virtio_user, virtio_user_driver); -DRIVER_REGISTER_PARAM_STRING(net_virtio_user, +RTE_PMD_REGISTER_VDEV(net_virtio_user, virtio_user_driver); +RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user, "path= " "mac= " "cq= " diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c index 51e2d4cf80..8bb13e5206 100644 --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c @@ -960,5 +960,5 @@ vmxnet3_process_events(struct vmxnet3_hw *hw) } #endif -DRIVER_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd.pci_drv); -DRIVER_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map); +RTE_PMD_REGISTER_PCI(net_vmxnet3, rte_vmxnet3_pmd.pci_drv); +RTE_PMD_REGISTER_PCI_TABLE(net_vmxnet3, pci_id_vmxnet3_map); diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index fa01ba099e..5a897b9087 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -764,6 +764,6 @@ static struct rte_vdev_driver pmd_xenvirt_drv = { .remove = rte_pmd_xenvirt_remove, }; -DRIVER_REGISTER_VDEV(net_xenvirt, pmd_xenvirt_drv); -DRIVER_REGISTER_PARAM_STRING(net_xenvirt, +RTE_PMD_REGISTER_VDEV(net_xenvirt, pmd_xenvirt_drv); +RTE_PMD_REGISTER_PARAM_STRING(net_xenvirt, "mac="); diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index d1f0ad8a30..4f3b4934a3 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -84,7 +84,7 @@ rte_eal_dev_init(void) /* * Note that the dev_driver_list is populated here * from calls made to rte_eal_driver_register from constructor functions - * embedded into PMD modules via the DRIVER_REGISTER_VDEV macro + * embedded into PMD modules via the RTE_PMD_REGISTER_VDEV macro */ /* call the init function for each virtual device */ diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index d159991d6d..b3873bdbce 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -222,19 +222,19 @@ int rte_eal_dev_attach(const char *name, const char *devargs); */ int rte_eal_dev_detach(const char *name); -#define DRIVER_EXPORT_NAME_ARRAY(n, idx) n##idx[] +#define RTE_PMD_EXPORT_NAME_ARRAY(n, idx) n##idx[] -#define DRIVER_EXPORT_NAME(name, idx) \ -static const char DRIVER_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ +#define RTE_PMD_EXPORT_NAME(name, idx) \ +static const char RTE_PMD_EXPORT_NAME_ARRAY(this_pmd_name, idx) \ __attribute__((used)) = RTE_STR(name) #define DRV_EXP_TAG(name, tag) __##name##_##tag -#define DRIVER_REGISTER_PCI_TABLE(name, table) \ +#define RTE_PMD_REGISTER_PCI_TABLE(name, table) \ static const char DRV_EXP_TAG(name, pci_tbl_export)[] __attribute__((used)) = \ RTE_STR(table) -#define DRIVER_REGISTER_PARAM_STRING(name, str) \ +#define RTE_PMD_REGISTER_PARAM_STRING(name, str) \ static const char DRV_EXP_TAG(name, param_string_export)[] \ __attribute__((used)) = str diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 3a8e8c83f4..9ce8847278 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -487,14 +487,14 @@ void rte_eal_pci_dump(FILE *f); void rte_eal_pci_register(struct rte_pci_driver *driver); /** Helper for PCI device registration from driver (eth, crypto) instance */ -#define DRIVER_REGISTER_PCI(nm, pci_drv) \ +#define RTE_PMD_REGISTER_PCI(nm, pci_drv) \ RTE_INIT(pciinitfn_ ##nm); \ static void pciinitfn_ ##nm(void) \ {\ (pci_drv).driver.name = RTE_STR(nm);\ rte_eal_pci_register(&pci_drv); \ } \ -DRIVER_EXPORT_NAME(nm, __COUNTER__) +RTE_PMD_EXPORT_NAME(nm, __COUNTER__) /** * Unregister a PCI driver. diff --git a/lib/librte_eal/common/include/rte_vdev.h b/lib/librte_eal/common/include/rte_vdev.h index 0dec8eb276..97260b2faa 100644 --- a/lib/librte_eal/common/include/rte_vdev.h +++ b/lib/librte_eal/common/include/rte_vdev.h @@ -81,14 +81,14 @@ void rte_eal_vdrv_register(struct rte_vdev_driver *driver); */ void rte_eal_vdrv_unregister(struct rte_vdev_driver *driver); -#define DRIVER_REGISTER_VDEV(nm, vdrv)\ +#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\ RTE_INIT(vdrvinitfn_ ##vdrv);\ static void vdrvinitfn_ ##vdrv(void)\ {\ (vdrv).driver.name = RTE_STR(nm);\ rte_eal_vdrv_register(&vdrv);\ } \ -DRIVER_EXPORT_NAME(nm, __COUNTER__) +RTE_PMD_EXPORT_NAME(nm, __COUNTER__) #ifdef __cplusplus } diff --git a/mk/internal/rte.compile-pre.mk b/mk/internal/rte.compile-pre.mk index a42ef03131..da8dda4982 100644 --- a/mk/internal/rte.compile-pre.mk +++ b/mk/internal/rte.compile-pre.mk @@ -87,7 +87,7 @@ endif PMDINFO_GEN = $(RTE_SDK_BIN)/app/dpdk-pmdinfogen $@ $@.pmd.c PMDINFO_CC = $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@.pmd.o $@.pmd.c PMDINFO_LD = $(CROSS)ld $(LDFLAGS) -r -o $@.o $@.pmd.o $@ -PMDINFO_TO_O = if grep -q 'DRIVER_REGISTER_.*(.*)' $<; then \ +PMDINFO_TO_O = if grep -q 'RTE_PMD_REGISTER_.*(.*)' $<; then \ echo "$(if $V,$(PMDINFO_GEN), PMDINFO $@.pmd.c)" && \ $(PMDINFO_GEN) && \ echo "$(if $V,$(PMDINFO_CC), CC $@.pmd.o)" && \ -- 2.20.1