]> git.droids-corp.org - dpdk.git/commitdiff
net/bnxt: modify TCAM opcode processing
authorKishore Padmanabha <kishore.padmanabha@broadcom.com>
Sun, 30 May 2021 08:59:01 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:01:58 +0000 (02:01 +0200)
Added TCAM table specific opcode to process TCAM entry creation
and reuse. This change removes the TCAM cache mechanism and uses
the generic table mechanism for reuse of TCAM entries.

Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/tf_ulp/ulp_mapper.c
drivers/net/bnxt/tf_ulp/ulp_mapper.h
drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h
drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c
drivers/net/bnxt/tf_ulp/ulp_template_struct.h

index c70e1c52151e2f5f6c3bfd869aa4199986b29899..56005480af19bbfd8cd4db1de2e67c7568f6377a 100644 (file)
@@ -1356,20 +1356,11 @@ ulp_mapper_tcam_tbl_scan_ident_alloc(struct bnxt_ulp_mapper_parms *parms,
        uint32_t num_idents;
        uint32_t i;
 
-       /*
-        * Since the cache entry is responsible for allocating
-        * identifiers when in use, allocate the identifiers only
-        * during normal processing.
-        */
-       if (parms->tcam_tbl_opc ==
-           BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL) {
-               idents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);
-
-               for (i = 0; i < num_idents; i++) {
-                       if (ulp_mapper_ident_process(parms, tbl,
-                                                    &idents[i], NULL))
-                               return -EINVAL;
-               }
+       idents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);
+       for (i = 0; i < num_idents; i++) {
+               if (ulp_mapper_ident_process(parms, tbl,
+                                            &idents[i], NULL))
+                       return -EINVAL;
        }
        return 0;
 }
@@ -1490,14 +1481,15 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
        struct tf_search_tcam_entry_parms searchparms   = { 0 };
        struct ulp_flow_db_res_params   fid_parms       = { 0 };
        struct tf_free_tcam_entry_parms free_parms      = { 0 };
-       enum bnxt_ulp_search_before_alloc search_flag;
        uint32_t hit = 0;
        uint16_t tmplen = 0;
        uint16_t idx;
 
-       /* Skip this if was handled by the cache. */
-       if (parms->tcam_tbl_opc == BNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_SKIP) {
-               parms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;
+       /* Skip this if table opcode is NOP */
+       if (tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_NOT_USED ||
+           tbl->tbl_opcode >= BNXT_ULP_TCAM_TBL_OPC_LAST) {
+               BNXT_TF_DBG(ERR, "Invalid tcam table opcode %d\n",
+                           tbl->tbl_opcode);
                return 0;
        }
 
@@ -1555,41 +1547,31 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                }
        }
 
+       /* For wild card tcam perform the post process to swap the blob */
        if (tbl->resource_type == TF_TCAM_TBL_TYPE_WC_TCAM) {
                ulp_mapper_wc_tcam_tbl_post_process(&key, tbl->key_bit_size);
                ulp_mapper_wc_tcam_tbl_post_process(&mask, tbl->key_bit_size);
        }
 
