All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: "Chaoyong He" <chaoyong.he@corigine.com>,
	"Niklas Söderlund" <niklas.soderlund@corigine.com>
Subject: [PATCH v4 10/26] net/nfp: rename some parameter and variable
Date: Mon, 18 Sep 2023 10:45:56 +0800	[thread overview]
Message-ID: <20230918024612.1600536-11-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20230918024612.1600536-1-chaoyong.he@corigine.com>

Rename some parameter and variable to make the logic easier to
understand.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfpcore/nfp_cpp.h          | 10 ++---
 drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c | 42 ++++++++---------
 drivers/net/nfp/nfpcore/nfp_cppcore.c      | 52 +++++++++++-----------
 drivers/net/nfp/nfpcore/nfp_mip.h          |  2 +-
 drivers/net/nfp/nfpcore/nfp_mutex.c        |  6 +--
 drivers/net/nfp/nfpcore/nfp_nffw.c         | 20 ++++-----
 drivers/net/nfp/nfpcore/nfp_nffw.h         |  4 +-
 drivers/net/nfp/nfpcore/nfp_nsp.h          |  8 ++--
 drivers/net/nfp/nfpcore/nfp_nsp_cmds.c     |  2 +-
 drivers/net/nfp/nfpcore/nfp_nsp_eth.c      | 20 ++++-----
 10 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/drivers/net/nfp/nfpcore/nfp_cpp.h b/drivers/net/nfp/nfpcore/nfp_cpp.h
index ceb4d56a08..be7ae1d919 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp.h
+++ b/drivers/net/nfp/nfpcore/nfp_cpp.h
@@ -247,7 +247,7 @@ void *nfp_cpp_priv(struct nfp_cpp *cpp);
 
 void *nfp_cpp_area_priv(struct nfp_cpp_area *cpp_area);
 
-uint32_t __nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);
+uint32_t nfp_cpp_model_autodetect(struct nfp_cpp *cpp, uint32_t *model);
 
 /* NFP CPP core interface for CPP clients */
 struct nfp_cpp *nfp_cpp_from_device_name(struct rte_pci_device *dev,
@@ -381,10 +381,10 @@ uint8_t *nfp_cpp_map_area(struct nfp_cpp *cpp, uint32_t cpp_id,
 		uint64_t addr, uint32_t size, struct nfp_cpp_area **area);
 
 int nfp_cpp_area_read(struct nfp_cpp_area *area, uint32_t offset,
-		void *buffer, size_t length);
+		void *address, size_t length);
 
 int nfp_cpp_area_write(struct nfp_cpp_area *area, uint32_t offset,
-		const void *buffer, size_t length);
+		const void *address, size_t length);
 
 void *nfp_cpp_area_iomem(struct nfp_cpp_area *area);
 
@@ -393,10 +393,10 @@ struct nfp_cpp *nfp_cpp_area_cpp(struct nfp_cpp_area *cpp_area);
 const char *nfp_cpp_area_name(struct nfp_cpp_area *cpp_area);
 
 int nfp_cpp_read(struct nfp_cpp *cpp, uint32_t cpp_id,
-		uint64_t address, void *kernel_vaddr, size_t length);
+		uint64_t address, void *buf, size_t length);
 
 int nfp_cpp_write(struct nfp_cpp *cpp, uint32_t cpp_id,
-		uint64_t address, const void *kernel_vaddr, size_t length);
+		uint64_t address, const void *buf, size_t length);
 
 int nfp_cpp_area_readl(struct nfp_cpp_area *area, uint32_t offset,
 		uint32_t *value);
diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
index 28a6278497..db15411eb2 100644
--- a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
+++ b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c
@@ -118,9 +118,9 @@ static int
 nfp_compute_bar(const struct nfp_bar *bar,
 		uint32_t *bar_config,
 		uint64_t *bar_base,
-		int tgt,
-		int act,
-		int tok,
+		int target,
+		int action,
+		int token,
 		uint64_t offset,
 		size_t size,
 		int width)
