net/bnxt: add shared session support to ULP
authorMike Baucom <michael.baucom@broadcom.com>
Sun, 30 May 2021 08:59:19 +0000 (14:29 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Thu, 8 Jul 2021 00:02:10 +0000 (02:02 +0200)
Shared session permits cooperative sharing of prescribed resources
between applications.

- devargs added for app-id in order to enable sharing session
  resources across applications
- shared session management added
- TRUFLOW resource reservations are now app ID and device dependent

Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.c
drivers/net/bnxt/tf_ulp/bnxt_ulp.h
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_tbl.c
drivers/net/bnxt/tf_ulp/ulp_template_struct.h

index e8a6a50..376f317 100644 (file)
@@ -874,9 +874,11 @@ struct bnxt {
        uint16_t                port_svif;
 
        struct tf               tfp;
+       struct tf               tfp_shared;
        struct bnxt_ulp_context *ulp_ctx;
        struct bnxt_flow_stat_info *flow_stat;
        uint16_t                max_num_kflows;
+       uint8_t                 app_id;
        uint16_t                tx_cfa_action;
        struct bnxt_ring_stats  *prev_rx_ring_stats;
        struct bnxt_ring_stats  *prev_tx_ring_stats;
index 93fa126..d859ef5 100644 (file)
@@ -97,6 +97,7 @@ static const struct rte_pci_id bnxt_pci_id_map[] = {
 #define BNXT_DEVARG_REP_Q_F2R  "rep-q-f2r"
 #define BNXT_DEVARG_REP_FC_R2F  "rep-fc-r2f"
 #define BNXT_DEVARG_REP_FC_F2R  "rep-fc-f2r"
+#define BNXT_DEVARG_APP_ID     "app-id"
 
 static const char *const bnxt_dev_args[] = {
        BNXT_DEVARG_REPRESENTOR,
@@ -109,6 +110,7 @@ static const char *const bnxt_dev_args[] = {
        BNXT_DEVARG_REP_Q_F2R,
        BNXT_DEVARG_REP_FC_R2F,
        BNXT_DEVARG_REP_FC_F2R,
+       BNXT_DEVARG_APP_ID,
        NULL
 };
 
@@ -118,6 +120,11 @@ static const char *const bnxt_dev_args[] = {
  */
 #define        BNXT_DEVARG_ACCUM_STATS_INVALID(accum_stats)    ((accum_stats) > 1)
 
+/*
+ * app-id = an non-negative 8-bit number
+ */
+#define BNXT_DEVARG_APP_ID_INVALID(val)                        ((val) > 255)
+
 /*
  * flow_xstat == false to disable the feature
  * flow_xstat == true to enable the feature
@@ -5430,6 +5437,42 @@ bnxt_parse_devarg_max_num_kflows(__rte_unused const char *key,
        return 0;
 }
 
+static int
+bnxt_parse_devarg_app_id(__rte_unused const char *key,
+                                const char *value, void *opaque_arg)
+{
+       struct bnxt *bp = opaque_arg;
+       unsigned long app_id;
+       char *end = NULL;
+
+       if (!value || !opaque_arg) {
+               PMD_DRV_LOG(ERR,
+                           "Invalid parameter passed to app-id "
+                           "devargs.\n");
+               return -EINVAL;
+       }
+
+       app_id = strtoul(value, &end, 10);
+       if (end == NULL || *end != '\0' ||
+           (app_id == ULONG_MAX && errno == ERANGE)) {
+               PMD_DRV_LOG(ERR,
+                           "Invalid parameter passed to app_id "
+                           "devargs.\n");
+               return -EINVAL;
+       }
+
+       if (BNXT_DEVARG_APP_ID_INVALID(app_id)) {
+               PMD_DRV_LOG(ERR, "Invalid app-id(%d) devargs.\n",
+                           (uint16_t)app_id);
+               return -EINVAL;
+       }
+
+       bp->app_id = app_id;
+       PMD_DRV_LOG(INFO, "app-id=%d feature enabled.\n", (uint16_t)app_id);
+
+       return 0;
+}
+
 static int
 bnxt_parse_devarg_rep_is_pf(__rte_unused const char *key,
                            const char *value, void *opaque_arg)
@@ -5691,6 +5734,13 @@ bnxt_parse_dev_args(struct bnxt *bp, struct rte_devargs *devargs)
                goto err;
 
 err:
+       /*
+        * Handler for "app-id" devarg.
+        * Invoked as for ex: "-a 000:00:0d.0,app-id=1"
+        */
+       rte_kvargs_process(kvlist, BNXT_DEVARG_APP_ID,
+                          bnxt_parse_devarg_app_id, bp);
+
        rte_kvargs_free(kvlist);
        return ret;
 }
index dd992a2..6323346 100644 (file)
@@ -68,240 +68,336 @@ bnxt_ulp_devid_get(struct bnxt *bp,
        return 0;
 }
 
+struct bnxt_ulp_app_capabilities_info *
+bnxt_ulp_app_cap_list_get(uint32_t *num_entries)
+{
+       if (!num_entries)
+               return NULL;
+       *num_entries = BNXT_ULP_APP_CAP_TBL_MAX_SZ;
+       return ulp_app_cap_info_list;
+}
+
+struct bnxt_ulp_resource_resv_info *
+bnxt_ulp_resource_resv_list_get(uint32_t *num_entries)
+{
+       if (!num_entries)
+               return NULL;
+       *num_entries = BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ;
+       return ulp_resource_resv_list;
+}
+
+struct bnxt_ulp_glb_resource_info *
+bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries)
+{
+       if (!num_entries)
+               return NULL;
+       *num_entries = BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ;
+       return ulp_app_glb_resource_tbl;
+}
+
 static int32_t
-bnxt_ulp_tf_session_resources_get(struct bnxt *bp,
-                                 struct tf_session_resources *res)
+bnxt_ulp_tf_resources_get(struct bnxt_ulp_context *ulp_ctx,
+                         struct tf_session_resources *res)
 {
-       uint32_t dev_id;
+       struct bnxt_ulp_resource_resv_info *info = NULL;
+       uint32_t dev_id, res_type, i, num;
+       enum tf_dir dir;
+       uint8_t app_id;
+       int32_t rc = 0;
+
+       if (!ulp_ctx || !res) {
+               BNXT_TF_DBG(ERR, "Invalid arguments to get resources.\n");
+               return -EINVAL;
+       }
+
+       info = bnxt_ulp_resource_resv_list_get(&num);
+       if (!info) {
+               BNXT_TF_DBG(ERR, "Unable to get resource reservation list.\n");
+               return -EINVAL;
+       }
+
+       rc = bnxt_ulp_cntxt_app_id_get(ulp_ctx, &app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get the app id from ulp.\n");
+               return -EINVAL;
+       }
+
+       rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get the device id from ulp.\n");
+               return -EINVAL;
+       }
+
+       for (i = 0; i < num; i++) {
+               if (app_id != info[i].app_id || dev_id != info[i].device_id)
+                       continue;
+               dir = info[i].direction;
+               res_type = info[i].resource_type;
+
+               switch (info[i].resource_func) {
+               case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER:
+                       res->ident_cnt[dir].cnt[res_type] = info[i].count;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE:
+                       res->tbl_cnt[dir].cnt[res_type] = info[i].count;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE:
+                       res->tcam_cnt[dir].cnt[res_type] = info[i].count;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_EM_TABLE:
+                       res->em_cnt[dir].cnt[res_type] = info[i].count;
+                       break;
+               default:
+                       break;
+               }
+       }
+
+       return 0;
+}
+
+static int32_t
+bnxt_ulp_tf_shared_session_resources_get(struct bnxt_ulp_context *ulp_ctx,
+                                        struct tf_session_resources *res)
+{
+       struct bnxt_ulp_glb_resource_info *info;
+       uint32_t dev_id, res_type, i, num;
+       enum tf_dir dir;
+       uint8_t app_id;
        int32_t rc;
-       uint16_t *tmp_cnt;
 
-       rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &dev_id);
+       rc = bnxt_ulp_cntxt_app_id_get(ulp_ctx, &app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get the app id from ulp.\n");
+               return -EINVAL;
+       }
+
+       rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
        if (rc) {
                BNXT_TF_DBG(ERR, "Unable to get device id from ulp.\n");
                return -EINVAL;
        }
 
-       switch (dev_id) {
-       case BNXT_ULP_DEVICE_ID_WH_PLUS:
-               /** RX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 422;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 6;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_WC_PROF] = 192;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_EM_PROF] = 192;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 8192;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_ENCAP_8B] = 511;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 63;
-
-               /* TCAMs */
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-                       422;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] =
-                       6;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 88;
-
-               /* EM */
-               res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 13168;
-
-               /* EEM */
-               res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_TBL_SCOPE] = 1;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_SP_SMAC] = 255;
-
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_MIRROR_CONFIG] = 1;
-
-               /** TX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 292;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 148;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_WC_PROF] = 192;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_EM_PROF] = 192;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 8192;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 511;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 223;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_8B] = 255;
-
-               /* TCAMs */
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-                       292;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] =
-                       144;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 928;
-
-               /* EM */
-               res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 15232;
-
-               /* EEM */
-               res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_TBL_SCOPE] = 1;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = 488;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6] = 511;
-
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_MIRROR_CONFIG] = 1;
+       /* Make sure the resources are zero before accumulating. */
+       memset(res, 0, sizeof(struct tf_session_resources));
 
