From: Randy Schacher <stuart.schac...@broadcom.com>

Remove references to AFM allocated memory which is no longer
supported with TCAM mgr and truflow

Signed-off-by: Randy Schacher <stuart.schac...@broadcom.com>
Reviewed-by: Farah Smith <farah.sm...@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmana...@broadcom.com>
Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapa...@broadcom.com>
---
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.c     | 121 ++++----
 drivers/net/bnxt/tf_core/cfa_tcam_mgr.h     |  27 +-
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c  | 320 +++-----------------
 drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c | 320 +++-----------------
 drivers/net/bnxt/tf_core/tf_resources.c     |   4 +-
 drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c  |  18 +-
 6 files changed, 143 insertions(+), 667 deletions(-)

diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c 
b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
index 165376182e..380e828da8 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.c
@@ -20,23 +20,23 @@
 #define TF_TCAM_SLICE_INVALID (-1)
 
 static int physical_table_types[CFA_TCAM_MGR_TBL_TYPE_MAX] = {
-       [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS] =
+       [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
                TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
-       [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS]  =
+       [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW]  =
                TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
-       [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS]        =
+       [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM]             =
                TF_TCAM_TBL_TYPE_PROF_TCAM,
-       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS]          =
+       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM]       =
                TF_TCAM_TBL_TYPE_WC_TCAM,
-       [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS]          =
+       [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM]       =
                TF_TCAM_TBL_TYPE_SP_TCAM,
-       [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS]      =
+       [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM]      =
                TF_TCAM_TBL_TYPE_CT_RULE_TCAM,
-       [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS]         =
+       [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM]              =
                TF_TCAM_TBL_TYPE_VEB_TCAM,
-       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS]     =
+       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH]     =
                TF_TCAM_TBL_TYPE_WC_TCAM_HIGH,
-       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS]      =
+       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW]      =
                TF_TCAM_TBL_TYPE_WC_TCAM_LOW,
 };
 
@@ -53,41 +53,23 @@ const char *
 cfa_tcam_mgr_tbl_2_str(enum cfa_tcam_mgr_tbl_type tcam_type)
 {
        switch (tcam_type) {
-       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM:
-               return "l2_ctxt_tcam_high AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH:
                return "l2_ctxt_tcam_high Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM:
-               return "l2_ctxt_tcam_low AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW:
                return "l2_ctxt_tcam_low Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM:
-               return "prof_tcam AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM:
                return "prof_tcam Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM:
-               return "wc_tcam AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM:
                return "wc_tcam Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM:
-               return "veb_tcam AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM:
                return "veb_tcam Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM:
-               return "sp_tcam AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_SP_TCAM:
                return "sp_tcam Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM:
-               return "ct_rule_tcam AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM:
                return "ct_rule_tcam Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM:
-               return "wc_tcam_high AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH:
                return "wc_tcam_high Apps";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM:
-               return "wc_tcam_low AFM";
-       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS:
+       case CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW:
                return "wc_tcam_low Apps";
        default:
                return "Invalid tcam table type";
@@ -972,10 +954,13 @@ cfa_tcam_mgr_bitmap_alloc(struct tf *tfp __rte_unused,
 
        /* Allocate first index to avoid idx 0 */
        first_idx = ba_alloc(tcam_mgr_data->session_bmp);
-       if (first_idx == BA_FAIL)
+       if (first_idx == BA_FAIL) {
+               tfp_free(tcam_mgr_data->session_bmp);
+               tcam_mgr_data->session_bmp = NULL;
                return -CFA_TCAM_MGR_ERR_CODE(NOSPC);
+       }
 
-       TFP_DRV_LOG(INFO,
+       TFP_DRV_LOG(DEBUG,
                    "session bitmap size is %" PRIX64 "\n",
                    tcam_mgr_data->session_bmp_size);
 
@@ -1087,8 +1072,9 @@ cfa_tcam_mgr_init(struct tf *tfp, enum 
cfa_tcam_mgr_device_type type,
        if (parms)
                parms->max_entries = tcam_mgr_data->cfa_tcam_mgr_max_entries;
 
-       CFA_TCAM_MGR_LOG(DEBUG, "Global TCAM tbl initialized max entries %d\n",
-                        tcam_mgr_data->cfa_tcam_mgr_max_entries);
+       CFA_TCAM_MGR_TRACE(DEBUG,
+                          "Global TCAM tbl initialized max entries %d\n",
+                          tcam_mgr_data->cfa_tcam_mgr_max_entries);
 
        return 0;
 }
@@ -1227,38 +1213,41 @@ cfa_tcam_mgr_shared_wc_bind(struct tf *tfp, bool 
dual_ha_app,
 
        for (dir = 0; dir < TF_DIR_MAX; dir++) {
                rc = cfa_tcam_mgr_tables_get(tfp, dir,
-                                            CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
-                                            &start_row, &end_row, 
&max_entries, &slices);
+                                            CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
+                                            &start_row, &end_row, &max_entries,
+                                            &slices);
                if (rc)
                        return rc;
                if (max_entries) {
                        rc = cfa_tcam_mgr_tables_set(tfp, dir,
-                                                    
CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
+                                            CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
                                                     start_row,
                                                     start_row +
-                                                    ((max_entries / slices) / 
num_pools) - 1,
+                                                    ((max_entries / slices) /
+                                                    num_pools) - 1,
                                                     max_entries / num_pools);
                        if (rc)
                                return rc;
                        rc = cfa_tcam_mgr_tables_set(tfp, dir,
-                                                    
CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+                                             CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
                                                     start_row +
-                                                    ((max_entries / slices) / 
num_pools),
+                                                    ((max_entries / slices) /
+                                                    num_pools),
                                                     start_row +
                                                     (max_entries / slices) - 1,
                                                     max_entries / num_pools);
                        if (rc)
                                return rc;
                        rc = cfa_tcam_mgr_tables_set(tfp, dir,
-                                                    
CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
+                                                 CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
                                                     0, 0, 0);
                        if (rc)
                                return rc;
-                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS] =
+                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH] =
                                max_entries / num_pools;
-                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS] =
+                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW] =
                                max_entries / num_pools;
-                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS] = 0;
+                       tcam_cnt[dir][CFA_TCAM_MGR_TBL_TYPE_WC_TCAM] = 0;
                }
        }
 