-       if (tbl->srch_b4_alloc == BNXT_ULP_SEARCH_BEFORE_ALLOC_NO) {
-               /*
-                * No search for re-use is requested, so simply allocate the
-                * tcam index.
-                */
-               aparms.dir              = tbl->direction;
-               aparms.tcam_tbl_type    = tbl->resource_type;
-               aparms.search_enable    = tbl->srch_b4_alloc;
-               aparms.key              = ulp_blob_data_get(&key, &tmplen);
-               aparms.key_sz_in_bits   = tmplen;
+       if (tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE) {
+               /* allocate the tcam index */
+               aparms.dir = tbl->direction;
+               aparms.tcam_tbl_type = tbl->resource_type;
+               aparms.key = ulp_blob_data_get(&key, &tmplen);
+               aparms.key_sz_in_bits = tmplen;
                if (tbl->blob_key_bit_size != tmplen) {
                        BNXT_TF_DBG(ERR, "Key len (%d) != Expected (%d)\n",
                                    tmplen, tbl->blob_key_bit_size);
                        return -EINVAL;
                }
 
-               aparms.mask             = ulp_blob_data_get(&mask, &tmplen);
+               aparms.mask = ulp_blob_data_get(&mask, &tmplen);
                if (tbl->blob_key_bit_size != tmplen) {
                        BNXT_TF_DBG(ERR, "Mask len (%d) != Expected (%d)\n",
                                    tmplen, tbl->blob_key_bit_size);
                        return -EINVAL;
                }
-
-               aparms.priority         = tbl->priority;
-
-               /*
-                * All failures after this succeeds require the entry to be
-                * freed. cannot return directly on failure, but needs to goto
-                * error.
-                */
+               aparms.priority = tbl->priority;
                rc = tf_alloc_tcam_entry(tfp, &aparms);
                if (rc) {
                        BNXT_TF_DBG(ERR, "tcam alloc failed rc=%d.\n", rc);
@@ -1627,14 +1609,18 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                hit = searchparms.hit;
        }
 
-       /* if it is miss then it is same as no search before alloc */
-       if (!hit)
-               search_flag = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO;
-       else
-               search_flag = tbl->srch_b4_alloc;
+       /* Write the tcam index into the regfile*/
+       if (!ulp_regfile_write(parms->regfile, tbl->tbl_operand,
+                              (uint64_t)tfp_cpu_to_be_64(idx))) {
+               BNXT_TF_DBG(ERR, "Regfile[%d] write failed.\n",
+                           tbl->tbl_operand);
+               rc = -EINVAL;
+               /* Need to free the tcam idx, so goto error */
+               goto error;
+       }
 
-       switch (search_flag) {
-       case BNXT_ULP_SEARCH_BEFORE_ALLOC_NO:
+       /* if it is miss then it is same as no search before alloc */
+       if (!hit || tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE) {
                /*Scan identifier list, allocate identifier and update regfile*/
                rc = ulp_mapper_tcam_tbl_scan_ident_alloc(parms, tbl);
                /* Create the result blob */
@@ -1645,60 +1631,29 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                if (!rc)
                        rc = ulp_mapper_tcam_tbl_entry_write(parms, tbl, &key,
                                                             &mask, &data, idx);
-               break;
-       case BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP:
-               /*Scan identifier list, extract identifier and update regfile*/
-               rc = ulp_mapper_tcam_tbl_scan_ident_extract(parms, tbl, &data);
-               break;
-       case BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE:
+       } else {
                /*Scan identifier list, extract identifier and update regfile*/
                rc = ulp_mapper_tcam_tbl_scan_ident_extract(parms, tbl, &data);
-               /* Create the result blob */
-               if (!rc)
-                       rc = ulp_mapper_tcam_tbl_result_create(parms, tbl,
-                                                              &update_data);
-               /* Update/overwrite the tcam entry */
-               if (!rc)
-                       rc = ulp_mapper_tcam_tbl_entry_write(parms, tbl, &key,
-                                                            &mask,
-                                                            &update_data, idx);
-               break;
-       default:
-               BNXT_TF_DBG(ERR, "invalid search opcode\n");
-               rc =  -EINVAL;
-               break;
        }
        if (rc)
                goto error;
-       /*
-        * Only link the entry to the flow db in the event that cache was not
-        * used.
-        */
-       if (parms->tcam_tbl_opc == BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL) {
-               fid_parms.direction = tbl->direction;
-               fid_parms.resource_func = tbl->resource_func;
-               fid_parms.resource_type = tbl->resource_type;
-               fid_parms.critical_resource = tbl->critical_resource;
-               fid_parms.resource_hndl = idx;
-               rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
-               if (rc) {
-                       BNXT_TF_DBG(ERR,
-                                   "Failed to link resource to flow rc = %d\n",
-                                   rc);
-                       /* Need to free the identifier, so goto error */
-                       goto error;
-               }
-       } else {
-               /*
-                * Reset the tcam table opcode to normal in case the next tcam
-                * entry does not use cache.
-                */
-               parms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;
+
+       /* Add the tcam index to the flow database */
+       fid_parms.direction = tbl->direction;
+       fid_parms.resource_func = tbl->resource_func;
+       fid_parms.resource_type = tbl->resource_type;
+       fid_parms.critical_resource = tbl->critical_resource;
+       fid_parms.resource_hndl = idx;
+       rc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to link resource to flow rc = %d\n",
+                           rc);
+               /* Need to free the identifier, so goto error */
+               goto error;
        }
 
        return 0;
 error:
-       parms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;
        free_parms.dir                  = tbl->direction;
        free_parms.tcam_tbl_type        = tbl->resource_type;
        free_parms.idx                  = idx;
@@ -1706,7 +1661,6 @@ error:
        if (trc)
                BNXT_TF_DBG(ERR, "Failed to free tcam[%d][%d][%d] on failure\n",
                            tbl->resource_type, tbl->direction, idx);
-
        return rc;
 }
 
@@ -2976,7 +2930,6 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,
        parms.comp_fld = cparms->comp_fld;
        parms.tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx);
        parms.ulp_ctx = ulp_ctx;