+       /* Get the list and tally the resources. */
+       info = bnxt_ulp_app_glb_resource_info_list_get(&num);
+       if (!info) {
+               BNXT_TF_DBG(ERR, "Unable to get app global resource list\n");
+               return -EINVAL;
+       }
+       for (i = 0; i < num; i++) {
+               if (dev_id != info[i].device_id || app_id != info[i].app_id)
+                       continue;
+               dir = info[i].direction;
+               res_type = info[i].resource_type;
+
+               switch (info[i].resource_func) {
+               case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER:
+                       res->ident_cnt[dir].cnt[res_type]++;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE:
+                       res->tbl_cnt[dir].cnt[res_type]++;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE:
+                       res->tcam_cnt[dir].cnt[res_type]++;
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_EM_TABLE:
+                       res->em_cnt[dir].cnt[res_type]++;
+                       break;
+               default:
+                       BNXT_TF_DBG(ERR, "Unknown resource func (0x%x)\n,",
+                                   info[i].resource_func);
+                       continue;
+               }
+       }
+
+       return 0;
+}
+
+int32_t
+bnxt_ulp_cntxt_app_caps_init(struct bnxt_ulp_context *ulp_ctx,
+                            uint8_t app_id, uint32_t dev_id)
+{
+       struct bnxt_ulp_app_capabilities_info *info;
+       uint32_t num = 0;
+       uint16_t i;
+       bool found = false;
+
+       if (ULP_APP_DEV_UNSUPPORTED_ENABLED(ulp_ctx->cfg_data->ulp_flags)) {
+               BNXT_TF_DBG(ERR, "APP ID %d, Device ID: 0x%x not supported.\n",
+                           app_id, dev_id);
+               return -EINVAL;
+       }
+
+       info = bnxt_ulp_app_cap_list_get(&num);
+       if (!info || !num) {
+               BNXT_TF_DBG(ERR, "Failed to get app capabilities.\n");
+               return -EINVAL;
+       }
+
+       for (i = 0; i < num; i++) {
+               if (info[i].app_id != app_id || info[i].device_id != dev_id)
+                       continue;
+               found = true;
+               if (info[i].flags & BNXT_ULP_APP_CAP_SHARED_EN)
+                       ulp_ctx->cfg_data->ulp_flags |=
+                               BNXT_ULP_SHARED_SESSION_ENABLED;
+       }
+       if (!found) {
+               BNXT_TF_DBG(ERR, "APP ID %d, Device ID: 0x%x not supported.\n",
+                           app_id, dev_id);
+               ulp_ctx->cfg_data->ulp_flags |= BNXT_ULP_APP_DEV_UNSUPPORTED;
+               return -EINVAL;
+       }
+
+       return 0;
+}
+
+static void
+ulp_ctx_shared_session_close(struct bnxt *bp,
+                            struct bnxt_ulp_session_state *session)
+{
+       struct tf *tfp;
+       int32_t rc;
+
+       if (!bnxt_ulp_cntxt_shared_session_enabled(bp->ulp_ctx))
+               return;
+
+       tfp = bnxt_ulp_cntxt_shared_tfp_get(bp->ulp_ctx);
+       if (!tfp) {
+               /*
+                * Log it under debug since this is likely a case of the
+                * shared session not being created.  For example, a failed
+                * initialization.
+                */
+               BNXT_TF_DBG(DEBUG, "Failed to get shared tfp on close.\n");
+               return;
+       }
+       rc = tf_close_session(tfp);
+       if (rc)
+               BNXT_TF_DBG(ERR, "Failed to close the shared session rc=%d.\n",
+                           rc);
+       (void)bnxt_ulp_cntxt_shared_tfp_set(bp->ulp_ctx, NULL);
+
+       session->g_shared_tfp.session = NULL;
+}
+
+static int32_t
+ulp_ctx_shared_session_open(struct bnxt *bp,
+                           struct bnxt_ulp_session_state *session)
+{
+       struct rte_eth_dev *ethdev = bp->eth_dev;
+       struct tf_session_resources *resources;
+       struct tf_open_session_parms parms;
+       size_t copy_num_bytes;
+       uint32_t ulp_dev_id;
+       int32_t rc = 0;
+
+       /* only perform this if shared session is enabled. */
+       if (!bnxt_ulp_cntxt_shared_session_enabled(bp->ulp_ctx))
+               return 0;
+
+       memset(&parms, 0, sizeof(parms));
+
+       rc = rte_eth_dev_get_name_by_port(ethdev->data->port_id,
+                                         parms.ctrl_chan_name);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Invalid port %d, rc = %d\n",
+                           ethdev->data->port_id, rc);
+               return rc;
+       }
+       resources = &parms.resources;
+
+       /*
+        * Need to account for size of ctrl_chan_name and 1 extra for Null
+        * terminator
+        */
+       copy_num_bytes = sizeof(parms.ctrl_chan_name) -
+               strlen(parms.ctrl_chan_name) - 1;
+
+       /* Build the ctrl_chan_name with shared token */
+       strncat(parms.ctrl_chan_name, "-tf_shared", copy_num_bytes);
+
+       rc = bnxt_ulp_tf_shared_session_resources_get(bp->ulp_ctx, resources);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get shared resource count.\n");
+               return rc;
+       }
+
+       rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &ulp_dev_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get device id from ulp.\n");
+               return rc;
+       }
+
+       switch (ulp_dev_id) {
+       case BNXT_ULP_DEVICE_ID_WH_PLUS:
+               parms.device_type = TF_DEVICE_TYPE_WH;
                break;
        case BNXT_ULP_DEVICE_ID_STINGRAY:
-               /** RX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 315;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 6;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_WC_PROF] = 192;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_EM_PROF] = 192;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 16384;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_ENCAP_8B] = 511;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 63;
-
-               /* TCAMs */
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-                       315;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] =
-                       6;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 112;
-
-               /* EM */
-               res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 13200;
-
-               /* EEM */
-               res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_TBL_SCOPE] = 1;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_SP_SMAC] = 256;
-
-               /** TX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 292;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 127;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_WC_PROF] = 192;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 64;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_EM_PROF] = 192;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 8192;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 16384;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_MODIFY_IPV4] = 1023;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 367;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_16B] = 223;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_8B] = 255;
-
-               /* TCAMs */
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] =
-                       292;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] =
-                       127;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 960;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 928;
-
-               /* EM */
-               res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 15232;
-
-               /* EEM */
-               res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_TBL_SCOPE] = 1;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = 488;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV6] = 512;
+               parms.device_type = TF_DEVICE_TYPE_SR;
                break;
        case BNXT_ULP_DEVICE_ID_THOR:
