[20/36] net/bnxt: rename regfile_wr_idx to regfile_idx
diff mbox series

Message ID 20200610065733.18698-21-somnath.kotur@broadcom.com
State Superseded, archived
Delegated to: Ajit Khaparde
Headers show
Series
  • bnxt fixes and enhancements
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Somnath Kotur June 10, 2020, 6:57 a.m. UTC
From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>

The regfile index shall be used for both write and read operations.
Hence the field is renamed.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_mapper.c          |  8 ++++----
 drivers/net/bnxt/tf_ulp/ulp_template_db.c     | 16 ++++++++--------
 drivers/net/bnxt/tf_ulp/ulp_template_struct.h |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
index 41c4f2f..b0ef966 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c
@@ -540,7 +540,7 @@  ulp_mapper_ident_process(struct bnxt_ulp_mapper_parms *parms,
 		return -EINVAL;
 	}
 
-	idx = ident->regfile_wr_idx;
+	idx = ident->regfile_idx;
 
 	iparms.ident_type = ident->ident_type;
 	iparms.dir = tbl->direction;
@@ -1473,10 +1473,10 @@  ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 
 	/* Always storing values in Regfile in BE */
 	idx = tfp_cpu_to_be_64(idx);
-	rc = ulp_regfile_write(parms->regfile, tbl->regfile_wr_idx, idx);
+	rc = ulp_regfile_write(parms->regfile, tbl->regfile_idx, idx);
 	if (!rc) {
 		BNXT_TF_DBG(ERR, "Write regfile[%d] failed\n",
-			    tbl->regfile_wr_idx);
+			    tbl->regfile_idx);
 		goto error;
 	}
 
@@ -1633,7 +1633,7 @@  ulp_mapper_cache_tbl_process(struct bnxt_ulp_mapper_parms *parms,
 		for (i = 0; i < num_idents; i++) {
 			regval = (uint64_t)cache_entry->idents[i];
 			if (!ulp_regfile_write(parms->regfile,
-					       idents[i].regfile_wr_idx,
+					       idents[i].regfile_idx,
 					       tfp_cpu_to_be_64(regval))) {
 				BNXT_TF_DBG(ERR,
 					    "Failed to write to regfile\n");
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
index a9e1681..0e3c061 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
@@ -608,7 +608,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = {
 	.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
 	.vfr_flag = BNXT_ULP_VFR_FLAG_NO,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
 	},
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -630,7 +630,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = {
 	.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
 	.vfr_flag = BNXT_ULP_VFR_FLAG_NO,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
 	},
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_CACHE_TABLE,
@@ -652,7 +652,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = {
 	.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
 	.vfr_flag = BNXT_ULP_VFR_FLAG_NO,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
 	},
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
@@ -674,7 +674,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = {
 	.mark_enable = BNXT_ULP_MARK_ENABLE_NO,
 	.vfr_flag = BNXT_ULP_VFR_FLAG_NO,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_NO,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
 	},
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
@@ -696,7 +696,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_class_tbl_list[] = {
 	.mark_enable = BNXT_ULP_MARK_ENABLE_YES,
 	.vfr_flag = BNXT_ULP_VFR_FLAG_NO,
 	.critical_resource = BNXT_ULP_CRITICAL_RESOURCE_YES,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_NOT_USED
 	}
 };
 
@@ -1598,14 +1598,14 @@  struct bnxt_ulp_mapper_ident_info ulp_ident_list[] = {
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
 	.ident_type = TF_IDENT_TYPE_L2_CTXT,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0,
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0,
 	.ident_bit_size = 10,
 	.ident_bit_pos = 0
 	},
 	{
 	.resource_func = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
 	.ident_type = TF_IDENT_TYPE_EM_PROF,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0,
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0,
 	.ident_bit_size = 10,
 	.ident_bit_pos = 0
 	}
@@ -1631,7 +1631,7 @@  struct bnxt_ulp_mapper_tbl_info ulp_act_tbl_list[] = {
 	.result_bit_size = 128,
 	.result_num_fields = 26,
 	.encap_num_fields = 0,
-	.regfile_wr_idx = BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN
+	.regfile_idx = BNXT_ULP_REGFILE_INDEX_ACTION_PTR_MAIN
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
index aaa91c3..9b1bdbb 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h
@@ -182,7 +182,7 @@  struct bnxt_ulp_mapper_tbl_info {
 	uint16_t	ident_nums;
 
 	uint8_t		mark_enable;
-	enum bnxt_ulp_regfile_index	regfile_wr_idx;
+	enum bnxt_ulp_regfile_index	regfile_idx;
 	enum bnxt_ulp_vfr_flag		vfr_flag;
 };
 
@@ -209,7 +209,7 @@  struct bnxt_ulp_mapper_ident_info {
 	uint16_t	ident_type;
 	uint16_t	ident_bit_size;
 	uint16_t	ident_bit_pos;
-	enum bnxt_ulp_regfile_index	regfile_wr_idx;
+	enum bnxt_ulp_regfile_index	regfile_idx;
 };
 
 struct bnxt_ulp_glb_resource_info {