[16/36] net/bnxt: remove cache_tbl_id enums
diff mbox series

Message ID 20200610065733.18698-17-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 bnxt_ulp_cache_tbl_id enums are not required any longer
since the index is now calculated using resource sub type
and direction.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Michael Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ccxsw Build <ccxsw.build@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 drivers/net/bnxt/tf_ulp/ulp_template_db.c | 16 ++++++++--------
 drivers/net/bnxt/tf_ulp/ulp_template_db.h |  8 --------
 2 files changed, 8 insertions(+), 16 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.c b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
index cb5e325..395d33b 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db.c
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.c
@@ -294,17 +294,17 @@  struct bnxt_ulp_rte_act_info ulp_act_info[] = {
 };
 
 struct bnxt_ulp_cache_tbl_params ulp_cache_tbl_params[] = {
-	[BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_INGRESS] = {
-		.num_entries             = 16384
+	[BNXT_ULP_RESOURCE_SUB_TYPE_TT_L2_CNTXT_TCAM_CACHE << 1 | TF_DIR_RX] = {
+		.num_entries        = 16384
 	},
-	[BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_EGRESS] = {
-		.num_entries             = 16384
+	[BNXT_ULP_RESOURCE_SUB_TYPE_TT_L2_CNTXT_TCAM_CACHE << 1 | TF_DIR_TX] = {
+		.num_entries        = 16384
 	},
-	[BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_INGRESS] = {
-		.num_entries             = 16384
+	[BNXT_ULP_RESOURCE_SUB_TYPE_TT_PROFILE_TCAM_CACHE << 1 | TF_DIR_RX] = {
+		.num_entries        = 16384
 	},
-	[BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_EGRESS] = {
-		.num_entries             = 16384
+	[BNXT_ULP_RESOURCE_SUB_TYPE_TT_PROFILE_TCAM_CACHE << 1 | TF_DIR_TX] = {
+		.num_entries        = 16384
 	}
 };
 
diff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db.h b/drivers/net/bnxt/tf_ulp/ulp_template_db.h
index 6935072..a850e22 100644
--- a/drivers/net/bnxt/tf_ulp/ulp_template_db.h
+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db.h
@@ -88,14 +88,6 @@  enum bnxt_ulp_byte_order {
 	BNXT_ULP_BYTE_ORDER_LAST = 2
 };
 
-enum bnxt_ulp_cache_tbl_id {
-	BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_INGRESS = 0,
-	BNXT_ULP_CACHE_TBL_ID_L2_CNTXT_TCAM_EGRESS = 1,
-	BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_INGRESS = 2,
-	BNXT_ULP_CACHE_TBL_ID_PROFILE_TCAM_EGRESS = 3,
-	BNXT_ULP_CACHE_TBL_ID_LAST = 4
-};
-
 enum bnxt_ulp_cf_idx {
 	BNXT_ULP_CF_IDX_MPLS_TAG_NUM = 0,
 	BNXT_ULP_CF_IDX_O_VTAG_NUM = 1,