-               /** RX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 26;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 6;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_WC_PROF] = 32;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 32;
-               res->ident_cnt[TF_DIR_RX].cnt[TF_IDENT_TYPE_EM_PROF] = 32;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 1024;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 512;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_MIRROR_CONFIG] = 14;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_EM_FKB] = 32;
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_WC_FKB] = 32;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 64;
-
-               /* TCAMs */
-               tmp_cnt = &res->tcam_cnt[TF_DIR_RX].cnt[0];
-               tmp_cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] = 300;
-               tmp_cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] = 6;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 128;
-               res->tcam_cnt[TF_DIR_RX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 112;
-
-               /* EM */
-               res->em_cnt[TF_DIR_RX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 13200;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_RX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = 64;
-
-               /** TX **/
-               /* Identifiers */
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_HIGH] = 26;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_L2_CTXT_LOW] = 26;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_WC_PROF] = 32;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_PROF_FUNC] = 63;
-               res->ident_cnt[TF_DIR_TX].cnt[TF_IDENT_TYPE_EM_PROF] = 32;
-
-               /* Table Types */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_FULL_ACT_RECORD] = 1024;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_STATS_64] = 512;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_MIRROR_CONFIG] = 14;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_EM_FKB] = 32;
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_WC_FKB] = 32;
-
-               /* ENCAP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_ENCAP_64B] = 64;
-
-               /* TCAMs */
-               tmp_cnt = &res->tcam_cnt[TF_DIR_TX].cnt[0];
-
-               tmp_cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH] = 200;
-               tmp_cnt[TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW] = 110;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_PROF_TCAM] = 128;
-               res->tcam_cnt[TF_DIR_TX].cnt[TF_TCAM_TBL_TYPE_WC_TCAM] = 128;
-
-               /* EM */
-               res->em_cnt[TF_DIR_TX].cnt[TF_EM_TBL_TYPE_EM_RECORD] = 15232;
-
-               /* SP */
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_ACT_SP_SMAC_IPV4] = 100;
-
-               res->tbl_cnt[TF_DIR_TX].cnt[TF_TBL_TYPE_MIRROR_CONFIG] = 1;
-
+               parms.device_type = TF_DEVICE_TYPE_THOR;
                break;
        default:
-               return -EINVAL;
+               BNXT_TF_DBG(ERR, "Unable to determine device for "
+                           "opening session.\n");
+               return rc;
        }
 
-       return 0;
+       parms.shadow_copy = true;
+       parms.bp = bp;
+
+       /*
+        * Open the session here, but the collect the resources during the
+        * mapper initialization.
+        */
+       rc = tf_open_session(&bp->tfp_shared, &parms);
+       if (rc)
+               return rc;
+
+       if (parms.shared_session_creator)
+               BNXT_TF_DBG(DEBUG, "Shared session creator.\n");
+       else
+               BNXT_TF_DBG(DEBUG, "Shared session attached.\n");
+
+       /* Save the shared session in global data */
+       if (!session->g_shared_tfp.session)
+               session->g_shared_tfp.session = bp->tfp_shared.session;
+
+       rc = bnxt_ulp_cntxt_shared_tfp_set(bp->ulp_ctx, &bp->tfp_shared);
+       if (rc)
+               BNXT_TF_DBG(ERR, "Failed to add shared tfp to ulp (%d)\n", rc);
+
+       return rc;
+}
+
+static int32_t
+ulp_ctx_shared_session_attach(struct bnxt *bp,
+                             struct bnxt_ulp_session_state *session)
+{
+       int32_t rc = 0;
+
+       /* Simply return success if shared session not enabled */
+       if (bnxt_ulp_cntxt_shared_session_enabled(bp->ulp_ctx)) {
+               bp->tfp_shared.session = session->g_shared_tfp.session;
+               rc = ulp_ctx_shared_session_open(bp, session);
+       }
+
+       return rc;
+}
+
+static void
+ulp_ctx_shared_session_detach(struct bnxt *bp)
+{
+       if (bnxt_ulp_cntxt_shared_session_enabled(bp->ulp_ctx)) {
+               if (bp->tfp_shared.session) {
+                       tf_close_session(&bp->tfp_shared);
+                       bp->tfp_shared.session = NULL;
+               }
+       }
 }
 
 /*
@@ -360,7 +456,7 @@ ulp_ctx_session_open(struct bnxt *bp,
        }
 
        resources = &params.resources;
-       rc = bnxt_ulp_tf_session_resources_get(bp, resources);
+       rc = bnxt_ulp_tf_resources_get(bp->ulp_ctx, resources);
        if (rc) {
                BNXT_TF_DBG(ERR, "Unable to determine tf resources for "
                            "session open.\n");
@@ -557,6 +653,9 @@ ulp_ctx_deinit(struct bnxt *bp,
        /* close the tf session */
        ulp_ctx_session_close(bp, session);
 
+       /* The shared session must be closed last. */
+       ulp_ctx_shared_session_close(bp, session);
+
        /* Free the contents */
        if (session->cfg_data) {
                rte_free(session->cfg_data);
@@ -601,6 +700,29 @@ ulp_ctx_init(struct bnxt *bp,
                goto error_deinit;
        }
 
+       rc = bnxt_ulp_cntxt_app_id_set(bp->ulp_ctx, bp->app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to set app_id for ULP init.\n");
+               goto error_deinit;
+       }
+
+       rc = bnxt_ulp_cntxt_app_caps_init(bp->ulp_ctx, bp->app_id, devid);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to set capabilities for "
+                           " app(%x)/dev(%x)\n", bp->app_id, devid);
+               goto error_deinit;
+       }
+
+       /*
+        * Shared session must be created before first regular session but after
+        * the ulp_ctx is valid.
+        */
+       rc = ulp_ctx_shared_session_open(bp, session);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to open shared session (%d)\n", rc);
+               goto error_deinit;
+       }
+
        /* Open the ulp session. */
        rc = ulp_ctx_session_open(bp, session);
        if (rc)
