get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 71426,
    "url": "http://patches.dpdk.org/api/patches/71426/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200612132934.16488-35-somnath.kotur@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<20200612132934.16488-35-somnath.kotur@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200612132934.16488-35-somnath.kotur@broadcom.com",
    "date": "2020-06-12T13:29:18",
    "name": "[34/50] net/bnxt: add support for if table processing",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "7e1361de4c0bd4cf015342aff0d0ac98655db9f9",
    "submitter": {
        "id": 908,
        "url": "http://patches.dpdk.org/api/people/908/?format=api",
        "name": "Somnath Kotur",
        "email": "somnath.kotur@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200612132934.16488-35-somnath.kotur@broadcom.com/mbox/",
    "series": [
        {
            "id": 10436,
            "url": "http://patches.dpdk.org/api/series/10436/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10436",
            "date": "2020-06-12T13:28:44",
            "name": "add features for host-based flow management",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/10436/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/71426/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/71426/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id D5614A00BE;\n\tFri, 12 Jun 2020 15:48:28 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 838391C23C;\n\tFri, 12 Jun 2020 15:34:54 +0200 (CEST)",
            "from relay.smtp.broadcom.com (unknown [192.19.232.149])\n by dpdk.org (Postfix) with ESMTP id 7392B1C1D9\n for <dev@dpdk.org>; Fri, 12 Jun 2020 15:34:50 +0200 (CEST)",
            "from dhcp-10-123-153-55.dhcp.broadcom.net\n (dhcp-10-123-153-55.dhcp.broadcom.net [10.123.153.55])\n by relay.smtp.broadcom.com (Postfix) with ESMTP id 4B9A51BD788;\n Fri, 12 Jun 2020 06:34:49 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 relay.smtp.broadcom.com 4B9A51BD788",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1591968890;\n bh=N5tKcNCLd/CovTcaGzDYo41Q8KcD/LKGs/NUsXy4WGw=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=Cf5/BhtyZosR2bCw+REjXNtQz6PvuwqmAqelUrHCFr+ZsgQiYL0eeywPqwfOCZEw+\n vhkXaWWfjIeFjWxr06caIt4vFLJRQRXN94nM3V+LKJAg1CPVVmi5Aa4/CFjjjb61AD\n QB9uuwEh43vsRmnqmuRG0pWHtFh5lpnvrxGco9WA=",
        "From": "Somnath Kotur <somnath.kotur@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "ferruh.yigit@intel.com",
        "Date": "Fri, 12 Jun 2020 18:59:18 +0530",
        "Message-Id": "<20200612132934.16488-35-somnath.kotur@broadcom.com>",
        "X-Mailer": "git-send-email 2.10.1.613.g2cc2e70",
        "In-Reply-To": "<20200612132934.16488-1-somnath.kotur@broadcom.com>",
        "References": "<20200612132934.16488-1-somnath.kotur@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH 34/50] net/bnxt: add support for if table\n\tprocessing",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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 support for if table processing in the ulp mapper\nlayer. This enables support for the default partition action\nrecord pointer interface table.\n\nSigned-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\nReviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>\nSigned-off-by: Somnath Kotur <somnath.kotur@broadcom.com>\nSigned-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\n---\n drivers/net/bnxt/tf_ulp/bnxt_ulp.c             |   1 +\n drivers/net/bnxt/tf_ulp/ulp_flow_db.c          |   2 +-\n drivers/net/bnxt/tf_ulp/ulp_mapper.c           | 142 +++++++++++++++++++++----\n drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c         |   1 +\n drivers/net/bnxt/tf_ulp/ulp_template_db_enum.h | 117 ++++++++++----------\n drivers/net/bnxt/tf_ulp/ulp_template_struct.h  |   8 +-\n 6 files changed, 188 insertions(+), 83 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c\nindex 4c1a1c4..4835b95 100644\n--- a/drivers/net/bnxt/tf_ulp/bnxt_ulp.c\n+++ b/drivers/net/bnxt/tf_ulp/bnxt_ulp.c\n@@ -115,6 +115,7 @@ ulp_ctx_session_open(struct bnxt *bp,\n \n \t/* ENCAP */\n \tresources->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 16;\n+\tresources->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 16;\n \n \t/* TCAMs */\n \tresources->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM] = 8;\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c\nindex 22996e5..384dc5b 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_flow_db.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_flow_db.c\n@@ -933,7 +933,7 @@ ulp_default_flow_db_cfa_action_get(struct bnxt_ulp_context *ulp_ctx,\n \t\t\t\t   uint32_t flow_id,\n \t\t\t\t   uint32_t *cfa_action)\n {\n-\tuint8_t sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_VFR_ACT_IDX;\n+\tuint8_t sub_type = BNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_VFR_CFA_ACTION;\n \tuint64_t hndl;\n \tint32_t rc;\n \ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_mapper.c b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\nindex c63f78a..053ff97 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_mapper.c\n@@ -184,7 +184,8 @@ ulp_mapper_action_tbl_list_get(uint32_t dev_id,\n \treturn &ulp_act_tbl_list[idx];\n }\n \n-/** Get a list of classifier tables that implement the flow\n+/*\n+ * Get a list of classifier tables that implement the flow\n  * Gets a device dependent list of tables that implement the class template id\n  *\n  * dev_id [in] The device id of the forwarding element\n@@ -193,13 +194,16 @@ ulp_mapper_action_tbl_list_get(uint32_t dev_id,\n  *\n  * num_tbls [out] The number of classifier tables in the returned array\n  *\n+ * fdb_tbl_idx [out] The flow database index Regular or default\n+ *\n  * returns An array of classifier tables to implement the flow, or NULL on\n  * error\n  */\n static struct bnxt_ulp_mapper_tbl_info *\n ulp_mapper_class_tbl_list_get(uint32_t dev_id,\n \t\t\t      uint32_t tid,\n-\t\t\t      uint32_t *num_tbls)\n+\t\t\t      uint32_t *num_tbls,\n+\t\t\t      uint32_t *fdb_tbl_idx)\n {\n \tuint32_t idx;\n \tuint32_t tidx = ULP_DEVICE_PARAMS_INDEX(tid, dev_id);\n@@ -212,7 +216,7 @@ ulp_mapper_class_tbl_list_get(uint32_t dev_id,\n \t */\n \tidx\t\t= ulp_class_tmpl_list[tidx].start_tbl_idx;\n \t*num_tbls\t= ulp_class_tmpl_list[tidx].num_tbls;\n-\n+\t*fdb_tbl_idx = ulp_class_tmpl_list[tidx].flow_db_table_type;\n \treturn &ulp_class_tbl_list[idx];\n }\n \n@@ -256,7 +260,8 @@ ulp_mapper_key_fields_get(struct bnxt_ulp_mapper_tbl_info *tbl,\n  */\n static struct bnxt_ulp_mapper_result_field_info *\n ulp_mapper_result_fields_get(struct bnxt_ulp_mapper_tbl_info *tbl,\n-\t\t\t     uint32_t *num_flds)\n+\t\t\t     uint32_t *num_flds,\n+\t\t\t     uint32_t *num_encap_flds)\n {\n \tuint32_t idx;\n \n@@ -265,6 +270,7 @@ ulp_mapper_result_fields_get(struct bnxt_ulp_mapper_tbl_info *tbl,\n \n \tidx\t\t= tbl->result_start_idx;\n \t*num_flds\t= tbl->result_num_fields;\n+\t*num_encap_flds = tbl->encap_num_fields;\n \n \t/* NOTE: Need template to provide range checking define */\n \treturn &ulp_class_result_field_list[idx];\n@@ -1147,6 +1153,7 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t\tstruct bnxt_ulp_mapper_result_field_info *dflds;\n \t\tstruct bnxt_ulp_mapper_ident_info *idents;\n \t\tuint32_t num_dflds, num_idents;\n+\t\tuint32_t encap_flds = 0;\n \n \t\t/*\n \t\t * Since the cache entry is responsible for allocating\n@@ -1167,8 +1174,9 @@ ulp_mapper_tcam_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t\t}\n \n \t\t/* Create the result data blob */\n-\t\tdflds = ulp_mapper_result_fields_get(tbl, &num_dflds);\n-\t\tif (!dflds || !num_dflds) {\n+\t\tdflds = ulp_mapper_result_fields_get(tbl, &num_dflds,\n+\t\t\t\t\t\t     &encap_flds);\n+\t\tif (!dflds || !num_dflds || encap_flds) {\n \t\t\tBNXT_TF_DBG(ERR, \"Failed to get data fields.\\n\");\n \t\t\trc = -EINVAL;\n \t\t\tgoto error;\n@@ -1294,6 +1302,7 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \tint32_t\ttrc;\n \tenum bnxt_ulp_flow_mem_type mtype = parms->device_params->flow_mem_type;\n \tint32_t rc = 0;\n+\tuint32_t encap_flds = 0;\n \n \tkflds = ulp_mapper_key_fields_get(tbl, &num_kflds);\n \tif (!kflds || !num_kflds) {\n@@ -1328,8 +1337,8 @@ ulp_mapper_em_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \t */\n \n \t/* Create the result data blob */\n-\tdflds = ulp_mapper_result_fields_get(tbl, &num_dflds);\n-\tif (!dflds || !num_dflds) {\n+\tdflds = ulp_mapper_result_fields_get(tbl, &num_dflds, &encap_flds);\n+\tif (!dflds || !num_dflds || encap_flds) {\n \t\tBNXT_TF_DBG(ERR, \"Failed to get data fields.\\n\");\n \t\treturn -EINVAL;\n \t}\n@@ -1469,7 +1478,8 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n \n \t/* Get the result fields list */\n \tif (is_class_tbl)\n-\t\tflds = ulp_mapper_result_fields_get(tbl, &num_flds);\n+\t\tflds = ulp_mapper_result_fields_get(tbl, &num_flds,\n+\t\t\t\t\t\t    &encap_flds);\n \telse\n \t\tflds = ulp_mapper_act_result_fields_get(tbl, &num_flds,\n \t\t\t\t\t\t\t&encap_flds);\n@@ -1763,6 +1773,76 @@ ulp_mapper_cache_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n }\n \n static int32_t\n+ulp_mapper_if_tbl_process(struct bnxt_ulp_mapper_parms *parms,\n+\t\t\t  struct bnxt_ulp_mapper_tbl_info *tbl)\n+{\n+\tstruct bnxt_ulp_mapper_result_field_info *flds;\n+\tstruct ulp_blob\tdata;\n+\tuint64_t idx;\n+\tuint16_t tmplen;\n+\tuint32_t i, num_flds;\n+\tint32_t rc = 0;\n+\tstruct tf_set_if_tbl_entry_parms iftbl_params = { 0 };\n+\tstruct tf *tfp = bnxt_ulp_cntxt_tfp_get(parms->ulp_ctx);\n+\tuint32_t encap_flds;\n+\n+\t/* Initialize the blob data */\n+\tif (!ulp_blob_init(&data, tbl->result_bit_size,\n+\t\t\t   parms->device_params->byte_order)) {\n+\t\tBNXT_TF_DBG(ERR, \"Failed initial index table blob\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Get the result fields list */\n+\tflds = ulp_mapper_result_fields_get(tbl, &num_flds, &encap_flds);\n+\n+\tif (!flds || !num_flds || encap_flds) {\n+\t\tBNXT_TF_DBG(ERR, \"template undefined for the IF table\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* process the result fields, loop through them */\n+\tfor (i = 0; i < num_flds; i++) {\n+\t\t/* Process the result fields */\n+\t\trc = ulp_mapper_result_field_process(parms,\n+\t\t\t\t\t\t     tbl->direction,\n+\t\t\t\t\t\t     &flds[i],\n+\t\t\t\t\t\t     &data,\n+\t\t\t\t\t\t     \"IFtable Result\");\n+\t\tif (rc) {\n+\t\t\tBNXT_TF_DBG(ERR, \"data field failed\\n\");\n+\t\t\treturn rc;\n+\t\t}\n+\t}\n+\n+\t/* Get the index details from computed field */\n+\tidx = ULP_COMP_FLD_IDX_RD(parms, tbl->comp_field_idx);\n+\n+\t/* Perform the tf table set by filling the set params */\n+\tiftbl_params.dir = tbl->direction;\n+\tiftbl_params.type = tbl->resource_type;\n+\tiftbl_params.data = ulp_blob_data_get(&data, &tmplen);\n+\tiftbl_params.data_sz_in_bytes = ULP_BITS_2_BYTE(tmplen);\n+\tiftbl_params.idx = idx;\n+\n+\trc = tf_set_if_tbl_entry(tfp, &iftbl_params);\n+\tif (rc) {\n+\t\tBNXT_TF_DBG(ERR, \"Set table[%d][%s][%d] failed rc=%d\\n\",\n+\t\t\t    iftbl_params.type,\n+\t\t\t    (iftbl_params.dir == TF_DIR_RX) ? \"RX\" : \"TX\",\n+\t\t\t    iftbl_params.idx,\n+\t\t\t    rc);\n+\t\treturn rc;\n+\t}\n+\n+\t/*\n+\t * TBD: Need to look at the need to store idx in flow db for restore\n+\t * the table to its orginial state on deletion of this entry.\n+\t */\n+\treturn rc;\n+}\n+\n+static int32_t\n ulp_mapper_glb_resource_info_init(struct tf *tfp,\n \t\t\t\t  struct bnxt_ulp_mapper_data *mapper_data)\n {\n@@ -1863,6 +1943,9 @@ ulp_mapper_class_tbls_process(struct bnxt_ulp_mapper_parms *parms)\n \t\tcase BNXT_ULP_RESOURCE_FUNC_CACHE_TABLE:\n \t\t\trc = ulp_mapper_cache_tbl_process(parms, tbl);\n \t\t\tbreak;\n+\t\tcase BNXT_ULP_RESOURCE_FUNC_IF_TABLE:\n+\t\t\trc = ulp_mapper_if_tbl_process(parms, tbl);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\tBNXT_TF_DBG(ERR, \"Unexpected class resource %d\\n\",\n \t\t\t\t    tbl->resource_func);\n@@ -2065,20 +2148,29 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,\n \n \t/* Get the action table entry from device id and act context id */\n \tparms.act_tid = cparms->act_tid;\n-\tparms.atbls = ulp_mapper_action_tbl_list_get(parms.dev_id,\n-\t\t\t\t\t\t     parms.act_tid,\n-\t\t\t\t\t\t     &parms.num_atbls);\n-\tif (!parms.atbls || !parms.num_atbls) {\n-\t\tBNXT_TF_DBG(ERR, \"No action tables for %d:%d\\n\",\n-\t\t\t    parms.dev_id, parms.act_tid);\n-\t\treturn -EINVAL;\n+\n+\t/*\n+\t * Perform the action table get only if act template is not zero\n+\t * for act template zero like for default rules ignore the action\n+\t * table processing.\n+\t */\n+\tif (parms.act_tid) {\n+\t\tparms.atbls = ulp_mapper_action_tbl_list_get(parms.dev_id,\n+\t\t\t\t\t\t\t     parms.act_tid,\n+\t\t\t\t\t\t\t     &parms.num_atbls);\n+\t\tif (!parms.atbls || !parms.num_atbls) {\n+\t\t\tBNXT_TF_DBG(ERR, \"No action tables for %d:%d\\n\",\n+\t\t\t\t    parms.dev_id, parms.act_tid);\n+\t\t\treturn -EINVAL;\n+\t\t}\n \t}\n \n \t/* Get the class table entry from device id and act context id */\n \tparms.class_tid = cparms->class_tid;\n \tparms.ctbls = ulp_mapper_class_tbl_list_get(parms.dev_id,\n \t\t\t\t\t\t    parms.class_tid,\n-\t\t\t\t\t\t    &parms.num_ctbls);\n+\t\t\t\t\t\t    &parms.num_ctbls,\n+\t\t\t\t\t\t    &parms.tbl_idx);\n \tif (!parms.ctbls || !parms.num_ctbls) {\n \t\tBNXT_TF_DBG(ERR, \"No class tables for %d:%d\\n\",\n \t\t\t    parms.dev_id, parms.class_tid);\n@@ -2112,7 +2204,7 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,\n \t * free each of them.\n \t */\n \trc = ulp_flow_db_fid_alloc(ulp_ctx,\n-\t\t\t\t   BNXT_ULP_REGULAR_FLOW_TABLE,\n+\t\t\t\t   parms.tbl_idx,\n \t\t\t\t   cparms->func_id,\n \t\t\t\t   &parms.fid);\n \tif (rc) {\n@@ -2121,11 +2213,14 @@ ulp_mapper_flow_create(struct bnxt_ulp_context *ulp_ctx,\n \t}\n \n \t/* Process the action template list from the selected action table*/\n-\trc = ulp_mapper_action_tbls_process(&parms);\n-\tif (rc) {\n-\t\tBNXT_TF_DBG(ERR, \"action tables failed creation for %d:%d\\n\",\n-\t\t\t    parms.dev_id, parms.act_tid);\n-\t\tgoto flow_error;\n+\tif (parms.act_tid) {\n+\t\trc = ulp_mapper_action_tbls_process(&parms);\n+\t\tif (rc) {\n+\t\t\tBNXT_TF_DBG(ERR,\n+\t\t\t\t    \"action tables failed creation for %d:%d\\n\",\n+\t\t\t\t    parms.dev_id, parms.act_tid);\n+\t\t\tgoto flow_error;\n+\t\t}\n \t}\n \n \t/* All good. Now process the class template */\n@@ -2258,3 +2353,4 @@ ulp_mapper_deinit(struct bnxt_ulp_context *ulp_ctx)\n \t/* Reset the data pointer within the ulp_ctx. */\n \tbnxt_ulp_cntxt_ptr2_mapper_data_set(ulp_ctx, NULL);\n }\n+\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c\nindex 89c08ab..5174223 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c\n+++ b/drivers/net/bnxt/tf_ulp/ulp_mark_mgr.c\n@@ -256,6 +256,7 @@ ulp_mark_db_mark_add(struct bnxt_ulp_context *ctxt,\n \t\t\tBNXT_TF_DBG(ERR, \"Mark index greater than allocated\\n\");\n \t\t\treturn -EINVAL;\n \t\t}\n+\t\tBNXT_TF_DBG(DEBUG, \"Set LFID[0x%0x] = 0x%0x\\n\", fid, mark);\n \t\tmtbl->lfid_tbl[fid].mark_id = mark;\n \t\tULP_MARK_DB_ENTRY_SET_VALID(&mtbl->lfid_tbl[fid]);\n \t}\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 ac84f88..66343b9 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@@ -88,35 +88,36 @@ enum bnxt_ulp_byte_order {\n };\n \n enum bnxt_ulp_cf_idx {\n-\tBNXT_ULP_CF_IDX_MPLS_TAG_NUM = 0,\n-\tBNXT_ULP_CF_IDX_O_VTAG_NUM = 1,\n-\tBNXT_ULP_CF_IDX_O_VTAG_PRESENT = 2,\n-\tBNXT_ULP_CF_IDX_O_TWO_VTAGS = 3,\n-\tBNXT_ULP_CF_IDX_I_VTAG_NUM = 4,\n-\tBNXT_ULP_CF_IDX_I_VTAG_PRESENT = 5,\n-\tBNXT_ULP_CF_IDX_I_TWO_VTAGS = 6,\n-\tBNXT_ULP_CF_IDX_INCOMING_IF = 7,\n-\tBNXT_ULP_CF_IDX_DIRECTION = 8,\n-\tBNXT_ULP_CF_IDX_SVIF_FLAG = 9,\n-\tBNXT_ULP_CF_IDX_O_L3 = 10,\n-\tBNXT_ULP_CF_IDX_I_L3 = 11,\n-\tBNXT_ULP_CF_IDX_O_L4 = 12,\n-\tBNXT_ULP_CF_IDX_I_L4 = 13,\n-\tBNXT_ULP_CF_IDX_DEV_PORT_ID = 14,\n-\tBNXT_ULP_CF_IDX_DRV_FUNC_SVIF = 15,\n-\tBNXT_ULP_CF_IDX_DRV_FUNC_SPIF = 16,\n-\tBNXT_ULP_CF_IDX_DRV_FUNC_PARIF = 17,\n-\tBNXT_ULP_CF_IDX_DRV_FUNC_VNIC = 18,\n-\tBNXT_ULP_CF_IDX_DRV_FUNC_PHY_PORT = 19,\n-\tBNXT_ULP_CF_IDX_VF_FUNC_SVIF = 20,\n-\tBNXT_ULP_CF_IDX_VF_FUNC_SPIF = 21,\n-\tBNXT_ULP_CF_IDX_VF_FUNC_PARIF = 22,\n-\tBNXT_ULP_CF_IDX_VF_FUNC_VNIC = 23,\n-\tBNXT_ULP_CF_IDX_PHY_PORT_SVIF = 24,\n-\tBNXT_ULP_CF_IDX_PHY_PORT_SPIF = 25,\n-\tBNXT_ULP_CF_IDX_PHY_PORT_PARIF = 26,\n-\tBNXT_ULP_CF_IDX_PHY_PORT_VPORT = 27,\n-\tBNXT_ULP_CF_IDX_LAST = 28\n+\tBNXT_ULP_CF_IDX_NOT_USED = 0,\n+\tBNXT_ULP_CF_IDX_MPLS_TAG_NUM = 1,\n+\tBNXT_ULP_CF_IDX_O_VTAG_NUM = 2,\n+\tBNXT_ULP_CF_IDX_O_VTAG_PRESENT = 3,\n+\tBNXT_ULP_CF_IDX_O_TWO_VTAGS = 4,\n+\tBNXT_ULP_CF_IDX_I_VTAG_NUM = 5,\n+\tBNXT_ULP_CF_IDX_I_VTAG_PRESENT = 6,\n+\tBNXT_ULP_CF_IDX_I_TWO_VTAGS = 7,\n+\tBNXT_ULP_CF_IDX_INCOMING_IF = 8,\n+\tBNXT_ULP_CF_IDX_DIRECTION = 9,\n+\tBNXT_ULP_CF_IDX_SVIF_FLAG = 10,\n+\tBNXT_ULP_CF_IDX_O_L3 = 11,\n+\tBNXT_ULP_CF_IDX_I_L3 = 12,\n+\tBNXT_ULP_CF_IDX_O_L4 = 13,\n+\tBNXT_ULP_CF_IDX_I_L4 = 14,\n+\tBNXT_ULP_CF_IDX_DEV_PORT_ID = 15,\n+\tBNXT_ULP_CF_IDX_DRV_FUNC_SVIF = 16,\n+\tBNXT_ULP_CF_IDX_DRV_FUNC_SPIF = 17,\n+\tBNXT_ULP_CF_IDX_DRV_FUNC_PARIF = 18,\n+\tBNXT_ULP_CF_IDX_DRV_FUNC_VNIC = 19,\n+\tBNXT_ULP_CF_IDX_DRV_FUNC_PHY_PORT = 20,\n+\tBNXT_ULP_CF_IDX_VF_FUNC_SVIF = 21,\n+\tBNXT_ULP_CF_IDX_VF_FUNC_SPIF = 22,\n+\tBNXT_ULP_CF_IDX_VF_FUNC_PARIF = 23,\n+\tBNXT_ULP_CF_IDX_VF_FUNC_VNIC = 24,\n+\tBNXT_ULP_CF_IDX_PHY_PORT_SVIF = 25,\n+\tBNXT_ULP_CF_IDX_PHY_PORT_SPIF = 26,\n+\tBNXT_ULP_CF_IDX_PHY_PORT_PARIF = 27,\n+\tBNXT_ULP_CF_IDX_PHY_PORT_VPORT = 28,\n+\tBNXT_ULP_CF_IDX_LAST = 29\n };\n \n enum bnxt_ulp_critical_resource {\n@@ -133,11 +134,6 @@ enum bnxt_ulp_device_id {\n \tBNXT_ULP_DEVICE_ID_LAST = 4\n };\n \n-enum bnxt_ulp_df_param_type {\n-\tBNXT_ULP_DF_PARAM_TYPE_DEV_PORT_ID = 0,\n-\tBNXT_ULP_DF_PARAM_TYPE_LAST = 1\n-};\n-\n enum bnxt_ulp_direction {\n \tBNXT_ULP_DIRECTION_INGRESS = 0,\n \tBNXT_ULP_DIRECTION_EGRESS = 1,\n@@ -154,7 +150,8 @@ enum bnxt_ulp_flow_mem_type {\n enum bnxt_ulp_glb_regfile_index {\n \tBNXT_ULP_GLB_REGFILE_INDEX_GLB_PROF_FUNC_ID = 0,\n \tBNXT_ULP_GLB_REGFILE_INDEX_GLB_L2_CNTXT_ID = 1,\n-\tBNXT_ULP_GLB_REGFILE_INDEX_LAST = 2\n+\tBNXT_ULP_GLB_REGFILE_INDEX_GLB_LOOPBACK_AREC_INDEX = 2,\n+\tBNXT_ULP_GLB_REGFILE_INDEX_LAST = 3\n };\n \n enum bnxt_ulp_hdr_type {\n@@ -204,22 +201,22 @@ enum bnxt_ulp_priority {\n };\n \n enum bnxt_ulp_regfile_index {\n-\tBNXT_ULP_REGFILE_INDEX_CLASS_TID = 0,\n-\tBNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0 = 1,\n-\tBNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_1 = 2,\n-\tBNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 = 3,\n-\tBNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_1 = 4,\n-\tBNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0 = 5,\n-\tBNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_1 = 6,\n-\tBNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_0 = 7,\n-\tBNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_1 = 8,\n-\tBNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR = 9,\n-\tBNXT_ULP_REGFILE_INDEX_ACTION_PTR_0 = 10,\n-\tBNXT_ULP_REGFILE_INDEX_ENCAP_PTR_0 = 11,\n-\tBNXT_ULP_REGFILE_INDEX_ENCAP_PTR_1 = 12,\n-\tBNXT_ULP_REGFILE_INDEX_CRITICAL_RESOURCE = 13,\n-\tBNXT_ULP_REGFILE_INDEX_FLOW_CNTR_PTR_0 = 14,\n-\tBNXT_ULP_REGFILE_INDEX_NOT_USED = 15,\n+\tBNXT_ULP_REGFILE_INDEX_NOT_USED = 0,\n+\tBNXT_ULP_REGFILE_INDEX_CLASS_TID = 1,\n+\tBNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_0 = 2,\n+\tBNXT_ULP_REGFILE_INDEX_L2_CNTXT_ID_1 = 3,\n+\tBNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_0 = 4,\n+\tBNXT_ULP_REGFILE_INDEX_PROF_FUNC_ID_1 = 5,\n+\tBNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_0 = 6,\n+\tBNXT_ULP_REGFILE_INDEX_EM_PROFILE_ID_1 = 7,\n+\tBNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_0 = 8,\n+\tBNXT_ULP_REGFILE_INDEX_WC_PROFILE_ID_1 = 9,\n+\tBNXT_ULP_REGFILE_INDEX_MAIN_ACTION_PTR = 10,\n+\tBNXT_ULP_REGFILE_INDEX_ACTION_PTR_0 = 11,\n+\tBNXT_ULP_REGFILE_INDEX_ENCAP_PTR_0 = 12,\n+\tBNXT_ULP_REGFILE_INDEX_ENCAP_PTR_1 = 13,\n+\tBNXT_ULP_REGFILE_INDEX_CRITICAL_RESOURCE = 14,\n+\tBNXT_ULP_REGFILE_INDEX_FLOW_CNTR_PTR_0 = 15,\n \tBNXT_ULP_REGFILE_INDEX_LAST = 16\n };\n \n@@ -265,10 +262,10 @@ enum bnxt_ulp_resource_func {\n enum bnxt_ulp_resource_sub_type {\n \tBNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_L2_CNTXT_TCAM = 0,\n \tBNXT_ULP_RESOURCE_SUB_TYPE_CACHE_TYPE_PROFILE_TCAM = 1,\n-\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_EXT_COUNT_INDEX = 3,\n-\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_COUNT_INDEX = 2,\n+\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_EXT_COUNT = 3,\n+\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_INT_COUNT = 2,\n \tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_NORMAL = 0,\n-\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_VFR_ACT_IDX = 1,\n+\tBNXT_ULP_RESOURCE_SUB_TYPE_INDEX_TYPE_VFR_CFA_ACTION = 1,\n \tBNXT_ULP_RESOURCE_SUB_TYPE_NOT_USED = 0\n };\n \n@@ -282,7 +279,6 @@ enum bnxt_ulp_sym {\n \tBNXT_ULP_SYM_AGG_ERROR_IGNORE = 0,\n \tBNXT_ULP_SYM_AGG_ERROR_NO = 0,\n \tBNXT_ULP_SYM_AGG_ERROR_YES = 1,\n-\tBNXT_ULP_SYM_BIG_ENDIAN = 0,\n \tBNXT_ULP_SYM_DECAP_FUNC_NONE = 0,\n \tBNXT_ULP_SYM_DECAP_FUNC_THRU_L2 = 11,\n \tBNXT_ULP_SYM_DECAP_FUNC_THRU_L3 = 12,\n@@ -398,7 +394,6 @@ enum bnxt_ulp_sym {\n \tBNXT_ULP_SYM_L4_HDR_VALID_IGNORE = 0,\n \tBNXT_ULP_SYM_L4_HDR_VALID_NO = 0,\n \tBNXT_ULP_SYM_L4_HDR_VALID_YES = 1,\n-\tBNXT_ULP_SYM_LITTLE_ENDIAN = 1,\n \tBNXT_ULP_SYM_MATCH_TYPE_EM = 0,\n \tBNXT_ULP_SYM_MATCH_TYPE_WM = 1,\n \tBNXT_ULP_SYM_NO = 0,\n@@ -489,6 +484,11 @@ enum bnxt_ulp_sym {\n \tBNXT_ULP_SYM_YES = 1\n };\n \n+enum bnxt_ulp_wh_plus {\n+\tBNXT_ULP_WH_PLUS_EXT_EM_MAX_KEY_SIZE = 448,\n+\tBNXT_ULP_WH_PLUS_LOOPBACK_PORT = 4\n+};\n+\n enum bnxt_ulp_act_prop_sz {\n \tBNXT_ULP_ACT_PROP_SZ_ENCAP_TUN_SZ = 4,\n \tBNXT_ULP_ACT_PROP_SZ_ENCAP_IP_SZ = 4,\n@@ -588,4 +588,9 @@ enum bnxt_ulp_act_hid {\n \tBNXT_ULP_ACT_HID_0029 = 0x0029,\n \tBNXT_ULP_ACT_HID_0040 = 0x0040\n };\n+\n+enum bnxt_ulp_df_tpl {\n+\tBNXT_ULP_DF_TPL_PORT_TO_VS = 1,\n+\tBNXT_ULP_DF_TPL_VS_TO_PORT = 2\n+};\n #endif\ndiff --git a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\nindex 5c43358..1188223 100644\n--- a/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\n+++ b/drivers/net/bnxt/tf_ulp/ulp_template_struct.h\n@@ -150,9 +150,10 @@ struct bnxt_ulp_device_params {\n \n /* Flow Mapper */\n struct bnxt_ulp_mapper_tbl_list_info {\n-\tuint32_t\tdevice_name;\n-\tuint32_t\tstart_tbl_idx;\n-\tuint32_t\tnum_tbls;\n+\tuint32_t\t\tdevice_name;\n+\tuint32_t\t\tstart_tbl_idx;\n+\tuint32_t\t\tnum_tbls;\n+\tenum bnxt_ulp_fdb_type\tflow_db_table_type;\n };\n \n struct bnxt_ulp_mapper_tbl_info {\n@@ -183,6 +184,7 @@ struct bnxt_ulp_mapper_tbl_info {\n \n \tenum bnxt_ulp_regfile_index\tregfile_idx;\n \tenum bnxt_ulp_mark_db_opcode\tmark_db_opcode;\n+\tuint32_t\t\t\tcomp_field_idx;\n };\n \n struct bnxt_ulp_mapper_class_key_field_info {\n",
    "prefixes": [
        "34/50"
    ]
}