DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH v2 09/11] net/nfp: unify the PMD name with macro
Date: Sat, 28 Oct 2023 14:53:13 +0800	[thread overview]
Message-ID: <20231028065315.1937188-10-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231028065315.1937188-1-chaoyong.he@corigine.com>

Unify the PMD name with a string macro, make it more extendable.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 drivers/net/nfp/nfp_ethdev.c    | 8 +++++---
 drivers/net/nfp/nfp_ethdev_vf.c | 6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 8057452799..c4a36027b9 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -21,6 +21,8 @@
 #include "nfp_ipsec.h"
 #include "nfp_logs.h"
 
+#define NFP_PF_DRIVER_NAME net_nfp_pf
+
 static void
 nfp_net_pf_read_mac(struct nfp_app_fw_nic *app_fw_nic,
 		uint16_t port)
@@ -1233,6 +1235,6 @@ static struct rte_pci_driver rte_nfp_net_pf_pmd = {
 	.remove = eth_nfp_pci_remove,
 };
 
-RTE_PMD_REGISTER_PCI(net_nfp_pf, rte_nfp_net_pf_pmd);
-RTE_PMD_REGISTER_PCI_TABLE(net_nfp_pf, pci_id_nfp_pf_net_map);
-RTE_PMD_REGISTER_KMOD_DEP(net_nfp_pf, "* igb_uio | uio_pci_generic | vfio");
+RTE_PMD_REGISTER_PCI(NFP_PF_DRIVER_NAME, rte_nfp_net_pf_pmd);
+RTE_PMD_REGISTER_PCI_TABLE(NFP_PF_DRIVER_NAME, pci_id_nfp_pf_net_map);
+RTE_PMD_REGISTER_KMOD_DEP(NFP_PF_DRIVER_NAME, "* igb_uio | uio_pci_generic | vfio");
diff --git a/drivers/net/nfp/nfp_ethdev_vf.c b/drivers/net/nfp/nfp_ethdev_vf.c
index cb8a37bce7..d0834ccb3e 100644
--- a/drivers/net/nfp/nfp_ethdev_vf.c
+++ b/drivers/net/nfp/nfp_ethdev_vf.c
@@ -15,6 +15,8 @@
 #include "nfp_logs.h"
 #include "nfp_net_common.h"
 
+#define NFP_VF_DRIVER_NAME net_nfp_vf
+
 static int
 nfp_netvf_start(struct rte_eth_dev *dev)
 {
@@ -416,5 +418,5 @@ RTE_INIT(rte_nfp_vf_pmd_init)
 	nfp_class_driver_register(&rte_nfp_net_vf_pmd);
 }
 
-RTE_PMD_REGISTER_PCI_TABLE(net_nfp_vf, pci_id_nfp_vf_net_map);
-RTE_PMD_REGISTER_KMOD_DEP(net_nfp_vf, "* igb_uio | uio_pci_generic | vfio");
+RTE_PMD_REGISTER_PCI_TABLE(NFP_VF_DRIVER_NAME, pci_id_nfp_vf_net_map);
+RTE_PMD_REGISTER_KMOD_DEP(NFP_VF_DRIVER_NAME, "* igb_uio | uio_pci_generic | vfio");
-- 
2.39.1


  parent reply	other threads:[~2023-10-28  6:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-28  6:15 [PATCH 00/11] Clean up NFP PMD Chaoyong He
2023-10-28  6:15 ` [PATCH 01/11] net/nfp: use the suitable helper macro Chaoyong He
2023-10-28  6:15 ` [PATCH 02/11] net/nfp: remove the unneeded call of underlying API Chaoyong He
2023-10-28  6:15 ` [PATCH 03/11] net/nfp: remove the unneeded check of process type Chaoyong He
2023-10-28  6:15 ` [PATCH 04/11] net/nfp: remove the unneeded data abstraction Chaoyong He
2023-10-28  6:15 ` [PATCH 05/11] net/nfp: remove the redundancy macro Chaoyong He
2023-10-28  6:15 ` [PATCH 06/11] net/nfp: remove redundancy logic of init control BAR Chaoyong He
2023-10-28  6:15 ` [PATCH 07/11] net/nfp: use the DPDK defined function Chaoyong He
2023-10-28  6:15 ` [PATCH 08/11] net/nfp: replace hard coded value Chaoyong He
2023-10-28  6:15 ` [PATCH 09/11] net/nfp: unify the PMD name with macro Chaoyong He
2023-10-28  6:15 ` [PATCH 10/11] net/nfp: extract a helper function Chaoyong He
2023-10-28  6:15 ` [PATCH 11/11] net/nfp: remove the redundancy logic of representor port Chaoyong He
2023-10-28  6:53 ` [PATCH v2 00/11] Clean up NFP PMD Chaoyong He
2023-10-28  6:53   ` [PATCH v2 01/11] net/nfp: use the suitable helper macro Chaoyong He
2023-10-28  6:53   ` [PATCH v2 02/11] net/nfp: remove the unneeded call of underlying API Chaoyong He
2023-10-28  6:53   ` [PATCH v2 03/11] net/nfp: remove the unneeded check of process type Chaoyong He
2023-10-28  6:53   ` [PATCH v2 04/11] net/nfp: remove the unneeded data abstraction Chaoyong He
2023-11-01 17:57     ` Ferruh Yigit
2023-11-02  1:25       ` Chaoyong He
2023-10-28  6:53   ` [PATCH v2 05/11] net/nfp: remove the redundancy macro Chaoyong He
2023-10-28  6:53   ` [PATCH v2 06/11] net/nfp: remove redundancy logic of init control BAR Chaoyong He
2023-10-28  6:53   ` [PATCH v2 07/11] net/nfp: use the DPDK defined function Chaoyong He
2023-10-28  6:53   ` [PATCH v2 08/11] net/nfp: replace hard coded value Chaoyong He
2023-10-28  6:53   ` Chaoyong He [this message]
2023-10-28  6:53   ` [PATCH v2 10/11] net/nfp: extract a helper function Chaoyong He
2023-10-28  6:53   ` [PATCH v2 11/11] net/nfp: remove the redundancy logic of representor port Chaoyong He
2023-11-01 18:33   ` [PATCH v2 00/11] Clean up NFP PMD Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231028065315.1937188-10-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).