@@ -677,6 +799,8 @@ ulp_ctx_attach(struct bnxt *bp,
               struct bnxt_ulp_session_state *session)
 {
        int32_t rc = 0;
+       uint32_t flags, dev_id;
+       uint8_t app_id;
 
        /* Increment the ulp context data reference count usage. */
        bp->ulp_ctx->cfg_data = session->cfg_data;
@@ -685,6 +809,29 @@ ulp_ctx_attach(struct bnxt *bp,
        /* update the session details in bnxt tfp */
        bp->tfp.session = session->g_tfp->session;
 
+       /*
+        * The supported flag will be set during the init. Use it now to
+        * know if we should go through the attach.
+        */
+       rc = bnxt_ulp_cntxt_app_id_get(bp->ulp_ctx, &app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable to get the app id from ulp.\n");
+               return -EINVAL;
+       }
+
+       rc = bnxt_ulp_cntxt_dev_id_get(bp->ulp_ctx, &dev_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Unable do get the dev_id.\n");
+               return -EINVAL;
+       }
+
+       flags = bp->ulp_ctx->cfg_data->ulp_flags;
+       if (ULP_APP_DEV_UNSUPPORTED_ENABLED(flags)) {
+               BNXT_TF_DBG(ERR, "APP ID %d, Device ID: 0x%x not supported.\n",
+                           app_id, dev_id);
+               return -EINVAL;
+       }
+
        /* Create a TF Client */
        rc = ulp_ctx_session_open(bp, session);
        if (rc) {
@@ -1126,6 +1273,18 @@ bnxt_ulp_port_init(struct bnxt *bp)
                        BNXT_TF_DBG(ERR, "Failed to attach the ulp context\n");
                        goto jump_to_error;
                }
+
+               /*
+                * Attach to the shared session, must be called after the
+                * ulp_ctx_attach in order to ensure that ulp data is available
+                * for attaching.
+                */
+               rc = ulp_ctx_shared_session_attach(bp, session);
+               if (rc) {
+                       BNXT_TF_DBG(ERR,
+                                   "Failed attach to shared session (%d)", rc);
+                       goto jump_to_error;
+               }
        } else {
                rc = bnxt_ulp_init(bp, session);
                if (rc) {
@@ -1224,6 +1383,9 @@ bnxt_ulp_port_deinit(struct bnxt *bp)
 
                        /* close the session associated with this port */
                        ulp_ctx_detach(bp);
+
+                       /* always detach/close shared after the session. */
+                       ulp_ctx_shared_session_detach(bp);
                } else {
                        /* Perform ulp ctx deinit */
                        bnxt_ulp_deinit(bp, session);
@@ -1264,6 +1426,31 @@ bnxt_ulp_cntxt_ptr2_mark_db_get(struct bnxt_ulp_context *ulp_ctx)
        return ulp_ctx->cfg_data->mark_tbl;
 }
 
+bool
+bnxt_ulp_cntxt_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx)
+{
+       return ULP_SHARED_SESSION_IS_ENABLED(ulp_ctx->cfg_data->ulp_flags);
+}
+
+int32_t
+bnxt_ulp_cntxt_app_id_set(struct bnxt_ulp_context *ulp_ctx, uint8_t app_id)
+{
+       if (!ulp_ctx)
+               return -EINVAL;
+       ulp_ctx->cfg_data->app_id = app_id;
+       return 0;
+}
+
+int32_t
+bnxt_ulp_cntxt_app_id_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *app_id)
+{
+       /* Default APP id is zero */
+       if (!ulp_ctx || !app_id)
+               return -EINVAL;
+       *app_id = ulp_ctx->cfg_data->app_id;
+       return 0;
+}
+
 /* Function to set the device id of the hardware. */
 int32_t
 bnxt_ulp_cntxt_dev_id_set(struct bnxt_ulp_context *ulp_ctx,
@@ -1341,6 +1528,30 @@ bnxt_ulp_cntxt_tbl_scope_id_set(struct bnxt_ulp_context *ulp_ctx,
        return -EINVAL;
 }
 
+/* Function to set the shared tfp session details from the ulp context. */
+int32_t
+bnxt_ulp_cntxt_shared_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp)
+{
+       if (!ulp) {
+               BNXT_TF_DBG(ERR, "Invalid arguments\n");
+               return -EINVAL;
+       }
+
+       ulp->g_shared_tfp = tfp;
+       return 0;
+}
+
+/* Function to get the shared tfp session details from the ulp context. */
+struct tf *
+bnxt_ulp_cntxt_shared_tfp_get(struct bnxt_ulp_context *ulp)
+{
+       if (!ulp) {
+               BNXT_TF_DBG(ERR, "Invalid arguments\n");
+               return NULL;
+       }
+       return ulp->g_shared_tfp;
+}
+
 /* Function to set the tfp session details from the ulp context. */
 int32_t
 bnxt_ulp_cntxt_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp)
index 854eca2..648fb2a 100644 (file)
 
 /* defines for the ulp_flags */
 #define BNXT_ULP_VF_REP_ENABLED                0x1
+#define BNXT_ULP_SHARED_SESSION_ENABLED        0x2
+#define BNXT_ULP_APP_DEV_UNSUPPORTED   0x4
 #define ULP_VF_REP_IS_ENABLED(flag)    ((flag) & BNXT_ULP_VF_REP_ENABLED)