-       parms.tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;
        parms.act_tid = cparms->act_tid;
        parms.class_tid = cparms->class_tid;
        parms.flow_type = cparms->flow_type;
index 8bc6cdbdd563846a8611a1d585d5691d842a765b..4c423d2374c47da44640e08d8d400fdb2a49d3e5 100644 (file)
 
 #define ULP_IDENTS_INVALID ((uint16_t)0xffff)
 
-/*
- * The cache table opcode is used to convey informat from the cache handler
- * to the tcam handler.  The opcodes do the following:
- * NORMAL - tcam should process all instructions as normal
- * SKIP - tcam is using the cached entry and doesn't need to process the
- *     instruction.
- * ALLOC - tcam needs to allocate the tcam index and store in the cache entry
- */
-enum bnxt_ulp_cache_table_opc {
-       BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL,
-       BNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_SKIP,
-       BNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_ALLOC
-};
-
 struct bnxt_ulp_mapper_glb_resource_entry {
        enum bnxt_ulp_resource_func     resource_func;
        uint32_t                        resource_type; /* TF_ enum type */
@@ -66,7 +52,6 @@ struct bnxt_ulp_mapper_parms {
        uint32_t                                fid;
        enum bnxt_ulp_fdb_type                  flow_type;
        struct bnxt_ulp_mapper_data             *mapper_data;
-       enum bnxt_ulp_cache_table_opc           tcam_tbl_opc;
        struct bnxt_ulp_device_params           *device_params;
        uint32_t                                parent_fid;
        uint32_t                                parent_flow;
index e4b8c56472abd475b0ca32067960d3d703c9f050..ddc396b3f9f52938cc8c540fad4a20a972a2128e 100644 (file)
@@ -323,6 +323,13 @@ enum bnxt_ulp_regfile_index {
        BNXT_ULP_REGFILE_INDEX_LAST = 30
 };
 
+enum bnxt_ulp_tcam_tbl_opc {
+       BNXT_ULP_TCAM_TBL_OPC_NOT_USED = 0,
+       BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE = 1,
+       BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE = 2,
+       BNXT_ULP_TCAM_TBL_OPC_LAST = 3
+};
+
 enum bnxt_ulp_search_before_alloc {
        BNXT_ULP_SEARCH_BEFORE_ALLOC_NO = 0,
        BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP = 1,
index ddf82c4abe11f1a1eb5d4abdfd179afb60785310..7a22aedf836331a86e9acc4ca12a6a630f7f7d31 100644 (file)
@@ -226,7 +226,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1,
        .blob_key_bit_size = 167,
@@ -295,7 +296,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .cond_opcode = BNXT_ULP_COND_OPC_COMP_FIELD_IS_SET,
        .cond_operand = BNXT_ULP_CF_IDX_VFR_MODE,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 14,
        .blob_key_bit_size = 167,
@@ -335,7 +337,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .cond_opcode = BNXT_ULP_COND_OPC_COMP_FIELD_NOT_SET,
        .cond_operand = BNXT_ULP_CF_IDX_VFR_MODE,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 28,
        .blob_key_bit_size = 167,
@@ -434,7 +437,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 42,
        .blob_key_bit_size = 167,
@@ -523,7 +527,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 82,
        .blob_key_bit_size = 167,
@@ -590,7 +595,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 95,
        .blob_key_bit_size = 167,
@@ -624,7 +630,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 108,
        .blob_key_bit_size = 167,
@@ -660,7 +667,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_1,
        .key_start_idx = 124,
        .blob_key_bit_size = 81,
@@ -715,7 +723,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 189,
        .blob_key_bit_size = 167,
@@ -751,7 +760,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_1,
        .key_start_idx = 205,
        .blob_key_bit_size = 81,
@@ -823,7 +833,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 271,
        .blob_key_bit_size = 167,
@@ -859,7 +870,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 287,
        .blob_key_bit_size = 81,
@@ -931,7 +943,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 353,
        .blob_key_bit_size = 167,
@@ -967,7 +980,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 369,
        .blob_key_bit_size = 81,
@@ -1039,7 +1053,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 435,
        .blob_key_bit_size = 167,
@@ -1075,7 +1090,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 451,
        .blob_key_bit_size = 81,
@@ -1147,7 +1163,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 517,
        .blob_key_bit_size = 167,
@@ -1183,7 +1200,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 533,
        .blob_key_bit_size = 81,
@@ -1238,7 +1256,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 598,
        .blob_key_bit_size = 167,
@@ -1274,7 +1293,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 614,
        .blob_key_bit_size = 81,
@@ -1329,7 +1349,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 679,
        .blob_key_bit_size = 167,
@@ -1365,7 +1386,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 695,
        .blob_key_bit_size = 81,
@@ -1420,7 +1442,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 760,
        .blob_key_bit_size = 167,
@@ -1456,7 +1479,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 776,
        .blob_key_bit_size = 81,
@@ -1511,7 +1535,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 841,
        .blob_key_bit_size = 167,
@@ -1547,7 +1572,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 857,
        .blob_key_bit_size = 81,
@@ -1602,7 +1628,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 922,
        .blob_key_bit_size = 167,
@@ -1638,7 +1665,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 938,
        .blob_key_bit_size = 81,
@@ -1693,7 +1721,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1003,
        .blob_key_bit_size = 167,
@@ -1729,7 +1758,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1019,
        .blob_key_bit_size = 81,
@@ -1801,7 +1831,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1084,
        .blob_key_bit_size = 167,
@@ -1837,7 +1868,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1100,
        .blob_key_bit_size = 81,
@@ -1875,7 +1907,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1148,
        .blob_key_bit_size = 167,
@@ -1911,7 +1944,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_RX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1164,
        .blob_key_bit_size = 81,
@@ -1983,7 +2017,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1224,
        .blob_key_bit_size = 167,
@@ -2019,7 +2054,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1240,
        .blob_key_bit_size = 81,
@@ -2091,7 +2127,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1306,
        .blob_key_bit_size = 167,
@@ -2127,7 +2164,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1322,
        .blob_key_bit_size = 81,
@@ -2199,7 +2237,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1388,
        .blob_key_bit_size = 167,
@@ -2235,7 +2274,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1404,
        .blob_key_bit_size = 81,
@@ -2307,7 +2347,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1470,
        .blob_key_bit_size = 167,
@@ -2343,7 +2384,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1486,
        .blob_key_bit_size = 81,
@@ -2398,7 +2440,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1551,
        .blob_key_bit_size = 167,
@@ -2434,7 +2477,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1567,
        .blob_key_bit_size = 81,
@@ -2489,7 +2533,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1624,
        .blob_key_bit_size = 167,
@@ -2525,7 +2570,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {
        .resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
        .resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,
        .direction = TF_DIR_TX,
-       .srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,
+       .tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,
+       .tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,
        .priority = BNXT_ULP_PRIORITY_LEVEL_0,
        .key_start_idx = 1640,
        .blob_key_bit_size = 81,
index 9a15968ea852b323c2cf5b1a96ce91dcaa107953..ee17390358e582197c8199d8c63bfe52f4a2c0e3 100644 (file)
@@ -234,6 +234,7 @@ struct bnxt_ulp_mapper_tbl_info {
 
        /* Table opcode for table operations */
        uint32_t                        tbl_opcode;
+       uint32_t                        tbl_operand;
 
        /* FDB table opcode */
        enum bnxt_ulp_fdb_opc           fdb_opcode;