@@ -1389,8 +1378,8 @@ cfa_tcam_mgr_bind(struct tf *tfp,
                }
        }
 
-       CFA_TCAM_MGR_LOG(DEBUG, "TCAM table bind for max entries %d.\n",
-                        tcam_mgr_data->cfa_tcam_mgr_max_entries);
+       CFA_TCAM_MGR_TRACE(DEBUG, "TCAM table bind for max entries %d.\n",
+                          tcam_mgr_data->cfa_tcam_mgr_max_entries);
 
        if (tf_session_is_shared_hotup_session(tfs)) {
                rc = cfa_tcam_mgr_shared_wc_bind(tfp, false,
@@ -1537,16 +1526,6 @@ cfa_tcam_mgr_alloc(struct tf *tfp,
                return -CFA_TCAM_MGR_ERR_CODE(INVAL);
        }
 
-#if TF_TCAM_PRIORITY_MAX < UINT16_MAX
-       if (parms->priority > TF_TCAM_PRIORITY_MAX) {
-               CFA_TCAM_MGR_LOG_DIR(ERR, dir,
-                                    "%s: Priority:%u out of range (%u-%u).\n",
-                                    tf_dir_2_str(dir), parms->priority,
-                                    TF_TCAM_PRIORITY_MIN,
-                                    TF_TCAM_PRIORITY_MAX);
-       }
-#endif
-
        rc = tf_session_get_session_internal(tfp, &tfs);
        if (rc)
                return rc;
@@ -1650,7 +1629,7 @@ cfa_tcam_mgr_free(struct tf *tfp,
        id = parms->id;
        entry = cfa_tcam_mgr_entry_get(tcam_mgr_data, id);
        if (!entry) {
-               CFA_TCAM_MGR_LOG(INFO, "Entry %d not found\n", id);
+               CFA_TCAM_MGR_LOG(ERR, "Entry %d not found\n", id);
                return -CFA_TCAM_MGR_ERR_CODE(INVAL);
        }
 
@@ -1976,7 +1955,7 @@ cfa_tcam_mgr_shared_entry_move(struct cfa_tcam_mgr_data 
*tcam_mgr_data,
                return rc;
 
        sparms.dir         = dir;
-       sparms.type        = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS;
+       sparms.type        = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW;
        sparms.hcapi_type  = table_data->hcapi_type;
        sparms.key         = key;
        sparms.mask        = mask;
@@ -2033,7 +2012,7 @@ cfa_tcam_mgr_shared_entry_move(struct cfa_tcam_mgr_data 
*tcam_mgr_data,
 #ifdef CFA_TCAM_MGR_TRACING
        cfa_tcam_mgr_rows_dump(tfp, dir, type);
        cfa_tcam_mgr_rows_dump(tfp, dir,
-                              CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS);
+                              CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW);
 #endif
 
        return 0;
@@ -2065,15 +2044,15 @@ int cfa_tcam_mgr_shared_move(struct tf *tfp,
 
        src_table_data =
                &tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
-                       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS];
+                       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH];
        dst_table_data =
                &tcam_mgr_data->cfa_tcam_mgr_tables[parms->dir]
-                       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS];
+                       [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW];
 
        row_size =
                cfa_tcam_mgr_row_size_get(tcam_mgr_data,
                                          parms->dir,
-                                         
CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS);
+                                         CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH);
 
        for (src_row = src_table_data->start_row,
             dst_row = dst_table_data->start_row;
@@ -2099,8 +2078,8 @@ int cfa_tcam_mgr_shared_move(struct tf *tfp,
                        rc = cfa_tcam_mgr_shared_entry_move(tcam_mgr_data,
                                                        tfp,
                                                        parms->dir,
-                                                       
CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
-                                                       
src_table_row->entries[slice],
+                                            CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
+                                                 src_table_row->entries[slice],
                                                        dst_table_data,
                                                        src_table_data,
                                                        dst_row, slice,
@@ -2235,6 +2214,7 @@ cfa_tcam_mgr_tables_set(struct tf *tfp, enum tf_dir dir,
        return 0;
 }
 
+#ifdef CFA_TCAM_MGR_TRACING
 void
 cfa_tcam_mgr_rows_dump(struct tf *tfp, enum tf_dir dir,
                       enum cfa_tcam_mgr_tbl_type type)
@@ -2425,3 +2405,4 @@ cfa_tcam_mgr_entries_dump(struct tf *tfp)
        if (!entry_found)
                printf("No entries found.\n");
 }
+#endif /* CFA_TCAM_MGR_TRACING */
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h 
b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
index d4f8512d2a..25654a8351 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr.h
@@ -88,25 +88,16 @@
 
 /* Logical TCAM tables */
 enum cfa_tcam_mgr_tbl_type {
-       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM =
+       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH =
                CFA_TCAM_MGR_TBL_TYPE_START,
-       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM,
-       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+       CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM,
+       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
+       CFA_TCAM_MGR_TBL_TYPE_SP_TCAM,
+       CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM,
+       CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM,
+       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
+       CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
        CFA_TCAM_MGR_TBL_TYPE_MAX
 };
 
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c 
b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
index b2eadde61e..acb3a8f832 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p4.c
@@ -165,17 +165,7 @@ struct cfa_tcam_mgr_table_rows_p4 {
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
        {                               /* RX */
-               {                       /* High AFM */
-                       .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
-               },
-               {                       /* High APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -185,17 +175,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
                },
-               {                       /* Low AFM */
-                       .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
-               },
-               {                       /* Low APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -205,17 +185,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
                },
-               {                       /* AFM */
-                       .max_slices  = PROF_TCAM_RX_MAX_SLICES,
-                       .row_width   = PROF_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = PROF_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = PROF_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = PROF_TCAM_RX_MAX_SLICES,
                        .row_width   = PROF_TCAM_RX_ROW_WIDTH,
                        .num_rows    = PROF_TCAM_RX_NUM_ROWS,
@@ -225,17 +195,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = PROF_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -245,17 +205,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = SP_TCAM_RX_MAX_SLICES,
-                       .row_width   = SP_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = SP_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = SP_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = SP_TCAM_RX_MAX_SLICES,
                        .row_width   = SP_TCAM_RX_ROW_WIDTH,
                        .num_rows    = SP_TCAM_RX_NUM_ROWS,
@@ -265,16 +215,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = SP_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
-                       .row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
                        .row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
                        .num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
@@ -288,16 +229,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = CT_RULE_TCAM_RX_MAX_ENTRIES,
                        .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = VEB_TCAM_RX_MAX_SLICES,
-                       .row_width   = VEB_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = VEB_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = VEB_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = VEB_TCAM_RX_MAX_SLICES,
                        .row_width   = VEB_TCAM_RX_ROW_WIDTH,
                        .num_rows    = VEB_TCAM_RX_NUM_ROWS,
@@ -311,17 +243,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = VEB_TCAM_RX_MAX_ENTRIES,
                        .result_size = VEB_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -331,17 +253,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -353,17 +265,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                },
        },
        {                               /* TX */
-               {                       /* AFM */
-                       .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -373,17 +275,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_HIGH,
                },
-               {                       /* AFM */
-                       .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -393,17 +285,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_L2_CTXT_TCAM_LOW,
                },
-               {                       /* AFM */
-                       .max_slices  = PROF_TCAM_TX_MAX_SLICES,
-                       .row_width   = PROF_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = PROF_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = PROF_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = PROF_TCAM_TX_MAX_SLICES,
                        .row_width   = PROF_TCAM_TX_ROW_WIDTH,
                        .num_rows    = PROF_TCAM_TX_NUM_ROWS,
@@ -413,17 +295,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = PROF_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_PROF_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -433,17 +305,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = SP_TCAM_TX_MAX_SLICES,
-                       .row_width   = SP_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = SP_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = SP_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = SP_TCAM_TX_MAX_SLICES,
                        .row_width   = SP_TCAM_TX_ROW_WIDTH,
                        .num_rows    = SP_TCAM_TX_NUM_ROWS,
@@ -453,16 +315,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = SP_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_SP_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
-                       .row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
                        .row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
                        .num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
@@ -476,16 +329,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = CT_RULE_TCAM_TX_MAX_ENTRIES,
                        .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = VEB_TCAM_TX_MAX_SLICES,
-                       .row_width   = VEB_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = VEB_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = VEB_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = VEB_TCAM_TX_MAX_SLICES,
                        .row_width   = VEB_TCAM_TX_ROW_WIDTH,
                        .num_rows    = VEB_TCAM_TX_NUM_ROWS,
@@ -495,17 +339,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = VEB_TCAM_RX_RESULT_SIZE,
 /*                     .hcapi_type  = */
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -515,17 +349,7 @@ 
cfa_tcam_mgr_tables_p4[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P4_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -633,164 +457,92 @@ cfa_tcam_mgr_init_p4(struct tf *tfp)
               sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_PROF_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_PROF_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_PROF_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_PROF_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_SP_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_SP_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_SP_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_SP_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_CT_RULE_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_CT_RULE_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_VEB_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_VEB_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_VEB_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_VEB_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX_HIGH[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX_HIGH[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX_LOW[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX_LOW[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX_LOW[0];
 
diff --git a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c 
b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
index aa322b4452..3edffab10f 100644
--- a/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
+++ b/drivers/net/bnxt/tf_core/cfa_tcam_mgr_p58.c
@@ -165,17 +165,7 @@ struct cfa_tcam_mgr_table_rows_p58 {
 struct cfa_tcam_mgr_table_data
 cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
        {                               /* RX */
-               {                       /* High AFM */
-                       .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = 0,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
-               },
-               {                       /* High APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -185,17 +175,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
                },
-               {                       /* Low AFM */
-                       .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = 0,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
-               },
-               {                       /* Low APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_RX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_RX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_RX_NUM_ROWS,
@@ -205,17 +185,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
                },
-               {                       /* AFM */
-                       .max_slices  = PROF_TCAM_RX_MAX_SLICES,
-                       .row_width   = PROF_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = 0,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = PROF_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = PROF_TCAM_RX_MAX_SLICES,
                        .row_width   = PROF_TCAM_RX_ROW_WIDTH,
                        .num_rows    = PROF_TCAM_RX_NUM_ROWS,
@@ -225,17 +195,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = PROF_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -245,16 +205,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = SP_TCAM_RX_MAX_SLICES,
-                       .row_width   = SP_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = 0,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = SP_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = SP_TCAM_RX_MAX_SLICES,
                        .row_width   = SP_TCAM_RX_ROW_WIDTH,
                        .num_rows    = SP_TCAM_RX_NUM_ROWS,
@@ -263,16 +214,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = SP_TCAM_RX_MAX_ENTRIES,
                        .result_size = SP_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
-                       .row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = CT_RULE_TCAM_RX_MAX_SLICES,
                        .row_width   = CT_RULE_TCAM_RX_ROW_WIDTH,
                        .num_rows    = CT_RULE_TCAM_RX_NUM_ROWS,
@@ -286,17 +228,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = CT_RULE_TCAM_RX_MAX_ENTRIES,
                        .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = VEB_TCAM_RX_MAX_SLICES,
-                       .row_width   = VEB_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = VEB_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = VEB_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = VEB_TCAM_RX_MAX_SLICES,
                        .row_width   = VEB_TCAM_RX_ROW_WIDTH,
                        .num_rows    = VEB_TCAM_RX_NUM_ROWS,
@@ -310,17 +242,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = VEB_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -330,17 +252,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_RX_MAX_SLICES,
-                       .row_width   = WC_TCAM_RX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_RX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_RX_MAX_SLICES,
                        .row_width   = WC_TCAM_RX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_RX_NUM_ROWS,
@@ -352,17 +264,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                },
        },
        {                               /* TX */
-               {                       /* AFM */
-                       .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -372,17 +274,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_HIGH,
                },
-               {                       /* AFM */
-                       .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
-                       .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = L2_CTXT_TCAM_TX_MAX_SLICES,
                        .row_width   = L2_CTXT_TCAM_TX_ROW_WIDTH,
                        .num_rows    = L2_CTXT_TCAM_TX_NUM_ROWS,
@@ -392,17 +284,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = L2_CTXT_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_L2_CTXT_TCAM_LOW,
                },
-               {                       /* AFM */
-                       .max_slices  = PROF_TCAM_TX_MAX_SLICES,
-                       .row_width   = PROF_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = PROF_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = PROF_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = PROF_TCAM_TX_MAX_SLICES,
                        .row_width   = PROF_TCAM_TX_ROW_WIDTH,
                        .num_rows    = PROF_TCAM_TX_NUM_ROWS,
@@ -412,17 +294,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = PROF_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_PROF_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -432,16 +304,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = SP_TCAM_TX_MAX_SLICES,
-                       .row_width   = SP_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = SP_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = SP_TCAM_TX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = SP_TCAM_TX_MAX_SLICES,
                        .row_width   = SP_TCAM_TX_ROW_WIDTH,
                        .num_rows    = SP_TCAM_TX_NUM_ROWS,
@@ -450,16 +313,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = SP_TCAM_TX_MAX_ENTRIES,
                        .result_size = SP_TCAM_TX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
-                       .row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = CT_RULE_TCAM_TX_MAX_SLICES,
                        .row_width   = CT_RULE_TCAM_TX_ROW_WIDTH,
                        .num_rows    = CT_RULE_TCAM_TX_NUM_ROWS,
@@ -473,17 +327,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .max_entries = CT_RULE_TCAM_TX_MAX_ENTRIES,
                        .result_size = CT_RULE_TCAM_RX_RESULT_SIZE,
                },
-               {                       /* AFM */
-                       .max_slices  = VEB_TCAM_TX_MAX_SLICES,
-                       .row_width   = VEB_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = VEB_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = VEB_TCAM_RX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = VEB_TCAM_TX_MAX_SLICES,
                        .row_width   = VEB_TCAM_TX_ROW_WIDTH,
                        .num_rows    = VEB_TCAM_TX_NUM_ROWS,
@@ -493,17 +337,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = VEB_TCAM_RX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_VEB_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -513,17 +347,7 @@ 
cfa_tcam_mgr_tables_p58[TF_DIR_MAX][CFA_TCAM_MGR_TBL_TYPE_MAX] = {
                        .result_size = WC_TCAM_TX_RESULT_SIZE,
                        .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
                },
-               {                       /* AFM */
-                       .max_slices  = WC_TCAM_TX_MAX_SLICES,
-                       .row_width   = WC_TCAM_TX_ROW_WIDTH,
-                       .num_rows    = WC_TCAM_TX_NUM_ROWS,
-                       .start_row   = 0,
-                       .end_row     = 0,
-                       .max_entries = 0,
-                       .result_size = WC_TCAM_TX_RESULT_SIZE,
-                       .hcapi_type  = CFA_RESOURCE_TYPE_P58_WC_TCAM,
-               },
-               {                       /* APPS */
+               {
                        .max_slices  = WC_TCAM_TX_MAX_SLICES,
                        .row_width   = WC_TCAM_TX_ROW_WIDTH,
                        .num_rows    = WC_TCAM_TX_NUM_ROWS,
@@ -624,164 +448,92 @@ cfa_tcam_mgr_init_p58(struct tf *tfp)
               sizeof(tcam_mgr_data->cfa_tcam_mgr_tables));
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_L2_CTXT_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_PROF_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_PROF_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_PROF_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_PROF_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_SP_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_SP_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_SP_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_SP_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_SP_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_CT_RULE_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_CT_RULE_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_CT_RULE_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_CT_RULE_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_VEB_TCAM_RX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_VEB_TCAM_RX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_VEB_TCAM_TX[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_VEB_TCAM_TX[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX_HIGH[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX_HIGH[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX_HIGH[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX_HIGH[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_RX_LOW[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_RX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_RX_LOW[0];
 
        tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_AFM].tcam_rows =
-               (struct cfa_tcam_mgr_table_rows_0 *)
-               &table_rows->table_rows_WC_TCAM_TX_LOW[0];
-       tcam_mgr_data->cfa_tcam_mgr_tables[TF_DIR_TX]
-               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS].tcam_rows =
+               [CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW].tcam_rows =
                (struct cfa_tcam_mgr_table_rows_0 *)
                &table_rows->table_rows_WC_TCAM_TX_LOW[0];
 
diff --git a/drivers/net/bnxt/tf_core/tf_resources.c 
b/drivers/net/bnxt/tf_core/tf_resources.c
index d4fd3c2333..600149d77e 100644
--- a/drivers/net/bnxt/tf_core/tf_resources.c
+++ b/drivers/net/bnxt/tf_core/tf_resources.c
@@ -88,7 +88,7 @@ tf_tcam_mgr_row_entry_used(struct cfa_tcam_mgr_table_rows_0 
*row,
 /* Initialize the resource usage buffer for WC-TCAM tables */
 void tf_tcam_usage_init(struct tf *tfp)
 {
-       enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS;
+       enum cfa_tcam_mgr_tbl_type type = CFA_TCAM_MGR_TBL_TYPE_WC_TCAM;
        struct cfa_tcam_mgr_table_data *table_data = NULL;
        struct tf_resc_wc_tcam_usage *usage_data = NULL;
        struct cfa_tcam_mgr_data *tcam_mgr_data;
@@ -169,7 +169,7 @@ int tf_tcam_usage_update(struct tf *tfp,
                return -1;
 
        /* Support WC-TCAM APPs only */
-       if (tcam_tbl_type != CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS)
+       if (tcam_tbl_type != CFA_TCAM_MGR_TBL_TYPE_WC_TCAM)
                return 0;
 
        resc_usage_control.buffer_dirty[dir] = 1;
diff --git a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c 
b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
index 8c1e6d2e0f..8cf4d4d1fb 100644
--- a/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
+++ b/drivers/net/bnxt/tf_core/tf_tcam_mgr_msg.c
@@ -17,23 +17,23 @@
  */
 static enum cfa_tcam_mgr_tbl_type tcam_types[TF_TCAM_TBL_TYPE_MAX] = {
        [TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-               CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        [TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW]  =
-               CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_L2_CTXT_TCAM_LOW,
        [TF_TCAM_TBL_TYPE_PROF_TCAM]         =
-               CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_PROF_TCAM,
        [TF_TCAM_TBL_TYPE_WC_TCAM]           =
-               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM,
        [TF_TCAM_TBL_TYPE_SP_TCAM]           =
-               CFA_TCAM_MGR_TBL_TYPE_SP_TCAM_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_SP_TCAM,
        [TF_TCAM_TBL_TYPE_CT_RULE_TCAM]      =
-               CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_CT_RULE_TCAM,
        [TF_TCAM_TBL_TYPE_VEB_TCAM]          =
-               CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_VEB_TCAM,
        [TF_TCAM_TBL_TYPE_WC_TCAM_HIGH]      =
-               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_HIGH,
        [TF_TCAM_TBL_TYPE_WC_TCAM_LOW]       =
-               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW_APPS,
+               CFA_TCAM_MGR_TBL_TYPE_WC_TCAM_LOW,
 };
 
 static uint16_t hcapi_type[TF_TCAM_TBL_TYPE_MAX];
-- 
2.39.3

Reply via email to