+#define ULP_SHARED_SESSION_IS_ENABLED(flag) ((flag) &\
+                                            BNXT_ULP_SHARED_SESSION_ENABLED)
+#define ULP_APP_DEV_UNSUPPORTED_ENABLED(flag)  ((flag) &\
+                                                BNXT_ULP_APP_DEV_UNSUPPORTED)
 
 enum bnxt_ulp_flow_mem_type {
        BNXT_ULP_FLOW_MEM_TYPE_INT = 0,
@@ -67,11 +73,13 @@ struct bnxt_ulp_data {
 #define        BNXT_ULP_MAX_TUN_CACHE_ENTRIES  16
        struct bnxt_tun_cache_entry     tun_tbl[BNXT_ULP_MAX_TUN_CACHE_ENTRIES];
        bool                            accum_stats;
+       uint8_t                         app_id;
 };
 
 struct bnxt_ulp_context {
        struct bnxt_ulp_data    *cfg_data;
        struct tf               *g_tfp;
+       struct tf               *g_shared_tfp;
 };
 
 struct bnxt_ulp_pci_info {
@@ -86,6 +94,7 @@ struct bnxt_ulp_session_state {
        struct bnxt_ulp_pci_info                pci_info;
        struct bnxt_ulp_data                    *cfg_data;
        struct tf                               *g_tfp;
+       struct tf                               g_shared_tfp;
        uint32_t                                session_opened;
 };
 
@@ -135,6 +144,14 @@ int32_t
 bnxt_ulp_cntxt_tbl_scope_id_get(struct bnxt_ulp_context *ulp_ctx,
                                uint32_t *tbl_scope_id);
 
+/* Function to set the tfp session details in the ulp context. */
+int32_t
+bnxt_ulp_cntxt_shared_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp);
+
+/* Function to get the tfp session details from ulp context. */
+struct tf *
+bnxt_ulp_cntxt_shared_tfp_get(struct bnxt_ulp_context *ulp);
+
 /* Function to set the tfp session details in the ulp context. */
 int32_t
 bnxt_ulp_cntxt_tfp_set(struct bnxt_ulp_context *ulp, struct tf *tfp);
@@ -233,4 +250,26 @@ bnxt_ulp_cntxt_release_fdb_lock(struct bnxt_ulp_context    *ulp_ctx);
 int32_t
 ulp_post_process_tun_flow(struct ulp_rte_parser_params *params);
 
+struct bnxt_ulp_glb_resource_info *
+bnxt_ulp_app_glb_resource_info_list_get(uint32_t *num_entries);
+
+int32_t
+bnxt_ulp_cntxt_app_id_set(struct bnxt_ulp_context *ulp_ctx, uint8_t app_id);
+
+int32_t
+bnxt_ulp_cntxt_app_id_get(struct bnxt_ulp_context *ulp_ctx, uint8_t *app_id);
+
+bool
+bnxt_ulp_cntxt_shared_session_enabled(struct bnxt_ulp_context *ulp_ctx);
+
+struct bnxt_ulp_app_capabilities_info *
+bnxt_ulp_app_cap_list_get(uint32_t *num_entries);
+
+int32_t
+bnxt_ulp_cntxt_app_caps_init(struct bnxt_ulp_context *ulp_ctx,
+                            uint8_t app_id, uint32_t dev_id);
+
+struct bnxt_ulp_resource_resv_info *
+bnxt_ulp_resource_resv_list_get(uint32_t *num_entries);
+
 #endif /* _BNXT_ULP_H_ */
index 60c6056..58104ee 100644 (file)
@@ -58,13 +58,15 @@ static int32_t
 ulp_mapper_glb_resource_read(struct bnxt_ulp_mapper_data *mapper_data,
                             enum tf_dir dir,
                             uint16_t idx,
-                            uint64_t *regval)
+                            uint64_t *regval,
+                            bool *shared)
 {
-       if (!mapper_data || !regval ||
+       if (!mapper_data || !regval || !shared ||
            dir >= TF_DIR_MAX || idx >= BNXT_ULP_GLB_RF_IDX_LAST)
                return -EINVAL;
 
        *regval = mapper_data->glb_res_tbl[dir][idx].resource_hndl;
+       *shared = mapper_data->glb_res_tbl[dir][idx].shared;
        return 0;
 }
 
@@ -78,7 +80,7 @@ ulp_mapper_glb_resource_read(struct bnxt_ulp_mapper_data *mapper_data,
 static int32_t
 ulp_mapper_glb_resource_write(struct bnxt_ulp_mapper_data *data,
                              struct bnxt_ulp_glb_resource_info *res,
-                             uint64_t regval)
+                             uint64_t regval, bool shared)
 {
        struct bnxt_ulp_mapper_glb_resource_entry *ent;
 
@@ -92,6 +94,7 @@ ulp_mapper_glb_resource_write(struct bnxt_ulp_mapper_data *data,
        ent->resource_func = res->resource_func;
        ent->resource_type = res->resource_type;
        ent->resource_hndl = regval;
+       ent->shared = shared;
        return 0;
 }
 
@@ -129,8 +132,12 @@ ulp_mapper_resource_ident_allocate(struct bnxt_ulp_context *ulp_ctx,
 
        /* entries are stored as big-endian format */
        regval = tfp_cpu_to_be_64((uint64_t)iparms.id);
-       /* write to the mapper global resource */
-       rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval);
+       /*
+        * write to the mapper global resource
+        * Shared resources are never allocated through this method, so the
+        * shared flag is always false.
+        */
+       rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval, false);
        if (rc) {
                BNXT_TF_DBG(ERR, "Failed to write to global resource id\n");
                /* Free the identifier when update failed */
@@ -186,8 +193,12 @@ ulp_mapper_resource_index_tbl_alloc(struct bnxt_ulp_context *ulp_ctx,
 
        /* entries are stored as big-endian format */
        regval = tfp_cpu_to_be_64((uint64_t)aparms.idx);
-       /* write to the mapper global resource */
-       rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval);
+       /*
+        * write to the mapper global resource
+        * Shared resources are never allocated through this method, so the
+        * shared flag is always false.
+        */
+       rc = ulp_mapper_glb_resource_write(mapper_data, glb_res, regval, false);
        if (rc) {
                BNXT_TF_DBG(ERR, "Failed to write to global resource id\n");
                /* Free the identifier when update failed */
@@ -963,6 +974,7 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,
        uint32_t update_flag = 0;
        uint64_t src1_val64;
        uint32_t port_id;
+       bool shared;
 
        /* process the field opcode */
        if (fld->field_opc != BNXT_ULP_FIELD_OPC_COND_OP) {
@@ -1244,9 +1256,8 @@ ulp_mapper_field_process(struct bnxt_ulp_mapper_parms *parms,
                        return -EINVAL;
                }
                idx = tfp_be_to_cpu_16(idx);
-               if (ulp_mapper_glb_resource_read(parms->mapper_data,
-                                                dir,
-                                                idx, &regval)) {
+               if (ulp_mapper_glb_resource_read(parms->mapper_data, dir,
+                                                idx, &regval, &shared)) {
                        BNXT_TF_DBG(ERR, "%s global regfile[%d] read failed.\n",
                                    name, idx);
                        return -EINVAL;
@@ -2215,6 +2226,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
        bool write = false;
        bool global = false;
        uint64_t act_rec_size;
+       bool shared = false;
 
        /* use the max size if encap is enabled */
        if (tbl->encap_num_fields)
@@ -2293,7 +2305,7 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                if (ulp_mapper_glb_resource_read(parms->mapper_data,
                                                 tbl->direction,
                                                 tbl->tbl_operand,
-                                                &regval)) {
+                                                &regval, &shared)) {
                        BNXT_TF_DBG(ERR,
                                    "Failed to get tbl idx from Global "
                                    "regfile[%d].\n",
@@ -2400,8 +2412,13 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                regval = tfp_cpu_to_be_64(regval);
 
                if (global) {
+                       /*
+                        * Shared resources are never allocated through this
+                        * method, so the shared flag is always false.
+                        */
                        rc = ulp_mapper_glb_resource_write(parms->mapper_data,
-                                                          &glb_res, regval);
+                                                          &glb_res, regval,
+                                                          false);
                } else {
                        rc = ulp_regfile_write(parms->regfile,
                                               tbl->tbl_operand, regval);
@@ -2422,6 +2439,8 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
                sparms.data_sz_in_bytes = ULP_BITS_2_BYTE(tmplen);
                sparms.idx = index;
                sparms.tbl_scope_id = tbl_scope_id;
+               if (shared)
+                       tfp = bnxt_ulp_cntxt_shared_tfp_get(parms->ulp_ctx);
                rc = tf_set_tbl_entry(tfp, &sparms);
                if (rc) {
                        BNXT_TF_DBG(ERR,
@@ -2469,6 +2488,9 @@ ulp_mapper_index_tbl_process(struct bnxt_ulp_mapper_parms *parms,
        }
        return rc;
 error:
+       /* Shared resources are not freed */
+       if (shared)
+               return rc;
        /*
         * Free the allocated resource since we failed to either
         * write to the entry or link the flow
@@ -2810,7 +2832,8 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
                                  struct bnxt_ulp_mapper_data *mapper_data)
 {
        struct bnxt_ulp_glb_resource_info *glb_res;
-       uint32_t num_glb_res_ids, idx;
+       uint32_t num_glb_res_ids, idx, dev_id;
+       uint8_t app_id;
        int32_t rc = 0;
 
        glb_res = ulp_mapper_glb_resource_info_list_get(&num_glb_res_ids);
@@ -2819,8 +2842,25 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
                return -EINVAL;
        }
 
+       rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to get device id for "
+                           "global init (%d)\n", rc);
+               return rc;
+       }
+
+       rc = bnxt_ulp_cntxt_app_id_get(ulp_ctx, &app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to get app id for "
+                           "global init (%d)\n", rc);
+               return rc;
+       }
+
        /* Iterate the global resources and process each one */
        for (idx = 0; idx < num_glb_res_ids; idx++) {
+               if (dev_id != glb_res[idx].device_id ||
+                   glb_res[idx].app_id != app_id)
+                       continue;
                switch (glb_res[idx].resource_func) {
                case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER:
                        rc = ulp_mapper_resource_ident_allocate(ulp_ctx,
@@ -2844,6 +2884,104 @@ ulp_mapper_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
        return rc;
 }
 
+/*
+ * Iterate over the shared resources assigned during tf_open_session and store
+ * them in the global regfile with the shared flag.
+ */
+static int32_t
+ulp_mapper_app_glb_resource_info_init(struct bnxt_ulp_context *ulp_ctx,
+                                     struct bnxt_ulp_mapper_data *mapper_data)
+{
+       struct bnxt_ulp_glb_resource_info *glb_res;
+       struct tf_get_session_info_parms sparms;
+       uint32_t num_entries, i, dev_id, res;
+       struct tf_resource_info *res_info;
+       uint64_t regval;
+       enum tf_dir dir;
+       int32_t rc = 0;
+       struct tf *tfp;
+       uint8_t app_id;
+
+       memset(&sparms, 0, sizeof(sparms));
+
+       glb_res = bnxt_ulp_app_glb_resource_info_list_get(&num_entries);
+       if (!glb_res || !num_entries) {
+               BNXT_TF_DBG(ERR, "Invalid Arguments\n");
+               return -EINVAL;
+       }
+
+       tfp = bnxt_ulp_cntxt_shared_tfp_get(ulp_ctx);
+       if (!tfp) {
+               BNXT_TF_DBG(ERR, "Failed to get tfp for app global init");
+               return -EINVAL;
+       }
+       /*
+        * Retrieve the resources that were assigned during the shared session
+        * creation.
+        */
+       rc = tf_get_session_info(tfp, &sparms);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to get session info (%d)\n", rc);
+               return rc;
+       }
+
+       rc = bnxt_ulp_cntxt_app_id_get(ulp_ctx, &app_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to get the app id in global init "
+                           "(%d).\n", rc);
+               return rc;
+       }
+
+       rc = bnxt_ulp_cntxt_dev_id_get(ulp_ctx, &dev_id);
+       if (rc) {
+               BNXT_TF_DBG(ERR, "Failed to get device id for app "
+                           "global init (%d)\n", rc);
+               return rc;
+       }
+
+       /* Store all the app global resources */
+       for (i = 0; i < num_entries; i++) {
+               if (dev_id != glb_res[i].device_id ||
+                   app_id != glb_res[i].app_id)
+                       continue;
+               dir = glb_res[i].direction;
+               res = glb_res[i].resource_type;
+
+               switch (glb_res[i].resource_func) {
+               case BNXT_ULP_RESOURCE_FUNC_IDENTIFIER:
+                       res_info = &sparms.session_info.ident[dir].info[res];
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE:
+                       res_info = &sparms.session_info.tbl[dir].info[res];
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE:
+                       res_info = &sparms.session_info.tcam[dir].info[res];
+                       break;
+               case BNXT_ULP_RESOURCE_FUNC_EM_TABLE:
+                       res_info = &sparms.session_info.em[dir].info[res];
+                       break;
+               default:
+                       BNXT_TF_DBG(ERR, "Unknown resource func (0x%x)\n",
+                                   glb_res[i].resource_func);
+                       continue;
+               }
+
+               regval = tfp_cpu_to_be_64((uint64_t)res_info->start);
+               res_info->start++;
+
+               /*
+                * All resources written to the global regfile are shared for
+                * this function.
+                */
+               rc = ulp_mapper_glb_resource_write(mapper_data, &glb_res[i],
+                                                  regval, true);
+               if (rc)
+                       return rc;
+       }
+
+       return rc;
+}
+
 /*
  * Common conditional opcode process routine that is used for both the template
  * rejection and table conditional execution.
@@ -2994,6 +3132,7 @@ ulp_mapper_cc_upd_opr_compute(struct bnxt_ulp_mapper_parms *parms,
                              uint64_t *result)
 {
        uint64_t regval;
+       bool shared;
 
        *result =  false;
        switch (cc_src) {
@@ -3013,7 +3152,7 @@ ulp_mapper_cc_upd_opr_compute(struct bnxt_ulp_mapper_parms *parms,
                break;
        case BNXT_ULP_CC_UPD_SRC_GLB_REGFILE:
                if (ulp_mapper_glb_resource_read(parms->mapper_data, dir,
-                                                cc_opr, &regval)) {
+                                                cc_opr, &regval, &shared)) {
                        BNXT_TF_DBG(ERR, "global regfile[%d] read failed.\n",
                                    cc_opr);
                        return -EINVAL;
@@ -3493,11 +3632,11 @@ ulp_mapper_glb_resource_info_deinit(struct bnxt_ulp_context *ulp_ctx,
 
        /* Iterate the global resources and process each one */
        for (dir = TF_DIR_RX; dir < TF_DIR_MAX; dir++) {
-               for (idx = 0; idx < BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ;
-                     idx++) {
+               for (idx = 0; idx < BNXT_ULP_GLB_RF_IDX_LAST; idx++) {
                        ent = &mapper_data->glb_res_tbl[dir][idx];
                        if (ent->resource_func ==
-                           BNXT_ULP_RESOURCE_FUNC_INVALID)
+                           BNXT_ULP_RESOURCE_FUNC_INVALID ||
+                           ent->shared)
                                continue;
                        memset(&res, 0, sizeof(struct ulp_flow_db_res_params));
                        res.resource_func = ent->resource_func;
@@ -3673,6 +3812,19 @@ ulp_mapper_init(struct bnxt_ulp_context *ulp_ctx)
                goto error;
        }
 
+       /*
+        * Only initialize the app global resources if a shared session was
+        * created.
+        */
+       if (bnxt_ulp_cntxt_shared_session_enabled(ulp_ctx)) {
+               rc = ulp_mapper_app_glb_resource_info_init(ulp_ctx, data);
+               if (rc) {
+                       BNXT_TF_DBG(ERR, "Failed to initialize app "
+                                   "global resources\n");
+                       goto error;
+               }
+       }
+
        /* Allocate the generic table list */
        rc = ulp_mapper_generic_tbl_list_init(data);
        if (rc) {
index 9432462..6e4d9e8 100644 (file)
@@ -22,6 +22,7 @@ struct bnxt_ulp_mapper_glb_resource_entry {
        enum bnxt_ulp_resource_func     resource_func;
        uint32_t                        resource_type; /* TF_ enum type */
        uint64_t                        resource_hndl;
+       bool                            shared;
 };
 
 struct bnxt_ulp_mapper_data {
index ca019bb..5c8893c 100644 (file)
 #define BNXT_ULP_ACT_HID_SHFTR 27
 #define BNXT_ULP_ACT_HID_SHFTL 26
 #define BNXT_ULP_ACT_HID_MASK 2047
-#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 11
-#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 10
+#define BNXT_ULP_GLB_RESOURCE_TBL_MAX_SZ 33
+#define BNXT_ULP_APP_GLB_RESOURCE_TBL_MAX_SZ 27
+#define BNXT_ULP_RESOURCE_RESV_LIST_MAX_SZ 219
+#define BNXT_ULP_APP_CAP_TBL_MAX_SZ 2
 #define BNXT_ULP_COND_GOTO_REJECT 1023
 #define BNXT_ULP_COND_GOTO_RF 0x10000
 #define BNXT_ULP_GLB_FIELD_TBL_SHIFT 7
@@ -348,7 +350,8 @@ enum bnxt_ulp_glb_rf_idx {
        BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0 = 9,
        BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0 = 10,
        BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0 = 11,
-       BNXT_ULP_GLB_RF_IDX_LAST = 12
+       BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1 = 12,
+       BNXT_ULP_GLB_RF_IDX_LAST = 13
 };
 
 enum bnxt_ulp_hdr_type {
@@ -476,6 +479,10 @@ enum bnxt_ulp_template_type {
        BNXT_ULP_TEMPLATE_TYPE_LAST = 2
 };
 
+enum bnxt_ulp_app_cap {
+       BNXT_ULP_APP_CAP_SHARED_EN = 0x00000001
+};
+
 enum bnxt_ulp_fdb_resource_flags {
        BNXT_ULP_FDB_RESOURCE_FLAGS_DIR_INGR = 0x00,
        BNXT_ULP_FDB_RESOURCE_FLAGS_DIR_EGR = 0x01
index dd23635..c8ab14a 100644 (file)
@@ -224,9 +224,244 @@ struct bnxt_ulp_device_params ulp_device_params[BNXT_ULP_DEVICE_ID_LAST] = {
        }
 };
 
+/* List of device specific parameters */
+struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[] = {
+       [0] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .flags                   = 0
+       },
+       [1] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .flags                   = 0
+       },
+};
+
+/* List of device specific parameters */
+struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[]  = {
+       [0] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [1] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [2] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_1,
+       .direction               = TF_DIR_RX
+       },
+       [3] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [4] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [5] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [6] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [7] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [8] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [9] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [10] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [11] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0,
+       .direction               = TF_DIR_TX
+       },
+       [12] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_TX
+       },
+       [13] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_TX
+       },
+       [14] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [15] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [16] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [17] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [18] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_PROF_FUNC_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [19] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_L2_CNTXT_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [20] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [21] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [22] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_KEY_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [23] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0,
+       .direction               = TF_DIR_RX
+       },
+       [24] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_KEY_ID_0,
+       .direction               = TF_DIR_TX
+       },
+       [25] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_EM_PROFILE_ID_0,
+       .direction               = TF_DIR_TX
+       },
+       [26] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_APP_GLB_WC_PROFILE_ID_0,
+       .direction               = TF_DIR_TX
+       }
+};
+
 /* List of device specific parameters */
 struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        [0] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -234,6 +469,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_RX
        },
        [1] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -241,6 +477,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_TX
        },
        [2] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
        .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
@@ -248,6 +485,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_TX
        },
        [3] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -255,6 +493,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_RX
        },
        [4] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -262,6 +501,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_TX
        },
        [5] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -269,6 +509,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_RX
        },
        [6] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
        .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
