get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 69311,
    "url": "http://patches.dpdk.org/api/patches/69311/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200425140141.27947-3-ajit.khaparde@broadcom.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200425140141.27947-3-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200425140141.27947-3-ajit.khaparde@broadcom.com",
    "date": "2020-04-25T14:01:39",
    "name": "[v2,2/4] net/bnxt: update action record external pool",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "a84e811534df386d5f9095972782a9bed86bfa62",
    "submitter": {
        "id": 501,
        "url": "http://patches.dpdk.org/api/people/501/?format=api",
        "name": "Ajit Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "http://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200425140141.27947-3-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 9634,
            "url": "http://patches.dpdk.org/api/series/9634/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=9634",
            "date": "2020-04-25T14:01:38",
            "name": "introduce changes to support flow scaling",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/9634/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/69311/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/69311/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 2BE6DA00C2;\n\tSat, 25 Apr 2020 16:02:29 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0B4AA1C219;\n\tSat, 25 Apr 2020 16:01:57 +0200 (CEST)",
            "from rnd-relay.smtp.broadcom.com (rnd-relay.smtp.broadcom.com\n [192.19.229.170]) by dpdk.org (Postfix) with ESMTP id 5AC5B1BF8C\n for <dev@dpdk.org>; Sat, 25 Apr 2020 16:01:49 +0200 (CEST)",
            "from mail-irv-17.broadcom.com (mail-irv-17.lvn.broadcom.net\n [10.75.242.48])\n by rnd-relay.smtp.broadcom.com (Postfix) with ESMTP id 54A0330C021;\n Sat, 25 Apr 2020 06:49:57 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.230.185.215])\n by mail-irv-17.broadcom.com (Postfix) with ESMTP id 4643814008C;\n Sat, 25 Apr 2020 07:01:47 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com 54A0330C021",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1587822597;\n bh=NKNPSnSeE1q++4VYtrKOIP64kE6A8vFwHj4YLveZOtI=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=J5Vf4LxxsD2U3rstjeKdxnhFy10EB1ibsJL37quW2Eft6l++C1+XVdx45DnZD6FXs\n U2ILTfZ4dy6c3+5Egsq+xh13MuamNCnUVSnvOlXv8TofGUjq3S4fg8WqkCZ7i7i6I6\n 6IC07NO5ON8NkGjSwU19pYMJoM4i5cPQIBjBaUbs=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Farah Smith <farah.smith@broadcom.com>,\n Mike Baucom <michael.baucom@broadcom.com>,\n Peter Spreadborough <peter.spreadborough@broadcom.com>,\n Kishore Padmanabha <kishore.padmanabha@broadcom.com>",
        "Date": "Sat, 25 Apr 2020 07:01:39 -0700",
        "Message-Id": "<20200425140141.27947-3-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20200425140141.27947-1-ajit.khaparde@broadcom.com>",
        "References": "\n <1587786446-35230-1-git-send-email-venkatkumar.duvvuru@broadcom.com>\n <20200425140141.27947-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 2/4] net/bnxt: update action record external\n\tpool",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "From: Farah Smith <farah.smith@broadcom.com>\n\n- Added support variable sized action records\n- Additional error checking on table scope params\n- Single external pool supported per direction\n- Changed to return action record pointer\n- Allows action pool to fully utilize the number of flows\n\nSigned-off-by: Farah Smith <farah.smith@broadcom.com>\nSigned-off-by: Mike Baucom <michael.baucom@broadcom.com>\nReviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>\nReviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>\n---\n drivers/net/bnxt/tf_core/tf_core.c    |   3 -\n drivers/net/bnxt/tf_core/tf_core.h    |  15 +--\n drivers/net/bnxt/tf_core/tf_rm.c      |   3 -\n drivers/net/bnxt/tf_core/tf_session.h |   6 --\n drivers/net/bnxt/tf_core/tf_tbl.c     | 136 ++++++++++----------------\n drivers/net/bnxt/tf_core/tf_tbl.h     |   4 +-\n 6 files changed, 62 insertions(+), 105 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c\nindex fc7d6381f..cf9f36adb 100644\n--- a/drivers/net/bnxt/tf_core/tf_core.c\n+++ b/drivers/net/bnxt/tf_core/tf_core.c\n@@ -175,9 +175,6 @@ tf_open_session(struct tf                    *tfp,\n \t/* Setup hash seeds */\n \ttf_seeds_init(session);\n \n-\t/* Initialize external pool data structures */\n-\ttf_init_tbl_pool(session);\n-\n \tsession->ref_count++;\n \n \t/* Return session ID */\ndiff --git a/drivers/net/bnxt/tf_core/tf_core.h b/drivers/net/bnxt/tf_core/tf_core.h\nindex 6a1f3a106..4b60973ee 100644\n--- a/drivers/net/bnxt/tf_core/tf_core.h\n+++ b/drivers/net/bnxt/tf_core/tf_core.h\n@@ -83,7 +83,7 @@ enum tf_mem {\n \n /** EEM record AR helper\n  *\n- * Helpers to handle the Action Record Pointer in the EEM Record Entry.\n+ * Helper to handle the Action Record Pointer in the EEM Record Entry.\n  *\n  * Convert absolute offset to action record pointer in EEM record entry\n  * Convert action record pointer in EEM record entry to absolute offset\n@@ -91,8 +91,6 @@ enum tf_mem {\n #define TF_ACT_REC_OFFSET_2_PTR(offset) ((offset) >> 4)\n #define TF_ACT_REC_PTR_2_OFFSET(offset) ((offset) << 4)\n \n-#define TF_ACT_REC_INDEX_2_OFFSET(idx) ((idx) << 9)\n-\n /*\n  * Helper Macros\n  */\n@@ -943,8 +941,6 @@ enum tf_tbl_type {\n \t * scope. Internal types are not.\n \t */\n \tTF_TBL_TYPE_EXT,\n-\t/** Future - external pool of size0 entries */\n-\tTF_TBL_TYPE_EXT_0,\n \tTF_TBL_TYPE_MAX\n };\n \n@@ -959,6 +955,10 @@ struct tf_alloc_tbl_entry_parms {\n \t * [in] Type of the allocation\n \t */\n \tenum tf_tbl_type type;\n+\t/**\n+\t * [in] Table scope identifier (ignored unless TF_TBL_TYPE_EXT)\n+\t */\n+\tuint32_t tbl_scope_id;\n \t/**\n \t * [in] Enable search for matching entry. If the table type is\n \t * internal the shadow copy will be searched before\n@@ -1028,6 +1028,10 @@ struct tf_free_tbl_entry_parms {\n \t * [in] Type of the allocation type\n \t */\n \tenum tf_tbl_type type;\n+\t/**\n+\t * [in] Table scope identifier (ignored unless TF_TBL_TYPE_EXT)\n+\t */\n+\tuint32_t tbl_scope_id;\n \t/**\n \t * [in] Index to free\n \t */\n@@ -1070,7 +1074,6 @@ int tf_free_tbl_entry(struct tf *tfp,\n struct tf_set_tbl_entry_parms {\n \t/**\n \t * [in] Table scope identifier\n-\t *\n \t */\n \tuint32_t tbl_scope_id;\n \t/**\ndiff --git a/drivers/net/bnxt/tf_core/tf_rm.c b/drivers/net/bnxt/tf_core/tf_rm.c\nindex a5e96f29b..38b1e71cd 100644\n--- a/drivers/net/bnxt/tf_core/tf_rm.c\n+++ b/drivers/net/bnxt/tf_core/tf_rm.c\n@@ -3104,7 +3104,6 @@ tf_rm_lookup_tbl_type_pool(struct tf_session *tfs,\n \t\tbreak;\n \t/* No bitalloc pools for these types */\n \tcase TF_TBL_TYPE_EXT:\n-\tcase TF_TBL_TYPE_EXT_0:\n \tdefault:\n \t\tbreak;\n \t}\n@@ -3211,7 +3210,6 @@ tf_rm_convert_tbl_type(enum tf_tbl_type type,\n \tcase TF_TBL_TYPE_ACT_MODIFY_IPV6_SRC:\n \tcase TF_TBL_TYPE_VNIC_SVIF:\n \tcase TF_TBL_TYPE_EXT:   /* No pools for this type */\n-\tcase TF_TBL_TYPE_EXT_0: /* No pools for this type */\n \tdefault:\n \t\t*hcapi_type = -1;\n \t\trc = -EOPNOTSUPP;\n@@ -3277,7 +3275,6 @@ tf_rm_convert_index(struct tf_session *tfs,\n \t/* Not yet supported */\n \tcase TF_TBL_TYPE_VNIC_SVIF:\n \tcase TF_TBL_TYPE_EXT:   /* No pools for this type */\n-\tcase TF_TBL_TYPE_EXT_0: /* No pools for this type */\n \tdefault:\n \t\treturn -EOPNOTSUPP;\n \t}\ndiff --git a/drivers/net/bnxt/tf_core/tf_session.h b/drivers/net/bnxt/tf_core/tf_session.h\nindex fed34f146..50ef2d530 100644\n--- a/drivers/net/bnxt/tf_core/tf_session.h\n+++ b/drivers/net/bnxt/tf_core/tf_session.h\n@@ -289,12 +289,6 @@ struct tf_session {\n \n \t/** Table scope array */\n \tstruct tf_tbl_scope_cb tbl_scopes[TF_NUM_TBL_SCOPE];\n-\n-\t/** Each external pool is associated with a single table scope\n-\t *  For each external pool store the associated table scope in\n-\t *  this data structure\n-\t */\n-\tuint32_t ext_pool_2_scope[TF_DIR_MAX][TF_EXT_POOL_CNT_MAX];\n };\n \n #endif /* _TF_SESSION_H_ */\ndiff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c\nindex 17df27435..236affe25 100644\n--- a/drivers/net/bnxt/tf_core/tf_tbl.c\n+++ b/drivers/net/bnxt/tf_core/tf_tbl.c\n@@ -701,6 +701,21 @@ tf_em_validate_num_entries(struct tf_tbl_scope_cb *tbl_scope_cb,\n \t\t}\n \t}\n \n+\tif (parms->rx_num_flows_in_k != 0 &&\n+\t    (parms->rx_max_key_sz_in_bits / 8 == 0)) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"EEM: Rx key size required: %u\\n\",\n+\t\t\t    (parms->rx_max_key_sz_in_bits));\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (parms->tx_num_flows_in_k != 0 &&\n+\t    (parms->tx_max_key_sz_in_bits / 8 == 0)) {\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t    \"EEM: Tx key size required: %u\\n\",\n+\t\t\t    (parms->tx_max_key_sz_in_bits));\n+\t\treturn -EINVAL;\n+\t}\n \t/* Rx */\n \ttbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[KEY0_TABLE].num_entries =\n \t\tparms->rx_num_flows_in_k * TF_KILOBYTE;\n@@ -715,7 +730,7 @@ tf_em_validate_num_entries(struct tf_tbl_scope_cb *tbl_scope_cb,\n \ttbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[RECORD_TABLE].num_entries =\n \t\tparms->rx_num_flows_in_k * TF_KILOBYTE;\n \ttbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[RECORD_TABLE].entry_size =\n-\t\tparms->tx_max_action_entry_sz_in_bits / 8;\n+\t\tparms->rx_max_action_entry_sz_in_bits / 8;\n \n \ttbl_scope_cb->em_ctx_info[TF_DIR_RX].em_tables[EFC_TABLE].num_entries =\n \t\t0;\n@@ -954,14 +969,10 @@ tf_free_tbl_entry_shadow(struct tf_session *tfs,\n /**\n  * Create External Tbl pool of memory indexes.\n  *\n- * [in] session\n- *   Pointer to session\n  * [in] dir\n  *   direction\n  * [in] tbl_scope_cb\n  *   pointer to the table scope\n- * [in] tbl_scope_id\n- *   id of the table scope\n  * [in] num_entries\n  *   number of entries to write\n  * [in] entry_sz_bytes\n@@ -973,18 +984,16 @@ tf_free_tbl_entry_shadow(struct tf_session *tfs,\n  *          - Failure, entry not allocated, out of resources\n  */\n static int\n-tf_create_tbl_pool_external(struct tf_session *session,\n-\t\t\t    enum tf_dir dir,\n+tf_create_tbl_pool_external(enum tf_dir dir,\n \t\t\t    struct tf_tbl_scope_cb *tbl_scope_cb,\n-\t\t\t    uint32_t table_scope_id,\n \t\t\t    uint32_t num_entries,\n \t\t\t    uint32_t entry_sz_bytes)\n-\n {\n \tstruct tfp_calloc_parms parms;\n-\tuint32_t i, j;\n+\tuint32_t i;\n+\tint32_t j;\n \tint rc = 0;\n-\tstruct stack *pool = &tbl_scope_cb->ext_pool[dir][TF_EXT_POOL_0];\n+\tstruct stack *pool = &tbl_scope_cb->ext_act_pool[dir];\n \n \tparms.nitems = num_entries;\n \tparms.size = sizeof(uint32_t);\n@@ -1009,18 +1018,23 @@ tf_create_tbl_pool_external(struct tf_session *session,\n \t/* Save the  malloced memory address so that it can\n \t * be freed when the table scope is freed.\n \t */\n-\ttbl_scope_cb->ext_pool_mem[dir][TF_EXT_POOL_0] =\n-\t\t(uint32_t *)parms.mem_va;\n+\ttbl_scope_cb->ext_act_pool_mem[dir] = (uint32_t *)parms.mem_va;\n \n-\t/* Fill pool with indexes\n+\t/* Fill pool with indexes in reverse\n \t */\n-\tj = num_entries * entry_sz_bytes - 1;\n+\tj = (num_entries - 1) * entry_sz_bytes;\n \n \tfor (i = 0; i < num_entries; i++) {\n \t\trc = stack_push(pool, j);\n \t\tif (rc != 0) {\n-\t\t\tPMD_DRV_LOG(ERR, \"%d TBL: stack failure %s\\n\",\n-\t\t\t\t    dir, strerror(-rc));\n+\t\t\tPMD_DRV_LOG(ERR, \"%s TBL: stack failure %s\\n\",\n+\t\t\t\t    tf_dir_2_str(dir), strerror(-rc));\n+\t\t\tgoto cleanup;\n+\t\t}\n+\n+\t\tif (j < 0) {\n+\t\t\tPMD_DRV_LOG(ERR, \"%d TBL: invalid offset (%d)\\n\",\n+\t\t\t\t    dir, j);\n \t\t\tgoto cleanup;\n \t\t}\n \t\tj -= entry_sz_bytes;\n@@ -1032,10 +1046,6 @@ tf_create_tbl_pool_external(struct tf_session *session,\n \t\t\t    dir, strerror(-rc));\n \t\tgoto cleanup;\n \t}\n-\t/* Set the table scope associated with the pool\n-\t */\n-\tsession->ext_pool_2_scope[dir][TF_EXT_POOL_0] = table_scope_id;\n-\n \treturn 0;\n cleanup:\n \ttfp_free((void *)parms.mem_va);\n@@ -1045,8 +1055,6 @@ tf_create_tbl_pool_external(struct tf_session *session,\n /**\n  * Destroy External Tbl pool of memory indexes.\n  *\n- * [in] session\n- *   Pointer to session\n  * [in] dir\n  *   direction\n  * [in] tbl_scope_cb\n@@ -1054,18 +1062,13 @@ tf_create_tbl_pool_external(struct tf_session *session,\n  *\n  */\n static void\n-tf_destroy_tbl_pool_external(struct tf_session *session,\n-\t\t\t    enum tf_dir dir,\n-\t\t\t    struct tf_tbl_scope_cb *tbl_scope_cb)\n+tf_destroy_tbl_pool_external(enum tf_dir dir,\n+\t\t\t     struct tf_tbl_scope_cb *tbl_scope_cb)\n {\n-\tuint32_t *ext_pool_mem =\n-\t\ttbl_scope_cb->ext_pool_mem[dir][TF_EXT_POOL_0];\n+\tuint32_t *ext_act_pool_mem =\n+\t\ttbl_scope_cb->ext_act_pool_mem[dir];\n \n-\ttfp_free(ext_pool_mem);\n-\n-\t/* Set the table scope associated with the pool\n-\t */\n-\tsession->ext_pool_2_scope[dir][TF_EXT_POOL_0] = TF_TBL_SCOPE_INVALID;\n+\ttfp_free(ext_act_pool_mem);\n }\n \n /**\n@@ -1088,7 +1091,6 @@ tf_alloc_tbl_entry_pool_external(struct tf *tfp,\n \tint rc;\n \tuint32_t index;\n \tstruct tf_session *tfs;\n-\tuint32_t tbl_scope_id;\n \tstruct tf_tbl_scope_cb *tbl_scope_cb;\n \tstruct stack *pool;\n \n@@ -1107,26 +1109,17 @@ tf_alloc_tbl_entry_pool_external(struct tf *tfp,\n \n \ttfs = (struct tf_session *)(tfp->session->core_data);\n \n-\tif (parms->type != TF_TBL_TYPE_EXT) {\n-\t\tPMD_DRV_LOG(ERR,\n-\t\t\t    \"dir:%d, Type not supported, type:%d\\n\",\n-\t\t\t    parms->dir,\n-\t\t\t    parms->type);\n-\t\treturn -EOPNOTSUPP;\n-\t}\n-\n \t/* Get the pool info from the table scope\n \t */\n-\ttbl_scope_id = tfs->ext_pool_2_scope[parms->dir][TF_EXT_POOL_0];\n-\ttbl_scope_cb = tbl_scope_cb_find(tfs, tbl_scope_id);\n+\ttbl_scope_cb = tbl_scope_cb_find(tfs, parms->tbl_scope_id);\n \n \tif (tbl_scope_cb == NULL) {\n \t\tPMD_DRV_LOG(ERR,\n-\t\t\t    \"dir:%d, table scope not allocated\\n\",\n-\t\t\t    parms->dir);\n+\t\t\t\t\t\"%s, table scope not allocated\\n\",\n+\t\t\t\t\ttf_dir_2_str(parms->dir));\n \t\treturn -EINVAL;\n \t}\n-\tpool = &tbl_scope_cb->ext_pool[parms->dir][TF_EXT_POOL_0];\n+\tpool = &tbl_scope_cb->ext_act_pool[parms->dir];\n \n \t/* Allocate an element\n \t */\n@@ -1246,12 +1239,11 @@ tf_alloc_tbl_entry_pool_internal(struct tf *tfp,\n  */\n static int\n tf_free_tbl_entry_pool_external(struct tf *tfp,\n-\t\t       struct tf_free_tbl_entry_parms *parms)\n+\t\t\t\tstruct tf_free_tbl_entry_parms *parms)\n {\n \tint rc = 0;\n \tstruct tf_session *tfs;\n \tuint32_t index;\n-\tuint32_t tbl_scope_id;\n \tstruct tf_tbl_scope_cb *tbl_scope_cb;\n \tstruct stack *pool;\n \n@@ -1270,26 +1262,17 @@ tf_free_tbl_entry_pool_external(struct tf *tfp,\n \n \ttfs = (struct tf_session *)(tfp->session->core_data);\n \n-\tif (parms->type != TF_TBL_TYPE_EXT) {\n-\t\tPMD_DRV_LOG(ERR,\n-\t\t\t    \"dir:%d, Type not supported, type:%d\\n\",\n-\t\t\t    parms->dir,\n-\t\t\t    parms->type);\n-\t\treturn -EOPNOTSUPP;\n-\t}\n-\n \t/* Get the pool info from the table scope\n \t */\n-\ttbl_scope_id = tfs->ext_pool_2_scope[parms->dir][TF_EXT_POOL_0];\n-\ttbl_scope_cb = tbl_scope_cb_find(tfs, tbl_scope_id);\n+\ttbl_scope_cb = tbl_scope_cb_find(tfs, parms->tbl_scope_id);\n \n \tif (tbl_scope_cb == NULL) {\n \t\tPMD_DRV_LOG(ERR,\n-\t\t\t    \"dir:%d, table scope error\\n\",\n+\t\t\t    \"dir:%d, Session info invalid\\n\",\n \t\t\t    parms->dir);\n \t\treturn -EINVAL;\n \t}\n-\tpool = &tbl_scope_cb->ext_pool[parms->dir][TF_EXT_POOL_0];\n+\tpool = &tbl_scope_cb->ext_act_pool[parms->dir];\n \n \tindex = parms->idx;\n \n@@ -1390,18 +1373,6 @@ tf_free_tbl_entry_pool_internal(struct tf *tfp,\n \treturn rc;\n }\n \n-/* API defined in tf_tbl.h */\n-void\n-tf_init_tbl_pool(struct tf_session *session)\n-{\n-\tenum tf_dir dir;\n-\n-\tfor (dir = 0; dir < TF_DIR_MAX; dir++) {\n-\t\tsession->ext_pool_2_scope[dir][TF_EXT_POOL_0] =\n-\t\t\tTF_TBL_SCOPE_INVALID;\n-\t}\n-}\n-\n /* API defined in tf_em.h */\n struct tf_tbl_scope_cb *\n tbl_scope_cb_find(struct tf_session *session,\n@@ -1447,8 +1418,7 @@ tf_free_eem_tbl_scope_cb(struct tf *tfp,\n \tfor (dir = 0; dir < TF_DIR_MAX; dir++) {\n \t\t/* Free associated external pools\n \t\t */\n-\t\ttf_destroy_tbl_pool_external(session,\n-\t\t\t\t\t     dir,\n+\t\ttf_destroy_tbl_pool_external(dir,\n \t\t\t\t\t     tbl_scope_cb);\n \t\ttf_msg_em_op(tfp,\n \t\t\t     dir,\n@@ -1551,12 +1521,10 @@ tf_alloc_eem_tbl_scope(struct tf *tfp,\n \t\t * Initially, this is a single fixed size pool for all external\n \t\t * actions related to a single table scope.\n \t\t */\n-\t\trc = tf_create_tbl_pool_external(session,\n-\t\t\t\t\t\t dir,\n-\t\t\t\t\t\t tbl_scope_cb,\n-\t\t\t\t\t\t index,\n-\t\t\t\t\t\t TF_EXT_POOL_ENTRY_CNT,\n-\t\t\t\t\t\t TF_EXT_POOL_ENTRY_SZ_BYTES);\n+\t\trc = tf_create_tbl_pool_external(dir,\n+\t\t\t\t\t    tbl_scope_cb,\n+\t\t\t\t\t    em_tables[RECORD_TABLE].num_entries,\n+\t\t\t\t\t    em_tables[RECORD_TABLE].entry_size);\n \t\tif (rc) {\n \t\t\tPMD_DRV_LOG(ERR,\n \t\t\t\t    \"%d TBL: Unable to allocate idx pools %s\\n\",\n@@ -1600,13 +1568,12 @@ tf_set_tbl_entry(struct tf *tfp,\n \n \tif (parms->type == TF_TBL_TYPE_EXT) {\n \t\tvoid *base_addr;\n-\t\tuint32_t offset = TF_ACT_REC_INDEX_2_OFFSET(parms->idx);\n+\t\tuint32_t offset = parms->idx;\n \t\tuint32_t tbl_scope_id;\n \n \t\tsession = (struct tf_session *)(tfp->session->core_data);\n \n-\t\ttbl_scope_id =\n-\t\t\tsession->ext_pool_2_scope[parms->dir][TF_EXT_POOL_0];\n+\t\ttbl_scope_id = parms->tbl_scope_id;\n \n \t\tif (tbl_scope_id == TF_TBL_SCOPE_INVALID)  {\n \t\t\tPMD_DRV_LOG(ERR,\n@@ -1618,7 +1585,6 @@ tf_set_tbl_entry(struct tf *tfp,\n \t\t/* Get the table scope control block associated with the\n \t\t * external pool\n \t\t */\n-\n \t\ttbl_scope_cb = tbl_scope_cb_find(session, tbl_scope_id);\n \n \t\tif (tbl_scope_cb == NULL)\ndiff --git a/drivers/net/bnxt/tf_core/tf_tbl.h b/drivers/net/bnxt/tf_core/tf_tbl.h\nindex 5d3ea71f4..bdc6288ee 100644\n--- a/drivers/net/bnxt/tf_core/tf_tbl.h\n+++ b/drivers/net/bnxt/tf_core/tf_tbl.h\n@@ -72,8 +72,8 @@ struct tf_tbl_scope_cb {\n \tint index;\n \tstruct tf_em_ctx_mem_info  em_ctx_info[TF_DIR_MAX];\n \tstruct tf_em_caps          em_caps[TF_DIR_MAX];\n-\tstruct stack               ext_pool[TF_DIR_MAX][TF_EXT_POOL_CNT_MAX];\n-\tuint32_t              *ext_pool_mem[TF_DIR_MAX][TF_EXT_POOL_CNT_MAX];\n+\tstruct stack               ext_act_pool[TF_DIR_MAX];\n+\tuint32_t                  *ext_act_pool_mem[TF_DIR_MAX];\n };\n \n /** Hardware Page sizes supported for EEM: 4K, 8K, 64K, 256K, 1M, 2M, 4M, 1G.\n",
    "prefixes": [
        "v2",
        "2/4"
    ]
}