get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/94124/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 94124,
    "url": "https://patches.dpdk.org/api/patches/94124/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210613000652.28191-31-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210613000652.28191-31-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210613000652.28191-31-ajit.khaparde@broadcom.com",
    "date": "2021-06-13T00:06:24",
    "name": "[v2,30/58] net/bnxt: modify TCAM opcode processing",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4f56e36ad4602857677788d6cac7117e4467550b",
    "submitter": {
        "id": 501,
        "url": "https://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "https://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210613000652.28191-31-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 17305,
            "url": "https://patches.dpdk.org/api/series/17305/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17305",
            "date": "2021-06-13T00:05:54",
            "name": "enhancements to host based flow table management",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/17305/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/94124/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/94124/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 287B6A0C41;\n\tSun, 13 Jun 2021 02:11:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D57E6411E7;\n\tSun, 13 Jun 2021 02:07:48 +0200 (CEST)",
            "from mail-pf1-f179.google.com (mail-pf1-f179.google.com\n [209.85.210.179])\n by mails.dpdk.org (Postfix) with ESMTP id 936F0411A3\n for <dev@dpdk.org>; Sun, 13 Jun 2021 02:07:46 +0200 (CEST)",
            "by mail-pf1-f179.google.com with SMTP id u18so7595252pfk.11\n for <dev@dpdk.org>; Sat, 12 Jun 2021 17:07:46 -0700 (PDT)",
            "from localhost.localdomain ([192.19.223.252])\n by smtp.gmail.com with ESMTPSA id gg22sm12774609pjb.17.2021.06.12.17.07.43\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Sat, 12 Jun 2021 17:07:44 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version; bh=JVaFgqvb9BEsLi/OIjuQsmrqGjUmDSPPY8bHwPOGD90=;\n b=BcCjkYjYpT1xKTzPZ3yj25ZlpYlMXqzB/5YCbvfUQzDW68Luq9SMvW+7jPoPYDaQu9\n FWohvbRoNXfiw6YW8MayCKl7N1Mlgml8oeWFuQo4x463s5hFxb2toLu/TQ6dYuXrNth4\n QEO93x180nsI3OnkbmzuaZRaKcN33Tv72g1gA=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version;\n bh=JVaFgqvb9BEsLi/OIjuQsmrqGjUmDSPPY8bHwPOGD90=;\n b=KCnRPZinC5XB6k0sfoBMxVtIueujv4ePncS1N6Lncd4lCWbA46FXJ0Vv1mo7znLcDK\n evJh940yoSopDIj5nVApHTPq8wg+SPKH7RCsL9/FJHyjsDAh9H0HNiIfTm5C10JuzIKv\n /+iRdFM64kU5g6ODOL+V3ljBejhr1KG7h2ZWhPHujHvc16R4SCCIpmhKjs1GilAi0JGy\n r+Ly3fJRZpabyBlLHRXmdCkEEcQh4lc8BitzJwLWjgS7OPCaA/sPzwwoSCm1NiEKKjsd\n dy+kAOdkKU1gOZyKZneNnu0V7ScTrP6cbg8vdBtsh1yGhZP4P2/v5Dba4376eZv9/sNI\n LD3Q==",
        "X-Gm-Message-State": "AOAM532df39xsOjQKkLIuniY/RPp/BDjJnyaXXNZca0Txq00KaknelFN\n y6tBdNnwpaGaP2fjz3IbJqvLYWrrGWG5HHkDJSCkqytKBJ6rMMRz3RtD2il4m5jfWVlrL1+Gn35\n D2D1Sc1xswRmWmoAcGWNK0zvJfsuvpKBc+Xxevr6jnXHm4E6B420/SKXoQuATmqw=",
        "X-Google-Smtp-Source": "\n ABdhPJwqqMcDJ2zJd3SaN6La11UyYpVHGAv4zKKgQ23EJQ9gH1lTuitbfBjFtQJgsrYYSs1n3nYgxw==",
        "X-Received": "by 2002:a63:4b59:: with SMTP id\n k25mr10400219pgl.252.1623542865142;\n Sat, 12 Jun 2021 17:07:45 -0700 (PDT)",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Kishore Padmanabha <kishore.padmanabha@broadcom.com>,\n Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>,\n Mike Baucom <michael.baucom@broadcom.com>",
        "Date": "Sat, 12 Jun 2021 17:06:24 -0700",
        "Message-Id": "<20210613000652.28191-31-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20210613000652.28191-1-ajit.khaparde@broadcom.com>",
        "References": "<20210530085929.29695-1-venkatkumar.duvvuru@broadcom.com>\n <20210613000652.28191-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/signed; protocol=\"application/pkcs7-signature\";\n micalg=sha-256; boundary=\"000000000000c9c04005c49a872f\"",
        "X-Content-Filtered-By": "Mailman/MimeDel 2.1.29",
        "Subject": "[dpdk-dev] [PATCH v2 30/58] net/bnxt: modify TCAM opcode processing",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\n\nAdded TCAM table specific opcode to process TCAM entry creation\nand reuse. This change removes the TCAM cache mechanism and uses\nthe generic table mechanism for reuse of TCAM entries.\n\nSigned-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\nSigned-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\nReviewed-by: Mike Baucom <michael.baucom@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/tf_ulp/ulp_mapper.c          | 135 ++++++-----------\n drivers/net/bnxt/tf_ulp/ulp_mapper.h          |  15 --\n .../net/bnxt/tf_ulp/ulp_template_db_enum.h    |   7 +\n .../tf_ulp/ulp_template_db_wh_plus_class.c    | 138 ++++++++++++------\n drivers/net/bnxt/tf_ulp/ulp_template_struct.h |   1 +\n 5 files changed, 144 insertions(+), 152 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\nindex c70e1c5215..56005480af 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n@@ -1356,20 +1356,11 @@ ulp_mapper_tcam_tbl_scan_ident_alloc(struct bnxt_ulp_mapper_parms *parms,\n \tuint32_t num_idents;\n \tuint32_t i;\n \n-\t/*\n-\t * Since the cache entry is responsible for allocating\n-\t * identifiers when in use, allocate the identifiers only\n-\t * during normal processing.\n-\t */\n-\tif (parms->tcam_tbl_opc ==\n-\t    BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL) {\n-\t\tidents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);\n-\n-\t\tfor (i = 0; i < num_idents; i++) {\n-\t\t\tif (ulp_mapper_ident_process(parms, tbl,\n-\t\t\t\t\t\t     &idents[i], NULL))\n-\t\t\t\treturn -EINVAL;\n-\t\t}\n+\tidents = ulp_mapper_ident_fields_get(parms, tbl, &num_idents);\n+\tfor (i = 0; i < num_idents; i++) {\n+\t\tif (ulp_mapper_ident_process(parms, tbl,\n+\t\t\t\t\t     &idents[i], NULL))\n+\t\t\treturn -EINVAL;\n \t}\n \treturn 0;\n }\n@@ -1490,14 +1481,15 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \tstruct tf_search_tcam_entry_parms searchparms   = { 0 };\n \tstruct ulp_flow_db_res_params\tfid_parms\t= { 0 };\n \tstruct tf_free_tcam_entry_parms free_parms\t= { 0 };\n-\tenum bnxt_ulp_search_before_alloc search_flag;\n \tuint32_t hit = 0;\n \tuint16_t tmplen = 0;\n \tuint16_t idx;\n \n-\t/* Skip this if was handled by the cache. */\n-\tif (parms->tcam_tbl_opc == BNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_SKIP) {\n-\t\tparms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;\n+\t/* Skip this if table opcode is NOP */\n+\tif (tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_NOT_USED ||\n+\t    tbl->tbl_opcode >= BNXT_ULP_TCAM_TBL_OPC_LAST) {\n+\t\tBNXT_TF_DBG(ERR, \"Invalid tcam table opcode %d\\n\",\n+\t\t\t    tbl->tbl_opcode);\n \t\treturn 0;\n \t}\n \n@@ -1555,41 +1547,31 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t\t}\n \t}\n \n+\t/* For wild card tcam perform the post process to swap the blob */\n \tif (tbl->resource_type == TF_TCAM_TBL_TYPE_WC_TCAM) {\n \t\tulp_mapper_wc_tcam_tbl_post_process(&key, tbl->key_bit_size);\n \t\tulp_mapper_wc_tcam_tbl_post_process(&mask, tbl->key_bit_size);\n \t}\n \n-\tif (tbl->srch_b4_alloc == BNXT_ULP_SEARCH_BEFORE_ALLOC_NO) {\n-\t\t/*\n-\t\t * No search for re-use is requested, so simply allocate the\n-\t\t * tcam index.\n-\t\t */\n-\t\taparms.dir\t\t= tbl->direction;\n-\t\taparms.tcam_tbl_type\t= tbl->resource_type;\n-\t\taparms.search_enable\t= tbl->srch_b4_alloc;\n-\t\taparms.key\t\t= ulp_blob_data_get(&key, &tmplen);\n-\t\taparms.key_sz_in_bits\t= tmplen;\n+\tif (tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE) {\n+\t\t/* allocate the tcam index */\n+\t\taparms.dir = tbl->direction;\n+\t\taparms.tcam_tbl_type = tbl->resource_type;\n+\t\taparms.key = ulp_blob_data_get(&key, &tmplen);\n+\t\taparms.key_sz_in_bits = tmplen;\n \t\tif (tbl->blob_key_bit_size != tmplen) {\n \t\t\tBNXT_TF_DBG(ERR, \"Key len (%d) != Expected (%d)\\n\",\n \t\t\t\t    tmplen, tbl->blob_key_bit_size);\n \t\t\treturn -EINVAL;\n \t\t}\n \n-\t\taparms.mask\t\t= ulp_blob_data_get(&mask, &tmplen);\n+\t\taparms.mask = ulp_blob_data_get(&mask, &tmplen);\n \t\tif (tbl->blob_key_bit_size != tmplen) {\n \t\t\tBNXT_TF_DBG(ERR, \"Mask len (%d) != Expected (%d)\\n\",\n \t\t\t\t    tmplen, tbl->blob_key_bit_size);\n \t\t\treturn -EINVAL;\n \t\t}\n-\n-\t\taparms.priority\t\t= tbl->priority;\n-\n-\t\t/*\n-\t\t * All failures after this succeeds require the entry to be\n-\t\t * freed. cannot return directly on failure, but needs to goto\n-\t\t * error.\n-\t\t */\n+\t\taparms.priority = tbl->priority;\n \t\trc = tf_alloc_tcam_entry(tfp, &aparms);\n \t\tif (rc) {\n \t\t\tBNXT_TF_DBG(ERR, \"tcam alloc failed rc=%d.\\n\", rc);\n@@ -1627,14 +1609,18 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t\thit = searchparms.hit;\n \t}\n \n-\t/* if it is miss then it is same as no search before alloc */\n-\tif (!hit)\n-\t\tsearch_flag = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO;\n-\telse\n-\t\tsearch_flag = tbl->srch_b4_alloc;\n+\t/* Write the tcam index into the regfile*/\n+\tif (!ulp_regfile_write(parms->regfile, tbl->tbl_operand,\n+\t\t\t       (uint64_t)tfp_cpu_to_be_64(idx))) {\n+\t\tBNXT_TF_DBG(ERR, \"Regfile[%d] write failed.\\n\",\n+\t\t\t    tbl->tbl_operand);\n+\t\trc = -EINVAL;\n+\t\t/* Need to free the tcam idx, so goto error */\n+\t\tgoto error;\n+\t}\n \n-\tswitch (search_flag) {\n-\tcase BNXT_ULP_SEARCH_BEFORE_ALLOC_NO:\n+\t/* if it is miss then it is same as no search before alloc */\n+\tif (!hit || tbl->tbl_opcode == BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE) {\n \t\t/*Scan identifier list, allocate identifier and update regfile*/\n \t\trc = ulp_mapper_tcam_tbl_scan_ident_alloc(parms, tbl);\n \t\t/* Create the result blob */\n@@ -1645,60 +1631,29 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t\tif (!rc)\n \t\t\trc = ulp_mapper_tcam_tbl_entry_write(parms, tbl, &key,\n \t\t\t\t\t\t\t     &mask, &data, idx);\n-\t\tbreak;\n-\tcase BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP:\n-\t\t/*Scan identifier list, extract identifier and update regfile*/\n-\t\trc = ulp_mapper_tcam_tbl_scan_ident_extract(parms, tbl, &data);\n-\t\tbreak;\n-\tcase BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE:\n+\t} else {\n \t\t/*Scan identifier list, extract identifier and update regfile*/\n \t\trc = ulp_mapper_tcam_tbl_scan_ident_extract(parms, tbl, &data);\n-\t\t/* Create the result blob */\n-\t\tif (!rc)\n-\t\t\trc = ulp_mapper_tcam_tbl_result_create(parms, tbl,\n-\t\t\t\t\t\t\t       &update_data);\n-\t\t/* Update/overwrite the tcam entry */\n-\t\tif (!rc)\n-\t\t\trc = ulp_mapper_tcam_tbl_entry_write(parms, tbl, &key,\n-\t\t\t\t\t\t\t     &mask,\n-\t\t\t\t\t\t\t     &update_data, idx);\n-\t\tbreak;\n-\tdefault:\n-\t\tBNXT_TF_DBG(ERR, \"invalid search opcode\\n\");\n-\t\trc =  -EINVAL;\n-\t\tbreak;\n \t}\n \tif (rc)\n \t\tgoto error;\n-\t/*\n-\t * Only link the entry to the flow db in the event that cache was not\n-\t * used.\n-\t */\n-\tif (parms->tcam_tbl_opc == BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL) {\n-\t\tfid_parms.direction = tbl->direction;\n-\t\tfid_parms.resource_func\t= tbl->resource_func;\n-\t\tfid_parms.resource_type\t= tbl->resource_type;\n-\t\tfid_parms.critical_resource = tbl->critical_resource;\n-\t\tfid_parms.resource_hndl\t= idx;\n-\t\trc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);\n-\t\tif (rc) {\n-\t\t\tBNXT_TF_DBG(ERR,\n-\t\t\t\t    \"Failed to link resource to flow rc = %d\\n\",\n-\t\t\t\t    rc);\n-\t\t\t/* Need to free the identifier, so goto error */\n-\t\t\tgoto error;\n-\t\t}\n-\t} else {\n-\t\t/*\n-\t\t * Reset the tcam table opcode to normal in case the next tcam\n-\t\t * entry does not use cache.\n-\t\t */\n-\t\tparms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;\n+\n+\t/* Add the tcam index to the flow database */\n+\tfid_parms.direction = tbl->direction;\n+\tfid_parms.resource_func\t= tbl->resource_func;\n+\tfid_parms.resource_type\t= tbl->resource_type;\n+\tfid_parms.critical_resource = tbl->critical_resource;\n+\tfid_parms.resource_hndl\t= idx;\n+\trc = ulp_mapper_fdb_opc_process(parms, tbl, &fid_parms);\n+\tif (rc) {\n+\t\tBNXT_TF_DBG(ERR, \"Failed to link resource to flow rc = %d\\n\",\n+\t\t\t    rc);\n+\t\t/* Need to free the identifier, so goto error */\n+\t\tgoto error;\n \t}\n \n \treturn 0;\n error:\n-\tparms->tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;\n \tfree_parms.dir\t\t\t= tbl->direction;\n \tfree_parms.tcam_tbl_type\t= tbl->resource_type;\n \tfree_parms.idx\t\t\t= idx;\n@@ -1706,7 +1661,6 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \tif (trc)\n \t\tBNXT_TF_DBG(ERR, \"Failed to free tcam[%d][%d][%d] on failure\\n\",\n \t\t\t    tbl->resource_type, tbl->direction, idx);\n-\n \treturn rc;\n }\n \n@@ -2976,7 +2930,6 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,\n \tparms.comp_fld = cparms->comp_fld;\n \tparms.tfp = bnxt_ulp_cntxt_tfp_get(ulp_ctx);\n \tparms.ulp_ctx = ulp_ctx;\n-\tparms.tcam_tbl_opc = BNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL;\n \tparms.act_tid = cparms->act_tid;\n \tparms.class_tid = cparms->class_tid;\n \tparms.flow_type = cparms->flow_type;\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.h b/drivers/net/bnxt/tf_ulp/ulp_mapper.h\nindex 8bc6cdbdd5..4c423d2374 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.h\n+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.h\n@@ -18,20 +18,6 @@\n \n #define ULP_IDENTS_INVALID ((uint16_t)0xffff)\n \n-/*\n- * The cache table opcode is used to convey informat from the cache handler\n- * to the tcam handler.  The opcodes do the following:\n- * NORMAL - tcam should process all instructions as normal\n- * SKIP - tcam is using the cached entry and doesn't need to process the\n- *\tinstruction.\n- * ALLOC - tcam needs to allocate the tcam index and store in the cache entry\n- */\n-enum bnxt_ulp_cache_table_opc {\n-\tBNXT_ULP_MAPPER_TCAM_TBL_OPC_NORMAL,\n-\tBNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_SKIP,\n-\tBNXT_ULP_MAPPER_TCAM_TBL_OPC_CACHE_ALLOC\n-};\n-\n struct bnxt_ulp_mapper_glb_resource_entry {\n \tenum bnxt_ulp_resource_func\tresource_func;\n \tuint32_t\t\t\tresource_type; /* TF_ enum type */\n@@ -66,7 +52,6 @@ struct bnxt_ulp_mapper_parms {\n \tuint32_t\t\t\t\tfid;\n \tenum bnxt_ulp_fdb_type\t\t\tflow_type;\n \tstruct bnxt_ulp_mapper_data\t\t*mapper_data;\n-\tenum bnxt_ulp_cache_table_opc\t\ttcam_tbl_opc;\n \tstruct bnxt_ulp_device_params\t\t*device_params;\n \tuint32_t\t\t\t\tparent_fid;\n \tuint32_t\t\t\t\tparent_flow;\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h\nindex e4b8c56472..ddc396b3f9 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h\n+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h\n@@ -323,6 +323,13 @@ enum bnxt_ulp_regfile_index {\n \tBNXT_ULP_REGFILE_INDEX_LAST = 30\n };\n \n+enum bnxt_ulp_tcam_tbl_opc {\n+\tBNXT_ULP_TCAM_TBL_OPC_NOT_USED = 0,\n+\tBNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE = 1,\n+\tBNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE = 2,\n+\tBNXT_ULP_TCAM_TBL_OPC_LAST = 3\n+};\n+\n enum bnxt_ulp_search_before_alloc {\n \tBNXT_ULP_SEARCH_BEFORE_ALLOC_NO = 0,\n \tBNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP = 1,\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c\nindex ddf82c4abe..7a22aedf83 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_template_db_wh_plus_class.c\n@@ -226,7 +226,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1,\n \t.blob_key_bit_size = 167,\n@@ -295,7 +296,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.cond_opcode = BNXT_ULP_COND_OPC_COMP_FIELD_IS_SET,\n \t.cond_operand = BNXT_ULP_CF_IDX_VFR_MODE,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 14,\n \t.blob_key_bit_size = 167,\n@@ -335,7 +337,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.cond_opcode = BNXT_ULP_COND_OPC_COMP_FIELD_NOT_SET,\n \t.cond_operand = BNXT_ULP_CF_IDX_VFR_MODE,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 28,\n \t.blob_key_bit_size = 167,\n@@ -434,7 +437,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 42,\n \t.blob_key_bit_size = 167,\n@@ -523,7 +527,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 82,\n \t.blob_key_bit_size = 167,\n@@ -590,7 +595,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 95,\n \t.blob_key_bit_size = 167,\n@@ -624,7 +630,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 108,\n \t.blob_key_bit_size = 167,\n@@ -660,7 +667,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_1,\n \t.key_start_idx = 124,\n \t.blob_key_bit_size = 81,\n@@ -715,7 +723,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 189,\n \t.blob_key_bit_size = 167,\n@@ -751,7 +760,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_1,\n \t.key_start_idx = 205,\n \t.blob_key_bit_size = 81,\n@@ -823,7 +833,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 271,\n \t.blob_key_bit_size = 167,\n@@ -859,7 +870,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 287,\n \t.blob_key_bit_size = 81,\n@@ -931,7 +943,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 353,\n \t.blob_key_bit_size = 167,\n@@ -967,7 +980,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 369,\n \t.blob_key_bit_size = 81,\n@@ -1039,7 +1053,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 435,\n \t.blob_key_bit_size = 167,\n@@ -1075,7 +1090,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 451,\n \t.blob_key_bit_size = 81,\n@@ -1147,7 +1163,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 517,\n \t.blob_key_bit_size = 167,\n@@ -1183,7 +1200,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 533,\n \t.blob_key_bit_size = 81,\n@@ -1238,7 +1256,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 598,\n \t.blob_key_bit_size = 167,\n@@ -1274,7 +1293,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 614,\n \t.blob_key_bit_size = 81,\n@@ -1329,7 +1349,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 679,\n \t.blob_key_bit_size = 167,\n@@ -1365,7 +1386,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 695,\n \t.blob_key_bit_size = 81,\n@@ -1420,7 +1442,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 760,\n \t.blob_key_bit_size = 167,\n@@ -1456,7 +1479,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 776,\n \t.blob_key_bit_size = 81,\n@@ -1511,7 +1535,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 841,\n \t.blob_key_bit_size = 167,\n@@ -1547,7 +1572,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 857,\n \t.blob_key_bit_size = 81,\n@@ -1602,7 +1628,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 922,\n \t.blob_key_bit_size = 167,\n@@ -1638,7 +1665,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 938,\n \t.blob_key_bit_size = 81,\n@@ -1693,7 +1721,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1003,\n \t.blob_key_bit_size = 167,\n@@ -1729,7 +1758,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1019,\n \t.blob_key_bit_size = 81,\n@@ -1801,7 +1831,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1084,\n \t.blob_key_bit_size = 167,\n@@ -1837,7 +1868,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1100,\n \t.blob_key_bit_size = 81,\n@@ -1875,7 +1907,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_SKIP,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1148,\n \t.blob_key_bit_size = 167,\n@@ -1911,7 +1944,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_RX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1164,\n \t.blob_key_bit_size = 81,\n@@ -1983,7 +2017,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1224,\n \t.blob_key_bit_size = 167,\n@@ -2019,7 +2054,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1240,\n \t.blob_key_bit_size = 81,\n@@ -2091,7 +2127,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1306,\n \t.blob_key_bit_size = 167,\n@@ -2127,7 +2164,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1322,\n \t.blob_key_bit_size = 81,\n@@ -2199,7 +2237,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1388,\n \t.blob_key_bit_size = 167,\n@@ -2235,7 +2274,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1404,\n \t.blob_key_bit_size = 81,\n@@ -2307,7 +2347,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1470,\n \t.blob_key_bit_size = 167,\n@@ -2343,7 +2384,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1486,\n \t.blob_key_bit_size = 81,\n@@ -2398,7 +2440,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1551,\n \t.blob_key_bit_size = 167,\n@@ -2434,7 +2477,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1567,\n \t.blob_key_bit_size = 81,\n@@ -2489,7 +2533,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_SEARCH_IF_HIT_UPDATE,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_SRCH_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_L2_CNTXT_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1624,\n \t.blob_key_bit_size = 167,\n@@ -2525,7 +2570,8 @@ struct bnxt_ulp_mapper_tbl_info ulp_wh_plus_class_tbl_list[] = {\n \t.resource_func = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,\n \t.resource_type = TF_TCAM_TBL_TYPE_PROF_TCAM,\n \t.direction = TF_DIR_TX,\n-\t.srch_b4_alloc = BNXT_ULP_SEARCH_BEFORE_ALLOC_NO,\n+\t.tbl_opcode = BNXT_ULP_TCAM_TBL_OPC_ALLOC_WR_REGFILE,\n+\t.tbl_operand = BNXT_ULP_REGFILE_INDEX_PROFILE_TCAM_INDEX_0,\n \t.priority = BNXT_ULP_PRIORITY_LEVEL_0,\n \t.key_start_idx = 1640,\n \t.blob_key_bit_size = 81,\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\nindex 9a15968ea8..ee17390358 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\n+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\n@@ -234,6 +234,7 @@ struct bnxt_ulp_mapper_tbl_info {\n \n \t/* Table opcode for table operations */\n \tuint32_t\t\t\ttbl_opcode;\n+\tuint32_t\t\t\ttbl_operand;\n \n \t/* FDB table opcode */\n \tenum bnxt_ulp_fdb_opc\t\tfdb_opcode;\n",
    "prefixes": [
        "v2",
        "30/58"
    ]
}