@@ -276,6 +517,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_RX
        },
        [7] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
        .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
@@ -283,6 +525,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_TX
        },
        [8] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_THOR,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -290,6 +533,7 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_RX
        },
        [9] = {
+       .app_id                  = 0,
        .device_id               = BNXT_ULP_DEVICE_ID_THOR,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
        .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
@@ -297,11 +541,1944 @@ struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[] = {
        .direction               = TF_DIR_TX
        },
        [10] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
+       .direction               = TF_DIR_TX
+       },
+       [11] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [12] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [13] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
+       .direction               = TF_DIR_TX
+       },
+       [14] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [15] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [16] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_VXLAN_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [17] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
+       .direction               = TF_DIR_RX
+       },
+       [18] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
+       .direction               = TF_DIR_TX
+       },
+       [19] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [20] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [21] = {
+       .app_id                  = 1,
        .device_id               = BNXT_ULP_DEVICE_ID_THOR,
        .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
        .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
        .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
        .direction               = TF_DIR_TX
+       },
+       [22] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [23] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [24] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
+       .direction               = TF_DIR_TX
+       },
+       [25] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [26] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_L2_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [27] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_VXLAN_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [28] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
+       .direction               = TF_DIR_RX
+       },
+       [29] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_ENCAP_MAC_PTR,
+       .direction               = TF_DIR_TX
+       },
+       [30] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_RX
+       },
+       [31] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_PROF_FUNC_ID,
+       .direction               = TF_DIR_TX
+       },
+       [32] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .glb_regfile_index       = BNXT_ULP_GLB_RF_IDX_GLB_LB_AREC_PTR,
+       .direction               = TF_DIR_TX
+       }
+};
+
+/* List of tf resources required to be reserved per app/device */
+struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[] = {
+       [0] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 422
+       },
+       [1] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [2] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [3] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [4] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [5] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [6] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [7] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [8] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 511
+       },
+       [9] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 63
+       },
+       [10] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC,
+       .count                   = 255
+       },
+       [11] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [12] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 422
+       },
+       [13] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [14] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [15] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 88
+       },
+       [16] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13168
+       },
+       [17] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [18] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 292
+       },
+       [19] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 148
+       },
+       [20] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [21] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [22] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [23] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [24] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [25] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [26] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 511
+       },
+       [27] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 223
+       },
+       [28] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 255
+       },
+       [29] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 488
+       },
+       [30] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV6,
+       .count                   = 511
+       },
+       [31] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [32] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 292
+       },
+       [33] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 144
+       },
+       [34] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [35] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 928
+       },
+       [36] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
+       },
+       [37] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [38] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [39] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [40] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [41] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 32
+       },
+       [42] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [43] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [44] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [45] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [46] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [47] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [48] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [49] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 64
+       },
+       [50] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 300
+       },
+       [51] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [52] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [53] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 112
+       },
+       [54] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13200
+       },
+       [55] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [56] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 26
+       },
+       [57] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [58] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 63
+       },
+       [59] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [60] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [61] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [62] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [63] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [64] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [65] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [66] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 100
+       },
+       [67] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [68] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 200
+       },
+       [69] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 110
+       },
+       [70] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [71] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 128
+       },
+       [72] = {
+       .app_id                  = 0,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
+       },
+       [73] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 422
+       },
+       [74] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [75] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [76] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [77] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [78] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [79] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [80] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [81] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 511
+       },
+       [82] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 63
+       },
+       [83] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC,
+       .count                   = 255
+       },
+       [84] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [85] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 422
+       },
+       [86] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [87] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [88] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 88
+       },
+       [89] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13168
+       },
+       [90] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [91] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 292
+       },
+       [92] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 148
+       },
+       [93] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [94] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [95] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [96] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [97] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [98] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [99] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 511
+       },
+       [100] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 223
+       },
+       [101] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 255
+       },
+       [102] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 488
+       },
+       [103] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV6,
+       .count                   = 511
+       },
+       [104] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [105] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 292
+       },
+       [106] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 144
+       },
+       [107] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [108] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 928
+       },
+       [109] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
+       },
+       [110] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [111] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [112] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [113] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [114] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 32
+       },
+       [115] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [116] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [117] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [118] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [119] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [120] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [121] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [122] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 64
+       },
+       [123] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 300
+       },
+       [124] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [125] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [126] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 112
+       },
+       [127] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13200
+       },
+       [128] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [129] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 26
+       },
+       [130] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [131] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 63
+       },
+       [132] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [133] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [134] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [135] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [136] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [137] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [138] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [139] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 100
+       },
+       [140] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [141] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 200
+       },
+       [142] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 110
+       },
+       [143] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [144] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 128
+       },
+       [145] = {
+       .app_id                  = 1,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
+       },
+       [146] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 422
+       },
+       [147] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [148] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [149] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [150] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [151] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [152] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [153] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [154] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 511
+       },
+       [155] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 63
+       },
+       [156] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC,
+       .count                   = 255
+       },
+       [157] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [158] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 422
+       },
+       [159] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [160] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [161] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 88
+       },
+       [162] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13168
+       },
+       [163] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [164] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 292
+       },
+       [165] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 148
+       },
+       [166] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 192
+       },
+       [167] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 64
+       },
+       [168] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 192
+       },
+       [169] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 8192
+       },
+       [170] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 16384
+       },
+       [171] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_MODIFY_IPV4,
+       .count                   = 1023
+       },
+       [172] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 511
+       },
+       [173] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_16B,
+       .count                   = 223
+       },
+       [174] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_8B,
+       .count                   = 255
+       },
+       [175] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 488
+       },
+       [176] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV6,
+       .count                   = 511
+       },
+       [177] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [178] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 292
+       },
+       [179] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 144
+       },
+       [180] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 960
+       },
+       [181] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 928
+       },
+       [182] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
+       },
+       [183] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_WH_PLUS,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_TBL_SCOPE,
+       .count                   = 1
+       },
+       [184] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [185] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 6
+       },
+       [186] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [187] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 32
+       },
+       [188] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [189] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [190] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [191] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [192] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [193] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [194] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [195] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 64
+       },
+       [196] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 300
+       },
+       [197] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 6
+       },
+       [198] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [199] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 112
+       },
+       [200] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_RX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 13200
+       },
+       [201] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_HIGH,
+       .count                   = 26
+       },
+       [202] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_L2_CTXT_LOW,
+       .count                   = 26
+       },
+       [203] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_WC_PROF,
+       .count                   = 32
+       },
+       [204] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_PROF_FUNC,
+       .count                   = 63
+       },
+       [205] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_IDENTIFIER,
+       .resource_type           = TF_IDENT_TYPE_EM_PROF,
+       .count                   = 32
+       },
+       [206] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_FULL_ACT_RECORD,
+       .count                   = 1024
+       },
+       [207] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_STATS_64,
+       .count                   = 512
+       },
+       [208] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 14
+       },
+       [209] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_EM_FKB,
+       .count                   = 32
+       },
+       [210] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_WC_FKB,
+       .count                   = 32
+       },
+       [211] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_ENCAP_64B,
+       .count                   = 64
+       },
+       [212] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_ACT_SP_SMAC_IPV4,
+       .count                   = 100
+       },
+       [213] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_INDEX_TABLE,
+       .resource_type           = TF_TBL_TYPE_MIRROR_CONFIG,
+       .count                   = 1
+       },
+       [214] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_HIGH,
+       .count                   = 200
+       },
+       [215] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_L2_CTXT_TCAM_LOW,
+       .count                   = 110
+       },
+       [216] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_PROF_TCAM,
+       .count                   = 128
+       },
+       [217] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_TCAM_TABLE,
+       .resource_type           = TF_TCAM_TBL_TYPE_WC_TCAM,
+       .count                   = 128
+       },
+       [218] = {
+       .app_id                  = 2,
+       .device_id               = BNXT_ULP_DEVICE_ID_THOR,
+       .direction               = TF_DIR_TX,
+       .resource_func           = BNXT_ULP_RESOURCE_FUNC_EM_TABLE,
+       .resource_type           = TF_EM_TBL_TYPE_EM_RECORD,
+       .count                   = 15232
        }
 };
 
