From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B360CA00C5; Fri, 12 Jun 2020 14:58:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 26F5D1BF7D; Fri, 12 Jun 2020 14:55:25 +0200 (CEST) Received: from relay.smtp.broadcom.com (relay.smtp.broadcom.com [192.19.232.149]) by dpdk.org (Postfix) with ESMTP id 59DCF1BF4F for ; Fri, 12 Jun 2020 14:55:20 +0200 (CEST) Received: from dhcp-10-123-153-55.dhcp.broadcom.net (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55]) by relay.smtp.broadcom.com (Postfix) with ESMTP id 0BF6D1BD6C4; Fri, 12 Jun 2020 05:55:19 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 0BF6D1BD6C4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com; s=dkimrelay; t=1591966520; bh=vFgOTgvEavY4J04Ken5R8z1zFE0lW88PnFB6487d/BI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g0R/Nqn6nKwh60mUdhf38RNzKPIDElss/cHsuV0ebjeLbuy7jjFoXs9xxuQ0Ldzi9 vX0iZr5Cg4mjExNWwptLwNnFKnpLJfOY9u/RCt/a7JHpiDXV80CCcX5W+82CcE6ILk XaNN4Kf38qtPe84iWowR77dByu4mNR55pByqQ6/0= From: Somnath Kotur To: dev@dpdk.org Cc: ferruh.yigit@intel.com Date: Fri, 12 Jun 2020 18:20:08 +0530 Message-Id: <20200612125024.15989-21-somnath.kotur@broadcom.com> X-Mailer: git-send-email 2.10.1.613.g2cc2e70 In-Reply-To: <20200612125024.15989-1-somnath.kotur@broadcom.com> References: <20200612125024.15989-1-somnath.kotur@broadcom.com> Subject: [dpdk-dev] [PATCH 20/36] net/bnxt: rename regfile_wr_idx to regfile_idx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Kishore Padmanabha The regfile index shall be used for both write and read operations. Hence the field is renamed. Signed-off-by: Kishore Padmanabha Reviewed-by: Venkat Duvvuru Reviewed-by: Michael Baucom Signed-off-by: Somnath Kotur --- 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(-) 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 { -- 2.7.4