@@ -129,7 +129,7 @@ nfp_compute_bar(const struct nfp_bar *bar,
 	uint32_t newcfg;
 	uint32_t bitsize;
 
-	if (tgt >= 16)
+	if (target >= 16)
 		return -EINVAL;
 
 	switch (width) {
@@ -149,15 +149,15 @@ nfp_compute_bar(const struct nfp_bar *bar,
 		return -EINVAL;
 	}
 
-	if (act != NFP_CPP_ACTION_RW && act != 0) {
+	if (action != NFP_CPP_ACTION_RW && action != 0) {
 		/* Fixed CPP mapping with specific action */
 		mask = ~(NFP_PCIE_P2C_FIXED_SIZE(bar) - 1);
 
 		newcfg |= NFP_PCIE_BAR_PCIE2CPP_MAPTYPE
 				(NFP_PCIE_BAR_PCIE2CPP_MAPTYPE_FIXED);
-		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TARGET_BASEADDRESS(tgt);
-		newcfg |= NFP_PCIE_BAR_PCIE2CPP_ACTION_BASEADDRESS(act);
-		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TOKEN_BASEADDRESS(tok);
+		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TARGET_BASEADDRESS(target);
+		newcfg |= NFP_PCIE_BAR_PCIE2CPP_ACTION_BASEADDRESS(action);
+		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TOKEN_BASEADDRESS(token);
 
 		if ((offset & mask) != ((offset + size - 1) & mask))
 			return -EINVAL;
@@ -170,8 +170,8 @@ nfp_compute_bar(const struct nfp_bar *bar,
 		/* Bulk mapping */
 		newcfg |= NFP_PCIE_BAR_PCIE2CPP_MAPTYPE
 				(NFP_PCIE_BAR_PCIE2CPP_MAPTYPE_BULK);
-		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TARGET_BASEADDRESS(tgt);
-		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TOKEN_BASEADDRESS(tok);
+		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TARGET_BASEADDRESS(target);
+		newcfg |= NFP_PCIE_BAR_PCIE2CPP_TOKEN_BASEADDRESS(token);
 
 		if ((offset & mask) != ((offset + size - 1) & mask))
 			return -EINVAL;
@@ -221,9 +221,9 @@ nfp_bar_write(struct nfp_pcie_user *nfp,
 static int
 nfp_reconfigure_bar(struct nfp_pcie_user *nfp,
 		struct nfp_bar *bar,
-		int tgt,
-		int act,
-		int tok,
+		int target,
+		int action,
+		int token,
 		uint64_t offset,
 		size_t size,
 		int width)
@@ -232,8 +232,8 @@ nfp_reconfigure_bar(struct nfp_pcie_user *nfp,
 	uint32_t newcfg;
 	uint64_t newbase;
 
-	err = nfp_compute_bar(bar, &newcfg, &newbase, tgt, act, tok, offset,
-			size, width);
+	err = nfp_compute_bar(bar, &newcfg, &newbase, target, action,
+			token, offset, size, width);
 	if (err != 0)
 		return err;
 
@@ -457,15 +457,15 @@ nfp6000_area_iomem(struct nfp_cpp_area *area)
 
 static int
 nfp6000_area_read(struct nfp_cpp_area *area,
-		void *kernel_vaddr,
+		void *address,
 		uint32_t offset,
 		size_t length)
 {
 	size_t n;
 	int width;
 	bool is_64;
-	uint32_t *wrptr32 = kernel_vaddr;
-	uint64_t *wrptr64 = kernel_vaddr;
+	uint32_t *wrptr32 = address;
+	uint64_t *wrptr64 = address;
 	struct nfp6000_area_priv *priv;
 	const volatile uint32_t *rdptr32;
 	const volatile uint64_t *rdptr64;
@@ -526,7 +526,7 @@ nfp6000_area_read(struct nfp_cpp_area *area,
 
 static int
 nfp6000_area_write(struct nfp_cpp_area *area,
-		const void *kernel_vaddr,
+		const void *address,
 		uint32_t offset,
 		size_t length)
 {
@@ -536,8 +536,8 @@ nfp6000_area_write(struct nfp_cpp_area *area,
 	uint32_t *wrptr32;
 	uint64_t *wrptr64;
 	struct nfp6000_area_priv *priv;
-	const uint32_t *rdptr32 = kernel_vaddr;
-	const uint64_t *rdptr64 = kernel_vaddr;
+	const uint32_t *rdptr32 = address;
+	const uint64_t *rdptr64 = address;
 
 	priv = nfp_cpp_area_priv(area);
 	wrptr64 = (uint64_t *)(priv->iomem + offset);
diff --git a/drivers/net/nfp/nfpcore/nfp_cppcore.c b/drivers/net/nfp/nfpcore/nfp_cppcore.c
index c46fd62e32..7173b4d8a5 100644
--- a/drivers/net/nfp/nfpcore/nfp_cppcore.c
+++ b/drivers/net/nfp/nfpcore/nfp_cppcore.c
@@ -90,7 +90,7 @@ nfp_cpp_model(struct nfp_cpp *cpp)
 	if (cpp == NULL)
 		return NFP_CPP_MODEL_INVALID;
 
-	err = __nfp_cpp_model_autodetect(cpp, &model);
+	err = nfp_cpp_model_autodetect(cpp, &model);
 
 	if (err < 0)
 		return err;
@@ -484,7 +484,7 @@ nfp_cpp_area_iomem(struct nfp_cpp_area *area)
  *   CPP area handle
  * @param offset
  *   Offset into CPP area
- * @param kernel_vaddr
+ * @param address
  *   Address to put data into
  * @param length
  *   Number of bytes to read
@@ -498,13 +498,13 @@ nfp_cpp_area_iomem(struct nfp_cpp_area *area)
 int
 nfp_cpp_area_read(struct nfp_cpp_area *area,
 		uint32_t offset,
-		void *kernel_vaddr,
+		void *address,
 		size_t length)
 {
 	if ((offset + length) > area->size)
 		return -EFAULT;
 
-	return area->cpp->op->area_read(area, kernel_vaddr, offset, length);
+	return area->cpp->op->area_read(area, address, offset, length);
 }
 
 /**
@@ -514,7 +514,7 @@ nfp_cpp_area_read(struct nfp_cpp_area *area,
  *   CPP area handle
  * @param offset
  *   Offset into CPP area
- * @param kernel_vaddr
+ * @param address
  *   Address to put data into
  * @param length
  *   Number of bytes to read
@@ -528,13 +528,13 @@ nfp_cpp_area_read(struct nfp_cpp_area *area,
 int
 nfp_cpp_area_write(struct nfp_cpp_area *area,
 		uint32_t offset,
-		const void *kernel_vaddr,
+		const void *address,
 		size_t length)
 {
 	if ((offset + length) > area->size)
 		return -EFAULT;
 
-	return area->cpp->op->area_write(area, kernel_vaddr, offset, length);
+	return area->cpp->op->area_write(area, address, offset, length);
 }
 
 /*
@@ -880,14 +880,14 @@ nfp_cpp_alloc(struct rte_pci_device *dev,
 	}
 
 	if (NFP_CPP_MODEL_IS_6000(nfp_cpp_model(cpp))) {
-		uint32_t xpbaddr;
-		size_t tgt;
+		uint32_t xpb_addr;
+		size_t target;
 
-		for (tgt = 0; tgt < RTE_DIM(cpp->imb_cat_table); tgt++) {
+		for (target = 0; target < RTE_DIM(cpp->imb_cat_table); target++) {
 			/* Hardcoded XPB IMB Base, island 0 */
-			xpbaddr = 0x000a0000 + (tgt * 4);
-			err = nfp_xpb_readl(cpp, xpbaddr,
-					(uint32_t *)&cpp->imb_cat_table[tgt]);
+			xpb_addr = 0x000a0000 + (target * 4);
+			err = nfp_xpb_readl(cpp, xpb_addr,
+					(uint32_t *)&cpp->imb_cat_table[target]);
 			if (err < 0) {
 				free(cpp);
 				return NULL;
@@ -950,9 +950,9 @@ nfp_cpp_from_device_name(struct rte_pci_device *dev,
  *   CPP handle
  * @param destination
  *   CPP id
- * @param address
+ * @param offset
  *   Offset into CPP target
- * @param kernel_vaddr
+ * @param address
  *   Buffer for result
  * @param length
  *   Number of bytes to read
@@ -963,20 +963,20 @@ nfp_cpp_from_device_name(struct rte_pci_device *dev,
 int
 nfp_cpp_read(struct nfp_cpp *cpp,
 		uint32_t destination,
-		uint64_t address,
-		void *kernel_vaddr,
+		uint64_t offset,
+		void *address,
 		size_t length)
 {
 	int err;
 	struct nfp_cpp_area *area;
 
-	area = nfp_cpp_area_alloc_acquire(cpp, destination, address, length);
+	area = nfp_cpp_area_alloc_acquire(cpp, destination, offset, length);
 	if (area == NULL) {
 		PMD_DRV_LOG(ERR, "Area allocation/acquire failed for read");
 		return -1;
 	}
 
-	err = nfp_cpp_area_read(area, 0, kernel_vaddr, length);
+	err = nfp_cpp_area_read(area, 0, address, length);
 
 	nfp_cpp_area_release_free(area);
 	return err;
@@ -989,9 +989,9 @@ nfp_cpp_read(struct nfp_cpp *cpp,
  *   CPP handle
  * @param destination
  *   CPP id
- * @param address
+ * @param offset
  *   Offset into CPP target
- * @param kernel_vaddr
+ * @param address
  *   Buffer to read from
  * @param length
  *   Number of bytes to write
@@ -1002,20 +1002,20 @@ nfp_cpp_read(struct nfp_cpp *cpp,
 int
 nfp_cpp_write(struct nfp_cpp *cpp,
 		uint32_t destination,
-		uint64_t address,
-		const void *kernel_vaddr,
+		uint64_t offset,
+		const void *address,
 		size_t length)
 {
 	int err;
 	struct nfp_cpp_area *area;
 
-	area = nfp_cpp_area_alloc_acquire(cpp, destination, address, length);
+	area = nfp_cpp_area_alloc_acquire(cpp, destination, offset, length);
 	if (area == NULL) {
 		PMD_DRV_LOG(ERR, "Area allocation/acquire failed for write");
 		return -1;
 	}
 
-	err = nfp_cpp_area_write(area, 0, kernel_vaddr, length);
+	err = nfp_cpp_area_write(area, 0, address, length);
 
 	nfp_cpp_area_release_free(area);
 	return err;
@@ -1026,7 +1026,7 @@ nfp_cpp_write(struct nfp_cpp *cpp,
  * as those are model-specific
  */
 uint32_t
-__nfp_cpp_model_autodetect(struct nfp_cpp *cpp,
+nfp_cpp_model_autodetect(struct nfp_cpp *cpp,
 		uint32_t *model)
 {
 	int err;
diff --git a/drivers/net/nfp/nfpcore/nfp_mip.h b/drivers/net/nfp/nfpcore/nfp_mip.h
index 371c635b97..7fa09ee575 100644
--- a/drivers/net/nfp/nfpcore/nfp_mip.h
+++ b/drivers/net/nfp/nfpcore/nfp_mip.h
@@ -17,6 +17,6 @@ const char *nfp_mip_name(const struct nfp_mip *mip);
 void nfp_mip_symtab(const struct nfp_mip *mip, uint32_t *addr, uint32_t *size);
 void nfp_mip_strtab(const struct nfp_mip *mip, uint32_t *addr, uint32_t *size);
 int nfp_nffw_info_mip_first(struct nfp_nffw_info *state, uint32_t *cpp_id,
-		uint64_t *off);
+		uint64_t *offset);
 
 #endif /* __NFP_MIP_H__ */
diff --git a/drivers/net/nfp/nfpcore/nfp_mutex.c b/drivers/net/nfp/nfpcore/nfp_mutex.c
index e97537b795..82598be7a1 100644
--- a/drivers/net/nfp/nfpcore/nfp_mutex.c
+++ b/drivers/net/nfp/nfpcore/nfp_mutex.c
@@ -35,7 +35,7 @@ struct nfp_cpp_mutex {
 };
 
 static int
-_nfp_cpp_mutex_validate(uint32_t model,
+nfp_cpp_mutex_validate(uint32_t model,
 		int *target,
 		uint64_t address)
 {
@@ -87,7 +87,7 @@ nfp_cpp_mutex_init(struct nfp_cpp *cpp,
 	uint32_t model = nfp_cpp_model(cpp);
 	uint32_t muw = NFP_CPP_ID(target, 4, 0);    /* atomic_write */
 
-	err = _nfp_cpp_mutex_validate(model, &target, address);
+	err = nfp_cpp_mutex_validate(model, &target, address);
 	if (err < 0)
 		return err;
 
@@ -152,7 +152,7 @@ nfp_cpp_mutex_alloc(struct nfp_cpp *cpp,
 		return NULL;
 	}
 
-	err = _nfp_cpp_mutex_validate(model, &target, address);
+	err = nfp_cpp_mutex_validate(model, &target, address);
 	if (err < 0)
 		return NULL;
 
diff --git a/drivers/net/nfp/nfpcore/nfp_nffw.c b/drivers/net/nfp/nfpcore/nfp_nffw.c
index be80eeaa0e..df6292e909 100644
--- a/drivers/net/nfp/nfpcore/nfp_nffw.c
+++ b/drivers/net/nfp/nfpcore/nfp_nffw.c
@@ -31,11 +31,11 @@ nffw_res_flg_init_get(const struct nfp_nffw_info_data *res)
 	return (res->flags[0] >> 0) & 1;
 }
 
-/* loaded = loaded__mu_da__mip_off_hi<31:31> */
+/* loaded = loaded_mu_da_mip_off_hi<31:31> */
 static uint32_t
 nffw_fwinfo_loaded_get(const struct nffw_fwinfo *fi)
 {
-	return (fi->loaded__mu_da__mip_off_hi >> 31) & 1;
+	return (fi->loaded_mu_da_mip_off_hi >> 31) & 1;
 }
 
 /* mip_cppid = mip_cppid */
@@ -45,18 +45,18 @@ nffw_fwinfo_mip_cppid_get(const struct nffw_fwinfo *fi)
 	return fi->mip_cppid;
 }
 
-/* loaded = loaded__mu_da__mip_off_hi<8:8> */
+/* loaded = loaded_mu_da_mip_off_hi<8:8> */
 static uint32_t
 nffw_fwinfo_mip_mu_da_get(const struct nffw_fwinfo *fi)
 {
-	return (fi->loaded__mu_da__mip_off_hi >> 8) & 1;
+	return (fi->loaded_mu_da_mip_off_hi >> 8) & 1;
 }
 
-/* mip_offset = (loaded__mu_da__mip_off_hi<7:0> << 32) | mip_offset_lo */
+/* mip_offset = (loaded_mu_da_mip_off_hi<7:0> << 32) | mip_offset_lo */
 static uint64_t
 nffw_fwinfo_mip_offset_get(const struct nffw_fwinfo *fi)
 {
-	uint64_t mip_off_hi = fi->loaded__mu_da__mip_off_hi;
+	uint64_t mip_off_hi = fi->loaded_mu_da_mip_off_hi;
 
 	return (mip_off_hi & 0xFF) << 32 | fi->mip_offset_lo;
 }
@@ -227,7 +227,7 @@ nfp_nffw_info_fwid_first(struct nfp_nffw_info *state)
 int
 nfp_nffw_info_mip_first(struct nfp_nffw_info *state,
 		uint32_t *cpp_id,
-		uint64_t *off)
+		uint64_t *offset)
 {
 	struct nffw_fwinfo *fwinfo;
 
@@ -236,7 +236,7 @@ nfp_nffw_info_mip_first(struct nfp_nffw_info *state,
 		return -EINVAL;
 
 	*cpp_id = nffw_fwinfo_mip_cppid_get(fwinfo);
-	*off = nffw_fwinfo_mip_offset_get(fwinfo);
+	*offset = nffw_fwinfo_mip_offset_get(fwinfo);
 
 	if (nffw_fwinfo_mip_mu_da_get(fwinfo) != 0) {
 		int locality_off;
@@ -248,8 +248,8 @@ nfp_nffw_info_mip_first(struct nfp_nffw_info *state,
 		if (locality_off < 0)
 			return locality_off;
 
-		*off &= ~(NFP_MU_ADDR_ACCESS_TYPE_MASK << locality_off);
-		*off |= NFP_MU_ADDR_ACCESS_TYPE_DIRECT << locality_off;
+		*offset &= ~(NFP_MU_ADDR_ACCESS_TYPE_MASK << locality_off);
+		*offset |= NFP_MU_ADDR_ACCESS_TYPE_DIRECT << locality_off;
 	}
 
 	return 0;
diff --git a/drivers/net/nfp/nfpcore/nfp_nffw.h b/drivers/net/nfp/nfpcore/nfp_nffw.h
index f84be463c4..52e25c090a 100644
--- a/drivers/net/nfp/nfpcore/nfp_nffw.h
+++ b/drivers/net/nfp/nfpcore/nfp_nffw.h
@@ -38,11 +38,11 @@
 
 /* nfp.nffw meinfo */
 struct nffw_meinfo {
-	uint32_t ctxmask__fwid__meid;
+	uint32_t ctxmask_fwid_meid;
 };
 
 struct nffw_fwinfo {
-	uint32_t loaded__mu_da__mip_off_hi;
+	uint32_t loaded_mu_da_mip_off_hi;
 	uint32_t mip_cppid; /* 0 means no MIP */
 	uint32_t mip_offset_lo;
 };
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp.h b/drivers/net/nfp/nfpcore/nfp_nsp.h
index 7bf584dcd0..705574b900 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp.h
+++ b/drivers/net/nfp/nfpcore/nfp_nsp.h
@@ -231,9 +231,9 @@ struct nfp_nsp *nfp_eth_config_start(struct nfp_cpp *cpp, uint32_t idx);
 int nfp_eth_config_commit_end(struct nfp_nsp *nsp);
 void nfp_eth_config_cleanup_end(struct nfp_nsp *nsp);
 
-int __nfp_eth_set_aneg(struct nfp_nsp *nsp, enum nfp_eth_aneg mode);
-int __nfp_eth_set_speed(struct nfp_nsp *nsp, uint32_t speed);
-int __nfp_eth_set_split(struct nfp_nsp *nsp, uint32_t lanes);
+int nfp_eth_set_aneg(struct nfp_nsp *nsp, enum nfp_eth_aneg mode);
+int nfp_eth_set_speed(struct nfp_nsp *nsp, uint32_t speed);
+int nfp_eth_set_split(struct nfp_nsp *nsp, uint32_t lanes);
 
 /* NSP static information */
 struct nfp_nsp_identify {
@@ -248,7 +248,7 @@ struct nfp_nsp_identify {
 	uint64_t sensor_mask;  /**< Mask of present sensors available on NIC */
 };
 
-struct nfp_nsp_identify *__nfp_nsp_identify(struct nfp_nsp *nsp);
+struct nfp_nsp_identify *nfp_nsp_identify(struct nfp_nsp *nsp);
 
 enum nfp_nsp_sensor_id {
 	NFP_SENSOR_CHIP_TEMPERATURE,
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp_cmds.c b/drivers/net/nfp/nfpcore/nfp_nsp_cmds.c
index 769ed54957..f656f200f4 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp_cmds.c
+++ b/drivers/net/nfp/nfpcore/nfp_nsp_cmds.c
@@ -24,7 +24,7 @@ struct nsp_identify {
 };
 
 struct nfp_nsp_identify *
-__nfp_nsp_identify(struct nfp_nsp *nsp)
+nfp_nsp_identify(struct nfp_nsp *nsp)
 {
 	int ret;
 	struct nsp_identify *ni;
diff --git a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
index d291552d03..32c1838a40 100644
--- a/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
+++ b/drivers/net/nfp/nfpcore/nfp_nsp_eth.c
@@ -242,7 +242,7 @@ nfp_eth_calc_port_type(struct nfp_eth_table_port *entry)
 }
 
 static struct nfp_eth_table *
-__nfp_eth_read_ports(struct nfp_nsp *nsp)
+nfp_eth_read_ports_real(struct nfp_nsp *nsp)
 {
 	int ret;
 	uint32_t i;
@@ -335,7 +335,7 @@ nfp_eth_read_ports(struct nfp_cpp *cpp)
 	if (nsp == NULL)
 		return NULL;
 
-	ret = __nfp_eth_read_ports(nsp);
+	ret = nfp_eth_read_ports_real(nsp);
 	nfp_nsp_close(nsp);
 
 	return ret;
@@ -484,7 +484,7 @@ nfp_eth_set_mod_enable(struct nfp_cpp *cpp,
 int
 nfp_eth_set_configured(struct nfp_cpp *cpp,
 		uint32_t idx,
-		int configed)
+		int configured)
 {
 	uint64_t reg;
 	struct nfp_nsp *nsp;
@@ -507,10 +507,10 @@ nfp_eth_set_configured(struct nfp_cpp *cpp,
 
 	/* Check if we are already in requested state */
 	reg = rte_le_to_cpu_64(entries[idx].state);
-	if (configed != (int)FIELD_GET(NSP_ETH_STATE_CONFIGURED, reg)) {
+	if (configured != (int)FIELD_GET(NSP_ETH_STATE_CONFIGURED, reg)) {
 		reg = rte_le_to_cpu_64(entries[idx].control);
 		reg &= ~NSP_ETH_CTRL_CONFIGURED;
-		reg |= FIELD_PREP(NSP_ETH_CTRL_CONFIGURED, configed);
+		reg |= FIELD_PREP(NSP_ETH_CTRL_CONFIGURED, configured);
 		entries[idx].control = rte_cpu_to_le_64(reg);
 
 		nfp_nsp_config_set_modified(nsp, 1);
@@ -576,7 +576,7 @@ nfp_eth_set_bit_config(struct nfp_nsp *nsp,
  *   0 or -ERRNO
  */
 int
-__nfp_eth_set_aneg(struct nfp_nsp *nsp,
+nfp_eth_set_aneg(struct nfp_nsp *nsp,
 		enum nfp_eth_aneg mode)
 {
 	return NFP_ETH_SET_BIT_CONFIG(nsp, NSP_ETH_RAW_STATE,
@@ -596,7 +596,7 @@ __nfp_eth_set_aneg(struct nfp_nsp *nsp,
  *   0 or -ERRNO
  */
 static int
-__nfp_eth_set_fec(struct nfp_nsp *nsp,
+nfp_eth_set_fec_real(struct nfp_nsp *nsp,
 		enum nfp_eth_fec mode)
 {
 	return NFP_ETH_SET_BIT_CONFIG(nsp, NSP_ETH_RAW_STATE,
@@ -630,7 +630,7 @@ nfp_eth_set_fec(struct nfp_cpp *cpp,
 	if (nsp == NULL)
 		return -EIO;
 
-	err = __nfp_eth_set_fec(nsp, mode);
+	err = nfp_eth_set_fec_real(nsp, mode);
 	if (err != 0) {
 		nfp_eth_config_cleanup_end(nsp);
 		return err;
@@ -654,7 +654,7 @@ nfp_eth_set_fec(struct nfp_cpp *cpp,
  *   0 or -ERRNO
  */
 int
-__nfp_eth_set_speed(struct nfp_nsp *nsp,
+nfp_eth_set_speed(struct nfp_nsp *nsp,
 		uint32_t speed)
 {
 	enum nfp_eth_rate rate;
@@ -682,7 +682,7 @@ __nfp_eth_set_speed(struct nfp_nsp *nsp,
  *   0 or -ERRNO
  */
 int
-__nfp_eth_set_split(struct nfp_nsp *nsp,
+nfp_eth_set_split(struct nfp_nsp *nsp,
 		uint32_t lanes)
 {
 	return NFP_ETH_SET_BIT_CONFIG(nsp, NSP_ETH_RAW_PORT,
-- 
2.39.1


  parent reply	other threads:[~2023-09-18  2:48 UTC|newest]

Thread overview: 159+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-24 11:09 [PATCH 00/27] refact the nfpcore module Chaoyong He
2023-08-24 11:09 ` [PATCH 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-08-24 11:09 ` [PATCH 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-08-24 11:09 ` [PATCH 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-08-24 11:09 ` [PATCH 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-08-24 11:09 ` [PATCH 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-08-24 11:09 ` [PATCH 06/27] net/nfp: adjust the log statement Chaoyong He
2023-08-24 11:09 ` [PATCH 07/27] net/nfp: standard the comment style Chaoyong He
2023-08-24 11:09 ` [PATCH 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-08-24 11:09 ` [PATCH 09/27] net/nfp: standard the blank character Chaoyong He
2023-08-24 11:09 ` [PATCH 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-08-24 11:09 ` [PATCH 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-08-24 11:09 ` [PATCH 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-08-24 11:09 ` [PATCH 13/27] net/nfp: refact the nffw module Chaoyong He
2023-08-24 11:09 ` [PATCH 14/27] net/nfp: refact the mip module Chaoyong He
2023-08-24 11:09 ` [PATCH 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-08-24 11:09 ` [PATCH 16/27] net/nfp: refact the resource module Chaoyong He
2023-08-24 11:09 ` [PATCH 17/27] net/nfp: refact the target module Chaoyong He
2023-08-24 11:09 ` [PATCH 18/27] net/nfp: add a new header file Chaoyong He
2023-08-24 11:09 ` [PATCH 19/27] net/nfp: refact the nsp module Chaoyong He
2023-08-24 11:09 ` [PATCH 20/27] net/nfp: refact the mutex module Chaoyong He
2023-08-24 11:09 ` [PATCH 21/27] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-08-24 11:09 ` [PATCH 22/27] net/nfp: add the dev module Chaoyong He
2023-08-24 11:09 ` [PATCH 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-08-24 11:09 ` [PATCH 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-08-24 11:09 ` [PATCH 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-08-24 11:09 ` [PATCH 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-08-24 11:09 ` [PATCH 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-08-30  2:14 ` [PATCH v2 00/27] refact the nfpcore module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-08-30  2:14   ` [PATCH v2 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-08-30  2:14   ` [PATCH v2 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-08-30  2:14   ` [PATCH v2 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-08-30  2:14   ` [PATCH v2 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-08-30  2:14   ` [PATCH v2 06/27] net/nfp: adjust the log statement Chaoyong He
2023-08-30  2:14   ` [PATCH v2 07/27] net/nfp: standard the comment style Chaoyong He
2023-08-30  2:14   ` [PATCH v2 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-08-30  2:14   ` [PATCH v2 09/27] net/nfp: standard the blank character Chaoyong He
2023-08-30  2:14   ` [PATCH v2 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-08-30  2:14   ` [PATCH v2 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-08-30  2:14   ` [PATCH v2 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 13/27] net/nfp: refact the nffw module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 14/27] net/nfp: refact the mip module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 16/27] net/nfp: refact the resource module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 17/27] net/nfp: refact the target module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 18/27] net/nfp: add a new header file Chaoyong He
2023-08-30  2:14   ` [PATCH v2 19/27] net/nfp: refact the nsp module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 20/27] net/nfp: refact the mutex module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 21/27] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-08-30  2:14   ` [PATCH v2 22/27] net/nfp: add the dev module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-08-30  2:14   ` [PATCH v2 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-08-30  2:14   ` [PATCH v2 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-15  9:15   ` [PATCH v3 00/27] refact the nfpcore module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 01/27] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-15  9:15     ` [PATCH v3 02/27] net/nfp: unify the indent coding style Chaoyong He
2023-09-15 13:40       ` Ferruh Yigit
2023-09-18  1:25         ` Chaoyong He
2023-09-18  2:22           ` Stephen Hemminger
2023-09-15  9:15     ` [PATCH v3 03/27] net/nfp: unify the type of integer variable Chaoyong He
2023-09-15 13:42       ` Ferruh Yigit
2023-09-18  1:26         ` Chaoyong He
2023-09-15  9:15     ` [PATCH v3 04/27] net/nfp: remove the unneeded logic Chaoyong He
2023-09-15  9:15     ` [PATCH v3 05/27] net/nfp: standard the local variable coding style Chaoyong He
2023-09-15  9:15     ` [PATCH v3 06/27] net/nfp: adjust the log statement Chaoyong He
2023-09-15  9:15     ` [PATCH v3 07/27] net/nfp: standard the comment style Chaoyong He
2023-09-15 13:44       ` Ferruh Yigit
2023-09-18  1:28         ` Chaoyong He
2023-09-18  2:08         ` Chaoyong He
2023-09-15  9:15     ` [PATCH v3 08/27] net/nfp: using the DPDK memory management API Chaoyong He
2023-09-15 13:45       ` Ferruh Yigit
2023-09-18  1:29         ` Chaoyong He
2023-09-15  9:15     ` [PATCH v3 09/27] net/nfp: standard the blank character Chaoyong He
2023-09-15  9:15     ` [PATCH v3 10/27] net/nfp: unify the guide line of header file Chaoyong He
2023-09-15  9:15     ` [PATCH v3 11/27] net/nfp: rename some parameter and variable Chaoyong He
2023-09-15  9:15     ` [PATCH v3 12/27] net/nfp: refact the hwinfo module Chaoyong He
2023-09-15 13:46       ` Ferruh Yigit
2023-09-18  1:39         ` Chaoyong He
2023-09-18 11:01           ` Ferruh Yigit
2023-09-15  9:15     ` [PATCH v3 13/27] net/nfp: refact the nffw module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 14/27] net/nfp: refact the mip module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 15/27] net/nfp: refact the rtsym module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 16/27] net/nfp: refact the resource module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 17/27] net/nfp: refact the target module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 18/27] net/nfp: add a new header file Chaoyong He
2023-09-15  9:15     ` [PATCH v3 19/27] net/nfp: refact the nsp module Chaoyong He
2023-09-18 12:31       ` Ferruh Yigit
2023-09-18 12:36         ` Ferruh Yigit
2023-09-15  9:15     ` [PATCH v3 20/27] net/nfp: refact the mutex module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 21/27] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-09-15  9:15     ` [PATCH v3 22/27] net/nfp: add the dev module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 23/27] net/nfp: add header file for PCIe module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 24/27] net/nfp: refact the cppcore module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 25/27] net/nfp: refact the PCIe module Chaoyong He
2023-09-15  9:15     ` [PATCH v3 26/27] net/nfp: refact the cppcore and " Chaoyong He
2023-09-15  9:15     ` [PATCH v3 27/27] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-15 13:49     ` [PATCH v3 00/27] refact the nfpcore module Ferruh Yigit
2023-09-18  2:45     ` [PATCH v4 00/26] " Chaoyong He
2023-09-18  2:45       ` [PATCH v4 01/26] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-18  2:45       ` [PATCH v4 02/26] net/nfp: unify the indent coding style Chaoyong He
2023-09-18 11:53         ` Niklas Söderlund
2023-09-18  2:45       ` [PATCH v4 03/26] net/nfp: unify the type of integer variable Chaoyong He
2023-09-18  2:45       ` [PATCH v4 04/26] net/nfp: remove the unneeded logic Chaoyong He
2023-09-18  2:45       ` [PATCH v4 05/26] net/nfp: standard the local variable coding style Chaoyong He
2023-09-18  2:45       ` [PATCH v4 06/26] net/nfp: adjust the log statement Chaoyong He
2023-09-18  2:45       ` [PATCH v4 07/26] net/nfp: standard the comment style Chaoyong He
2023-09-18  2:45       ` [PATCH v4 08/26] net/nfp: standard the blank character Chaoyong He
2023-09-18  2:45       ` [PATCH v4 09/26] net/nfp: unify the guide line of header file Chaoyong He
2023-09-18  2:45       ` Chaoyong He [this message]
2023-09-18  2:45       ` [PATCH v4 11/26] net/nfp: refact the hwinfo module Chaoyong He
2023-09-18  2:45       ` [PATCH v4 12/26] net/nfp: refact the nffw module Chaoyong He
2023-09-18  2:45       ` [PATCH v4 13/26] net/nfp: refact the mip module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 14/26] net/nfp: refact the rtsym module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 15/26] net/nfp: refact the resource module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 16/26] net/nfp: refact the target module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 17/26] net/nfp: add a new header file Chaoyong He
2023-09-18  2:46       ` [PATCH v4 18/26] net/nfp: refact the nsp module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 19/26] net/nfp: refact the mutex module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 20/26] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-09-18  2:46       ` [PATCH v4 21/26] net/nfp: add the dev module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 22/26] net/nfp: add header file for PCIe module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 23/26] net/nfp: refact the cppcore module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 24/26] net/nfp: refact the PCIe module Chaoyong He
2023-09-18  2:46       ` [PATCH v4 25/26] net/nfp: refact the cppcore and " Chaoyong He
2023-09-18  2:46       ` [PATCH v4 26/26] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He
2023-09-19  9:54       ` [PATCH v5 00/26] refact the nfpcore module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 01/26] net/nfp: explicitly compare to null and 0 Chaoyong He
2023-09-19  9:54         ` [PATCH v5 02/26] net/nfp: unify the indent coding style Chaoyong He
2023-09-19  9:54         ` [PATCH v5 03/26] net/nfp: unify the type of integer variable Chaoyong He
2023-09-19  9:54         ` [PATCH v5 04/26] net/nfp: remove the unneeded logic Chaoyong He
2023-09-19  9:54         ` [PATCH v5 05/26] net/nfp: standard the local variable coding style Chaoyong He
2023-09-19  9:54         ` [PATCH v5 06/26] net/nfp: adjust the log statement Chaoyong He
2023-09-19  9:54         ` [PATCH v5 07/26] net/nfp: standard the comment style Chaoyong He
2023-09-19  9:54         ` [PATCH v5 08/26] net/nfp: standard the blank character Chaoyong He
2023-09-19  9:54         ` [PATCH v5 09/26] net/nfp: unify the guide line of header file Chaoyong He
2023-09-19  9:54         ` [PATCH v5 10/26] net/nfp: rename some parameter and variable Chaoyong He
2023-09-19  9:54         ` [PATCH v5 11/26] net/nfp: refact the hwinfo module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 12/26] net/nfp: refact the nffw module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 13/26] net/nfp: refact the mip module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 14/26] net/nfp: refact the rtsym module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 15/26] net/nfp: refact the resource module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 16/26] net/nfp: refact the target module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 17/26] net/nfp: add a new header file Chaoyong He
2023-09-19  9:54         ` [PATCH v5 18/26] net/nfp: refact the nsp module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 19/26] net/nfp: refact the mutex module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 20/26] net/nfp: rename data field to sync with kernel driver Chaoyong He
2023-09-19  9:54         ` [PATCH v5 21/26] net/nfp: add the dev module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 22/26] net/nfp: add header file for PCIe module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 23/26] net/nfp: refact the cppcore module Chaoyong He
2023-09-19  9:54         ` [PATCH v5 24/26] net/nfp: refact the PCIe module Chaoyong He
2023-09-19 21:18         ` [PATCH v5 00/26] refact the nfpcore module Ferruh Yigit
2023-09-20  1:55           ` Chaoyong He
2023-09-20  8:54             ` Ferruh Yigit
2023-09-20  9:59         ` Ferruh Yigit
2023-09-20  1:28       ` [PATCH v5 25/26] net/nfp: refact the cppcore and PCIe module Chaoyong He
2023-09-20  1:29       ` [PATCH v5 26/26] net/nfp: extend the usage of nfp BAR from 8 to 24 Chaoyong He

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=20230918024612.1600536-11-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=niklas.soderlund@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.