index d18f6ca..ee5fbde 100644 (file)
@@ -312,11 +312,27 @@ struct bnxt_ulp_mapper_ident_info {
 };
 
 struct bnxt_ulp_glb_resource_info {
+       uint8_t                         app_id;
        enum bnxt_ulp_device_id         device_id;
+       enum tf_dir                     direction;
        enum bnxt_ulp_resource_func     resource_func;
        uint32_t                        resource_type; /* TF_ enum type */
        enum bnxt_ulp_glb_rf_idx        glb_regfile_index;
+};
+
+struct bnxt_ulp_resource_resv_info {
+       uint8_t                         app_id;
+       enum bnxt_ulp_device_id         device_id;
        enum tf_dir                     direction;
+       enum bnxt_ulp_resource_func     resource_func;
+       uint32_t                        resource_type; /* TF_ enum type */
+       uint32_t                        count;
+};
+
+struct bnxt_ulp_app_capabilities_info {
+       uint8_t                         app_id;
+       enum bnxt_ulp_device_id         device_id;
+       uint32_t                        flags;
 };
 
 struct bnxt_ulp_cache_tbl_params {
@@ -361,6 +377,23 @@ extern uint32_t ulp_act_prop_map_table[];
  */
 extern struct bnxt_ulp_glb_resource_info ulp_glb_resource_tbl[];
 
+/*
+ * The ulp_app_glb_resource_tbl provides the list of shared resources required
+ * in the event that shared session is enabled.
+ */
+extern struct bnxt_ulp_glb_resource_info ulp_app_glb_resource_tbl[];
+
+/*
+ * The ulp_resource_resv_list provides the list of tf resources required when
+ * calling tf_open.
+ */
+extern struct bnxt_ulp_resource_resv_info ulp_resource_resv_list[];
+
+/*
+ * The_app_cap_info_list provides the list of ULP capabilities per app/device.
+ */
+extern struct bnxt_ulp_app_capabilities_info ulp_app_cap_info_list[];
+
 /*
  * The ulp_cache_tbl_parms table provides the sizes of the cache tables the
  * mapper must dynamically allocate during initialization.