get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 73065,
    "url": "http://patches.dpdk.org/api/patches/73065/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200703210210.40568-18-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": "<20200703210210.40568-18-ajit.khaparde@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200703210210.40568-18-ajit.khaparde@broadcom.com",
    "date": "2020-07-03T21:01:36",
    "name": "[v5,17/51] net/bnxt: implement support for TCAM access",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "5f3d68b013dbe6fdc1d856c3edcf5aec61097fac",
    "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/20200703210210.40568-18-ajit.khaparde@broadcom.com/mbox/",
    "series": [
        {
            "id": 10785,
            "url": "http://patches.dpdk.org/api/series/10785/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=10785",
            "date": "2020-07-03T21:01:19",
            "name": "net/bnxt: add features for host-based flow management",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/10785/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/73065/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/73065/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 2E951A0524;\n\tFri,  3 Jul 2020 23:08:00 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 281581DD0E;\n\tFri,  3 Jul 2020 23:05:33 +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 A6D4A1DC27\n for <dev@dpdk.org>; Fri,  3 Jul 2020 23:05:01 +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 E887F30C028;\n Fri,  3 Jul 2020 14:05:00 -0700 (PDT)",
            "from localhost.localdomain (unknown [10.230.185.215])\n by mail-irv-17.broadcom.com (Postfix) with ESMTP id AB33514008E;\n Fri,  3 Jul 2020 14:05:00 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.10.3 rnd-relay.smtp.broadcom.com E887F30C028",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=broadcom.com;\n s=dkimrelay; t=1593810300;\n bh=myRmJpqlQIwo9x2Gm5VGxgmzM1buMWemeJw1KUHFGt0=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n b=P8zYnYcIiNzhQbmx1BJqJXxn9hYx8GMapz7ihemBT3UreMBqdL/Tcnz1LZQeTGaJK\n cOVqTNnt+qdeUwL1+2yTuz+X7Y2gnlCdQe60MdDXgM6LBucMtmKyXkUAFIDIqQEb2B\n fTbCKqq4pBIIRcwDCMmBFVgVIEaFeJXI7ujv23Qg=",
        "From": "Ajit Khaparde <ajit.khaparde@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Jay Ding <jay.ding@broadcom.com>,\n Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>,\n Randy Schacher <stuart.schacher@broadcom.com>",
        "Date": "Fri,  3 Jul 2020 14:01:36 -0700",
        "Message-Id": "<20200703210210.40568-18-ajit.khaparde@broadcom.com>",
        "X-Mailer": "git-send-email 2.21.1 (Apple Git-122.3)",
        "In-Reply-To": "<20200703210210.40568-1-ajit.khaparde@broadcom.com>",
        "References": "<1f5421dc-0453-6dc8-09c2-ddfff6eb4888@intel.com>\n <20200703210210.40568-1-ajit.khaparde@broadcom.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 17/51] net/bnxt: implement support for TCAM\n\taccess",
        "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: Jay Ding <jay.ding@broadcom.com>\n\nImplement TCAM alloc, free, bind, and unbind functions\nUpdate tf_core, tf_msg, etc.\n\nSigned-off-by: Jay Ding <jay.ding@broadcom.com>\nSigned-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>\nReviewed-by: Randy Schacher <stuart.schacher@broadcom.com>\nReviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/tf_core/tf_core.c      | 258 ++++++++++-----------\n drivers/net/bnxt/tf_core/tf_device.h    |  14 +-\n drivers/net/bnxt/tf_core/tf_device_p4.c |  25 ++-\n drivers/net/bnxt/tf_core/tf_msg.c       |  31 +--\n drivers/net/bnxt/tf_core/tf_msg.h       |   4 +-\n drivers/net/bnxt/tf_core/tf_tcam.c      | 285 +++++++++++++++++++++++-\n drivers/net/bnxt/tf_core/tf_tcam.h      |  66 ++++--\n 7 files changed, 480 insertions(+), 203 deletions(-)",
    "diff": "diff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c\nindex 648d0d1bd..29522c66e 100644\n--- a/drivers/net/bnxt/tf_core/tf_core.c\n+++ b/drivers/net/bnxt/tf_core/tf_core.c\n@@ -19,43 +19,6 @@\n #include \"tf_common.h\"\n #include \"hwrm_tf.h\"\n \n-static int tf_check_tcam_entry(enum tf_tcam_tbl_type tcam_tbl_type,\n-\t\t\t       enum tf_device_type device,\n-\t\t\t       uint16_t key_sz_in_bits,\n-\t\t\t       uint16_t *num_slice_per_row)\n-{\n-\tuint16_t key_bytes;\n-\tuint16_t slice_sz = 0;\n-\n-#define CFA_P4_WC_TCAM_SLICES_PER_ROW 2\n-#define CFA_P4_WC_TCAM_SLICE_SIZE     12\n-\n-\tif (tcam_tbl_type == TF_TCAM_TBL_TYPE_WC_TCAM) {\n-\t\tkey_bytes = TF_BITS2BYTES_WORD_ALIGN(key_sz_in_bits);\n-\t\tif (device == TF_DEVICE_TYPE_WH) {\n-\t\t\tslice_sz = CFA_P4_WC_TCAM_SLICE_SIZE;\n-\t\t\t*num_slice_per_row = CFA_P4_WC_TCAM_SLICES_PER_ROW;\n-\t\t} else {\n-\t\t\tTFP_DRV_LOG(ERR,\n-\t\t\t\t    \"Unsupported device type %d\\n\",\n-\t\t\t\t    device);\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\n-\t\tif (key_bytes > *num_slice_per_row * slice_sz) {\n-\t\t\tTFP_DRV_LOG(ERR,\n-\t\t\t\t    \"%s: Key size %d is not supported\\n\",\n-\t\t\t\t    tf_tcam_tbl_2_str(tcam_tbl_type),\n-\t\t\t\t    key_bytes);\n-\t\t\treturn -ENOTSUP;\n-\t\t}\n-\t} else { /* for other type of tcam */\n-\t\t*num_slice_per_row = 1;\n-\t}\n-\n-\treturn 0;\n-}\n-\n /**\n  * Create EM Tbl pool of memory indexes.\n  *\n@@ -918,49 +881,56 @@ tf_alloc_tcam_entry(struct tf *tfp,\n \t\t    struct tf_alloc_tcam_entry_parms *parms)\n {\n \tint rc;\n-\tint index;\n \tstruct tf_session *tfs;\n-\tstruct bitalloc *session_pool;\n-\tuint16_t num_slice_per_row;\n-\n-\t/* TEMP, due to device design. When tcam is modularized device\n-\t * should be retrieved from the session\n-\t */\n-\tenum tf_device_type device_type;\n-\t/* TEMP */\n-\tdevice_type = TF_DEVICE_TYPE_WH;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_tcam_alloc_parms aparms = { 0 };\n \n-\tTF_CHECK_PARMS_SESSION(tfp, parms);\n+\tTF_CHECK_PARMS2(tfp, parms);\n \n-\ttfs = (struct tf_session *)(tfp->session->core_data);\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup session, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n+\t}\n \n-\trc = tf_check_tcam_entry(parms->tcam_tbl_type,\n-\t\t\t\t device_type,\n-\t\t\t\t parms->key_sz_in_bits,\n-\t\t\t\t &num_slice_per_row);\n-\t/* Error logging handled by tf_check_tcam_entry */\n-\tif (rc)\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup device, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\trc = tf_rm_lookup_tcam_type_pool(tfs,\n-\t\t\t\t\t parms->dir,\n-\t\t\t\t\t parms->tcam_tbl_type,\n-\t\t\t\t\t &session_pool);\n-\t/* Error logging handled by tf_rm_lookup_tcam_type_pool */\n-\tif (rc)\n+\tif (dev->ops->tf_dev_alloc_tcam == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\tindex = ba_alloc(session_pool);\n-\tif (index == BA_FAIL) {\n-\t\tTFP_DRV_LOG(ERR, \"%s: %s: No resource available\\n\",\n+\taparms.dir = parms->dir;\n+\taparms.type = parms->tcam_tbl_type;\n+\taparms.key_size = TF_BITS2BYTES_WORD_ALIGN(parms->key_sz_in_bits);\n+\taparms.priority = parms->priority;\n+\trc = dev->ops->tf_dev_alloc_tcam(tfp, &aparms);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: TCAM allocation failed, rc:%s\\n\",\n \t\t\t    tf_dir_2_str(parms->dir),\n-\t\t\t    tf_tcam_tbl_2_str(parms->tcam_tbl_type));\n-\t\treturn -ENOMEM;\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n \t}\n \n-\tindex *= num_slice_per_row;\n+\tparms->idx = aparms.idx;\n \n-\tparms->idx = index;\n \treturn 0;\n }\n \n@@ -969,55 +939,60 @@ tf_set_tcam_entry(struct tf *tfp,\n \t\t  struct tf_set_tcam_entry_parms *parms)\n {\n \tint rc;\n-\tint id;\n-\tint index;\n \tstruct tf_session *tfs;\n-\tstruct bitalloc *session_pool;\n-\tuint16_t num_slice_per_row;\n-\n-\t/* TEMP, due to device design. When tcam is modularized device\n-\t * should be retrieved from the session\n-\t */\n-\tenum tf_device_type device_type;\n-\t/* TEMP */\n-\tdevice_type = TF_DEVICE_TYPE_WH;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_tcam_set_parms sparms = { 0 };\n \n-\tTF_CHECK_PARMS_SESSION(tfp, parms);\n+\tTF_CHECK_PARMS2(tfp, parms);\n \n-\ttfs = (struct tf_session *)(tfp->session->core_data);\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup session, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n+\t}\n \n-\trc = tf_check_tcam_entry(parms->tcam_tbl_type,\n-\t\t\t\t device_type,\n-\t\t\t\t parms->key_sz_in_bits,\n-\t\t\t\t &num_slice_per_row);\n-\t/* Error logging handled by tf_check_tcam_entry */\n-\tif (rc)\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup device, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\trc = tf_rm_lookup_tcam_type_pool(tfs,\n-\t\t\t\t\t parms->dir,\n-\t\t\t\t\t parms->tcam_tbl_type,\n-\t\t\t\t\t &session_pool);\n-\t/* Error logging handled by tf_rm_lookup_tcam_type_pool */\n-\tif (rc)\n+\tif (dev->ops->tf_dev_set_tcam == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\t/* Verify that the entry has been previously allocated */\n-\tindex = parms->idx / num_slice_per_row;\n+\tsparms.dir = parms->dir;\n+\tsparms.type = parms->tcam_tbl_type;\n+\tsparms.idx = parms->idx;\n+\tsparms.key = parms->key;\n+\tsparms.mask = parms->mask;\n+\tsparms.key_size = TF_BITS2BYTES_WORD_ALIGN(parms->key_sz_in_bits);\n+\tsparms.result = parms->result;\n+\tsparms.result_size = TF_BITS2BYTES_WORD_ALIGN(parms->result_sz_in_bits);\n \n-\tid = ba_inuse(session_pool, index);\n-\tif (id != 1) {\n+\trc = dev->ops->tf_dev_set_tcam(tfp, &sparms);\n+\tif (rc) {\n \t\tTFP_DRV_LOG(ERR,\n-\t\t   \"%s: %s: Invalid or not allocated index, idx:%d\\n\",\n-\t\t   tf_dir_2_str(parms->dir),\n-\t\t   tf_tcam_tbl_2_str(parms->tcam_tbl_type),\n-\t\t   parms->idx);\n-\t\treturn -EINVAL;\n+\t\t\t    \"%s: TCAM set failed, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n \t}\n \n-\trc = tf_msg_tcam_entry_set(tfp, parms);\n-\n-\treturn rc;\n+\treturn 0;\n }\n \n int\n@@ -1033,59 +1008,52 @@ tf_free_tcam_entry(struct tf *tfp,\n \t\t   struct tf_free_tcam_entry_parms *parms)\n {\n \tint rc;\n-\tint index;\n \tstruct tf_session *tfs;\n-\tstruct bitalloc *session_pool;\n-\tuint16_t num_slice_per_row = 1;\n-\n-\t/* TEMP, due to device design. When tcam is modularized device\n-\t * should be retrieved from the session\n-\t */\n-\tenum tf_device_type device_type;\n-\t/* TEMP */\n-\tdevice_type = TF_DEVICE_TYPE_WH;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_tcam_free_parms fparms = { 0 };\n \n-\tTF_CHECK_PARMS_SESSION(tfp, parms);\n-\ttfs = (struct tf_session *)(tfp->session->core_data);\n+\tTF_CHECK_PARMS2(tfp, parms);\n \n-\trc = tf_check_tcam_entry(parms->tcam_tbl_type,\n-\t\t\t\t device_type,\n-\t\t\t\t 0,\n-\t\t\t\t &num_slice_per_row);\n-\t/* Error logging handled by tf_check_tcam_entry */\n-\tif (rc)\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup session, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\trc = tf_rm_lookup_tcam_type_pool(tfs,\n-\t\t\t\t\t parms->dir,\n-\t\t\t\t\t parms->tcam_tbl_type,\n-\t\t\t\t\t &session_pool);\n-\t/* Error logging handled by tf_rm_lookup_tcam_type_pool */\n-\tif (rc)\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed to lookup device, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n \t\treturn rc;\n+\t}\n \n-\tindex = parms->idx / num_slice_per_row;\n-\n-\trc = ba_inuse(session_pool, index);\n-\tif (rc == BA_FAIL || rc == BA_ENTRY_FREE) {\n-\t\tTFP_DRV_LOG(ERR, \"%s: %s: Entry %d already free\",\n+\tif (dev->ops->tf_dev_free_tcam == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n \t\t\t    tf_dir_2_str(parms->dir),\n-\t\t\t    tf_tcam_tbl_2_str(parms->tcam_tbl_type),\n-\t\t\t    index);\n-\t\treturn -EINVAL;\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n \t}\n \n-\tba_free(session_pool, index);\n-\n-\trc = tf_msg_tcam_entry_free(tfp, parms);\n+\tfparms.dir = parms->dir;\n+\tfparms.type = parms->tcam_tbl_type;\n+\tfparms.idx = parms->idx;\n+\trc = dev->ops->tf_dev_free_tcam(tfp, &fparms);\n \tif (rc) {\n-\t\t/* Log error */\n-\t\tTFP_DRV_LOG(ERR, \"%s: %s: Entry %d free failed with err %s\",\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: TCAM allocation failed, rc:%s\\n\",\n \t\t\t    tf_dir_2_str(parms->dir),\n-\t\t\t    tf_tcam_tbl_2_str(parms->tcam_tbl_type),\n-\t\t\t    parms->idx,\n \t\t\t    strerror(-rc));\n+\t\treturn rc;\n \t}\n \n-\treturn rc;\n+\treturn 0;\n }\ndiff --git a/drivers/net/bnxt/tf_core/tf_device.h b/drivers/net/bnxt/tf_core/tf_device.h\nindex 1501b20d9..32d9a5442 100644\n--- a/drivers/net/bnxt/tf_core/tf_device.h\n+++ b/drivers/net/bnxt/tf_core/tf_device.h\n@@ -116,8 +116,11 @@ struct tf_dev_ops {\n \t * [in] tfp\n \t *   Pointer to TF handle\n \t *\n-\t * [out] slice_size\n-\t *   Pointer to slice size the device supports\n+\t * [in] type\n+\t *   TCAM table type\n+\t *\n+\t * [in] key_sz\n+\t *   Key size\n \t *\n \t * [out] num_slices_per_row\n \t *   Pointer to number of slices per row the device supports\n@@ -126,9 +129,10 @@ struct tf_dev_ops {\n \t *   - (0) if successful.\n \t *   - (-EINVAL) on failure.\n \t */\n-\tint (*tf_dev_get_wc_tcam_slices)(struct tf *tfp,\n-\t\t\t\t\t uint16_t *slice_size,\n-\t\t\t\t\t uint16_t *num_slices_per_row);\n+\tint (*tf_dev_get_tcam_slice_info)(struct tf *tfp,\n+\t\t\t\t\t  enum tf_tcam_tbl_type type,\n+\t\t\t\t\t  uint16_t key_sz,\n+\t\t\t\t\t  uint16_t *num_slices_per_row);\n \n \t/**\n \t * Allocation of an identifier element.\ndiff --git a/drivers/net/bnxt/tf_core/tf_device_p4.c b/drivers/net/bnxt/tf_core/tf_device_p4.c\nindex f4bd95f1c..77fb693dd 100644\n--- a/drivers/net/bnxt/tf_core/tf_device_p4.c\n+++ b/drivers/net/bnxt/tf_core/tf_device_p4.c\n@@ -56,18 +56,21 @@ tf_dev_p4_get_max_types(struct tf *tfp __rte_unused,\n  *   - (-EINVAL) on failure.\n  */\n static int\n-tf_dev_p4_get_wc_tcam_slices(struct tf *tfp __rte_unused,\n-\t\t\t     uint16_t *slice_size,\n-\t\t\t     uint16_t *num_slices_per_row)\n+tf_dev_p4_get_tcam_slice_info(struct tf *tfp __rte_unused,\n+\t\t\t      enum tf_tcam_tbl_type type,\n+\t\t\t      uint16_t key_sz,\n+\t\t\t      uint16_t *num_slices_per_row)\n {\n-#define CFA_P4_WC_TCAM_SLICE_SIZE       12\n-#define CFA_P4_WC_TCAM_SLICES_PER_ROW    2\n+#define CFA_P4_WC_TCAM_SLICES_PER_ROW 2\n+#define CFA_P4_WC_TCAM_SLICE_SIZE     12\n \n-\tif (slice_size == NULL || num_slices_per_row == NULL)\n-\t\treturn -EINVAL;\n-\n-\t*slice_size = CFA_P4_WC_TCAM_SLICE_SIZE;\n-\t*num_slices_per_row = CFA_P4_WC_TCAM_SLICES_PER_ROW;\n+\tif (type == TF_TCAM_TBL_TYPE_WC_TCAM) {\n+\t\t*num_slices_per_row = CFA_P4_WC_TCAM_SLICES_PER_ROW;\n+\t\tif (key_sz > *num_slices_per_row * CFA_P4_WC_TCAM_SLICE_SIZE)\n+\t\t\treturn -ENOTSUP;\n+\t} else { /* for other type of tcam */\n+\t\t*num_slices_per_row = 1;\n+\t}\n \n \treturn 0;\n }\n@@ -77,7 +80,7 @@ tf_dev_p4_get_wc_tcam_slices(struct tf *tfp __rte_unused,\n  */\n const struct tf_dev_ops tf_dev_ops_p4 = {\n \t.tf_dev_get_max_types = tf_dev_p4_get_max_types,\n-\t.tf_dev_get_wc_tcam_slices = tf_dev_p4_get_wc_tcam_slices,\n+\t.tf_dev_get_tcam_slice_info = tf_dev_p4_get_tcam_slice_info,\n \t.tf_dev_alloc_ident = tf_ident_alloc,\n \t.tf_dev_free_ident = tf_ident_free,\n \t.tf_dev_alloc_tbl = tf_tbl_alloc,\ndiff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c\nindex 60274eb35..b50e1d48c 100644\n--- a/drivers/net/bnxt/tf_core/tf_msg.c\n+++ b/drivers/net/bnxt/tf_core/tf_msg.c\n@@ -9,6 +9,7 @@\n #include <string.h>\n \n #include \"tf_msg_common.h\"\n+#include \"tf_device.h\"\n #include \"tf_msg.h\"\n #include \"tf_util.h\"\n #include \"tf_session.h\"\n@@ -1480,27 +1481,19 @@ tf_msg_bulk_get_tbl_entry(struct tf *tfp,\n \treturn tfp_le_to_cpu_32(parms.tf_resp_code);\n }\n \n-#define TF_BYTES_PER_SLICE(tfp) 12\n-#define NUM_SLICES(tfp, bytes) \\\n-\t(((bytes) + TF_BYTES_PER_SLICE(tfp) - 1) / TF_BYTES_PER_SLICE(tfp))\n-\n int\n tf_msg_tcam_entry_set(struct tf *tfp,\n-\t\t      struct tf_set_tcam_entry_parms *parms)\n+\t\t      struct tf_tcam_set_parms *parms)\n {\n \tint rc;\n \tstruct tfp_send_msg_parms mparms = { 0 };\n \tstruct hwrm_tf_tcam_set_input req = { 0 };\n \tstruct hwrm_tf_tcam_set_output resp = { 0 };\n-\tuint16_t key_bytes =\n-\t\tTF_BITS2BYTES_WORD_ALIGN(parms->key_sz_in_bits);\n-\tuint16_t result_bytes =\n-\t\tTF_BITS2BYTES_WORD_ALIGN(parms->result_sz_in_bits);\n \tstruct tf_msg_dma_buf buf = { 0 };\n \tuint8_t *data = NULL;\n \tint data_size = 0;\n \n-\trc = tf_tcam_tbl_2_hwrm(parms->tcam_tbl_type, &req.type);\n+\trc = tf_tcam_tbl_2_hwrm(parms->type, &req.type);\n \tif (rc != 0)\n \t\treturn rc;\n \n@@ -1508,11 +1501,11 @@ tf_msg_tcam_entry_set(struct tf *tfp,\n \tif (parms->dir == TF_DIR_TX)\n \t\treq.flags |= HWRM_TF_TCAM_SET_INPUT_FLAGS_DIR_TX;\n \n-\treq.key_size = key_bytes;\n-\treq.mask_offset = key_bytes;\n+\treq.key_size = parms->key_size;\n+\treq.mask_offset = parms->key_size;\n \t/* Result follows after key and mask, thus multiply by 2 */\n-\treq.result_offset = 2 * key_bytes;\n-\treq.result_size = result_bytes;\n+\treq.result_offset = 2 * parms->key_size;\n+\treq.result_size = parms->result_size;\n \tdata_size = 2 * req.key_size + req.result_size;\n \n \tif (data_size <= TF_PCI_BUF_SIZE_MAX) {\n@@ -1530,9 +1523,9 @@ tf_msg_tcam_entry_set(struct tf *tfp,\n \t\t\t   sizeof(buf.pa_addr));\n \t}\n \n-\ttfp_memcpy(&data[0], parms->key, key_bytes);\n-\ttfp_memcpy(&data[key_bytes], parms->mask, key_bytes);\n-\ttfp_memcpy(&data[req.result_offset], parms->result, result_bytes);\n+\ttfp_memcpy(&data[0], parms->key, parms->key_size);\n+\ttfp_memcpy(&data[parms->key_size], parms->mask, parms->key_size);\n+\ttfp_memcpy(&data[req.result_offset], parms->result, parms->result_size);\n \n \tmparms.tf_type = HWRM_TF_TCAM_SET;\n \tmparms.req_data = (uint32_t *)&req;\n@@ -1554,7 +1547,7 @@ tf_msg_tcam_entry_set(struct tf *tfp,\n \n int\n tf_msg_tcam_entry_free(struct tf *tfp,\n-\t\t       struct tf_free_tcam_entry_parms *in_parms)\n+\t\t       struct tf_tcam_free_parms *in_parms)\n {\n \tint rc;\n \tstruct hwrm_tf_tcam_free_input req =  { 0 };\n@@ -1562,7 +1555,7 @@ tf_msg_tcam_entry_free(struct tf *tfp,\n \tstruct tfp_send_msg_parms parms = { 0 };\n \n \t/* Populate the request */\n-\trc = tf_tcam_tbl_2_hwrm(in_parms->tcam_tbl_type, &req.type);\n+\trc = tf_tcam_tbl_2_hwrm(in_parms->type, &req.type);\n \tif (rc != 0)\n \t\treturn rc;\n \ndiff --git a/drivers/net/bnxt/tf_core/tf_msg.h b/drivers/net/bnxt/tf_core/tf_msg.h\nindex 1dad2b9fb..a3e0f7bba 100644\n--- a/drivers/net/bnxt/tf_core/tf_msg.h\n+++ b/drivers/net/bnxt/tf_core/tf_msg.h\n@@ -247,7 +247,7 @@ int tf_msg_em_op(struct tf *tfp,\n  *  0 on Success else internal Truflow error\n  */\n int tf_msg_tcam_entry_set(struct tf *tfp,\n-\t\t\t  struct tf_set_tcam_entry_parms *parms);\n+\t\t\t  struct tf_tcam_set_parms *parms);\n \n /**\n  * Sends tcam entry 'free' to the Firmware.\n@@ -262,7 +262,7 @@ int tf_msg_tcam_entry_set(struct tf *tfp,\n  *  0 on Success else internal Truflow error\n  */\n int tf_msg_tcam_entry_free(struct tf *tfp,\n-\t\t\t   struct tf_free_tcam_entry_parms *parms);\n+\t\t\t   struct tf_tcam_free_parms *parms);\n \n /**\n  * Sends Set message of a Table Type element to the firmware.\ndiff --git a/drivers/net/bnxt/tf_core/tf_tcam.c b/drivers/net/bnxt/tf_core/tf_tcam.c\nindex 3ad99dd0d..b9dba5323 100644\n--- a/drivers/net/bnxt/tf_core/tf_tcam.c\n+++ b/drivers/net/bnxt/tf_core/tf_tcam.c\n@@ -3,16 +3,24 @@\n  * All rights reserved.\n  */\n \n+#include <string.h>\n #include <rte_common.h>\n \n #include \"tf_tcam.h\"\n+#include \"tf_common.h\"\n+#include \"tf_util.h\"\n+#include \"tf_rm_new.h\"\n+#include \"tf_device.h\"\n+#include \"tfp.h\"\n+#include \"tf_session.h\"\n+#include \"tf_msg.h\"\n \n struct tf;\n \n /**\n  * TCAM DBs.\n  */\n-/* static void *tcam_db[TF_DIR_MAX]; */\n+static void *tcam_db[TF_DIR_MAX];\n \n /**\n  * TCAM Shadow DBs\n@@ -22,7 +30,7 @@ struct tf;\n /**\n  * Init flag, set on bind and cleared on unbind\n  */\n-/* static uint8_t init; */\n+static uint8_t init;\n \n /**\n  * Shadow init flag, set on bind and cleared on unbind\n@@ -33,19 +41,131 @@ int\n tf_tcam_bind(struct tf *tfp __rte_unused,\n \t     struct tf_tcam_cfg_parms *parms __rte_unused)\n {\n+\tint rc;\n+\tint i;\n+\tstruct tf_rm_create_db_parms db_cfg = { 0 };\n+\n+\tTF_CHECK_PARMS2(tfp, parms);\n+\n+\tif (init) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"TCAM already initialized\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tdb_cfg.num_elements = parms->num_elements;\n+\n+\tfor (i = 0; i < TF_DIR_MAX; i++) {\n+\t\tdb_cfg.dir = i;\n+\t\tdb_cfg.num_elements = parms->num_elements;\n+\t\tdb_cfg.cfg = parms->cfg;\n+\t\tdb_cfg.alloc_num = parms->resources->tcam_tbl_cnt[i];\n+\t\tdb_cfg.rm_db = tcam_db[i];\n+\t\trc = tf_rm_create_db(tfp, &db_cfg);\n+\t\tif (rc) {\n+\t\t\tTFP_DRV_LOG(ERR,\n+\t\t\t\t    \"%s: TCAM DB creation failed\\n\",\n+\t\t\t\t    tf_dir_2_str(i));\n+\t\t\treturn rc;\n+\t\t}\n+\t}\n+\n+\tinit = 1;\n+\n \treturn 0;\n }\n \n int\n tf_tcam_unbind(struct tf *tfp __rte_unused)\n {\n+\tint rc;\n+\tint i;\n+\tstruct tf_rm_free_db_parms fparms = { 0 };\n+\n+\tTF_CHECK_PARMS1(tfp);\n+\n+\t/* Bail if nothing has been initialized done silent as to\n+\t * allow for creation cleanup.\n+\t */\n+\tif (!init)\n+\t\treturn -EINVAL;\n+\n+\tfor (i = 0; i < TF_DIR_MAX; i++) {\n+\t\tfparms.dir = i;\n+\t\tfparms.rm_db = tcam_db[i];\n+\t\trc = tf_rm_free_db(tfp, &fparms);\n+\t\tif (rc)\n+\t\t\treturn rc;\n+\n+\t\ttcam_db[i] = NULL;\n+\t}\n+\n+\tinit = 0;\n+\n \treturn 0;\n }\n \n int\n-tf_tcam_alloc(struct tf *tfp __rte_unused,\n-\t      struct tf_tcam_alloc_parms *parms __rte_unused)\n+tf_tcam_alloc(struct tf *tfp,\n+\t      struct tf_tcam_alloc_parms *parms)\n {\n+\tint rc;\n+\tstruct tf_session *tfs;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_rm_allocate_parms aparms = { 0 };\n+\tuint16_t num_slice_per_row = 1;\n+\n+\tTF_CHECK_PARMS2(tfp, parms);\n+\n+\tif (!init) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: No TCAM DBs created\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir));\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tif (dev->ops->tf_dev_get_tcam_slice_info == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n+\t}\n+\n+\t/* Need to retrieve row size etc */\n+\trc = dev->ops->tf_dev_get_tcam_slice_info(tfp,\n+\t\t\t\t\t\t  parms->type,\n+\t\t\t\t\t\t  parms->key_size,\n+\t\t\t\t\t\t  &num_slice_per_row);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Allocate requested element */\n+\taparms.rm_db = tcam_db[parms->dir];\n+\taparms.db_index = parms->type;\n+\taparms.index = (uint32_t *)&parms->idx;\n+\trc = tf_rm_allocate(&aparms);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Failed tcam, type:%d\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    parms->type);\n+\t\treturn rc;\n+\t}\n+\n+\tparms->idx *= num_slice_per_row;\n+\n \treturn 0;\n }\n \n@@ -53,6 +173,92 @@ int\n tf_tcam_free(struct tf *tfp __rte_unused,\n \t     struct tf_tcam_free_parms *parms __rte_unused)\n {\n+\tint rc;\n+\tstruct tf_session *tfs;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_rm_is_allocated_parms aparms = { 0 };\n+\tstruct tf_rm_free_parms fparms = { 0 };\n+\tuint16_t num_slice_per_row = 1;\n+\tint allocated = 0;\n+\n+\tTF_CHECK_PARMS2(tfp, parms);\n+\n+\tif (!init) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: No TCAM DBs created\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir));\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tif (dev->ops->tf_dev_get_tcam_slice_info == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n+\t}\n+\n+\t/* Need to retrieve row size etc */\n+\trc = dev->ops->tf_dev_get_tcam_slice_info(tfp,\n+\t\t\t\t\t\t  parms->type,\n+\t\t\t\t\t\t  0,\n+\t\t\t\t\t\t  &num_slice_per_row);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Check if element is in use */\n+\taparms.rm_db = tcam_db[parms->dir];\n+\taparms.db_index = parms->type;\n+\taparms.index = parms->idx / num_slice_per_row;\n+\taparms.allocated = &allocated;\n+\trc = tf_rm_is_allocated(&aparms);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tif (!allocated) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Entry already free, type:%d, index:%d\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    parms->type,\n+\t\t\t    parms->idx);\n+\t\treturn rc;\n+\t}\n+\n+\t/* Free requested element */\n+\tfparms.rm_db = tcam_db[parms->dir];\n+\tfparms.db_index = parms->type;\n+\tfparms.index = parms->idx / num_slice_per_row;\n+\trc = tf_rm_free(&fparms);\n+\tif (rc) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Free failed, type:%d, index:%d\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    parms->type,\n+\t\t\t    parms->idx);\n+\t\treturn rc;\n+\t}\n+\n+\trc = tf_msg_tcam_entry_free(tfp, parms);\n+\tif (rc) {\n+\t\t/* Log error */\n+\t\tTFP_DRV_LOG(ERR, \"%s: %s: Entry %d free failed with err %s\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    tf_tcam_tbl_2_str(parms->type),\n+\t\t\t    parms->idx,\n+\t\t\t    strerror(-rc));\n+\t}\n+\n \treturn 0;\n }\n \n@@ -67,6 +273,77 @@ int\n tf_tcam_set(struct tf *tfp __rte_unused,\n \t    struct tf_tcam_set_parms *parms __rte_unused)\n {\n+\tint rc;\n+\tstruct tf_session *tfs;\n+\tstruct tf_dev_info *dev;\n+\tstruct tf_rm_is_allocated_parms aparms = { 0 };\n+\tuint16_t num_slice_per_row = 1;\n+\tint allocated = 0;\n+\n+\tTF_CHECK_PARMS2(tfp, parms);\n+\n+\tif (!init) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: No TCAM DBs created\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir));\n+\t\treturn -EINVAL;\n+\t}\n+\n+\t/* Retrieve the session information */\n+\trc = tf_session_get_session(tfp, &tfs);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Retrieve the device information */\n+\trc = tf_session_get_device(tfs, &dev);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tif (dev->ops->tf_dev_get_tcam_slice_info == NULL) {\n+\t\trc = -EOPNOTSUPP;\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Operation not supported, rc:%s\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    strerror(-rc));\n+\t\treturn rc;\n+\t}\n+\n+\t/* Need to retrieve row size etc */\n+\trc = dev->ops->tf_dev_get_tcam_slice_info(tfp,\n+\t\t\t\t\t\t  parms->type,\n+\t\t\t\t\t\t  parms->key_size,\n+\t\t\t\t\t\t  &num_slice_per_row);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Check if element is in use */\n+\taparms.rm_db = tcam_db[parms->dir];\n+\taparms.db_index = parms->type;\n+\taparms.index = parms->idx / num_slice_per_row;\n+\taparms.allocated = &allocated;\n+\trc = tf_rm_is_allocated(&aparms);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\tif (!allocated) {\n+\t\tTFP_DRV_LOG(ERR,\n+\t\t\t    \"%s: Entry is not allocated, type:%d, index:%d\\n\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    parms->type,\n+\t\t\t    parms->idx);\n+\t\treturn rc;\n+\t}\n+\n+\trc = tf_msg_tcam_entry_set(tfp, parms);\n+\tif (rc) {\n+\t\t/* Log error */\n+\t\tTFP_DRV_LOG(ERR, \"%s: %s: Entry %d free failed with err %s\",\n+\t\t\t    tf_dir_2_str(parms->dir),\n+\t\t\t    tf_tcam_tbl_2_str(parms->type),\n+\t\t\t    parms->idx,\n+\t\t\t    strerror(-rc));\n+\t}\n+\n \treturn 0;\n }\n \ndiff --git a/drivers/net/bnxt/tf_core/tf_tcam.h b/drivers/net/bnxt/tf_core/tf_tcam.h\nindex 68c25eb1b..67c3bcb49 100644\n--- a/drivers/net/bnxt/tf_core/tf_tcam.h\n+++ b/drivers/net/bnxt/tf_core/tf_tcam.h\n@@ -50,10 +50,18 @@ struct tf_tcam_alloc_parms {\n \t * [in] Type of the allocation\n \t */\n \tenum tf_tcam_tbl_type type;\n+\t/**\n+\t * [in] key size\n+\t */\n+\tuint16_t key_size;\n+\t/**\n+\t * [in] Priority of entry requested (definition TBD)\n+\t */\n+\tuint32_t priority;\n \t/**\n \t * [out] Idx of allocated entry or found entry (if search_enable)\n \t */\n-\tuint32_t idx;\n+\tuint16_t idx;\n };\n \n /**\n@@ -71,7 +79,7 @@ struct tf_tcam_free_parms {\n \t/**\n \t * [in] Index to free\n \t */\n-\tuint32_t idx;\n+\tuint16_t idx;\n \t/**\n \t * [out] Reference count after free, only valid if session has been\n \t * created with shadow_copy.\n@@ -90,7 +98,7 @@ struct tf_tcam_alloc_search_parms {\n \t/**\n \t * [in] TCAM table type\n \t */\n-\tenum tf_tcam_tbl_type tcam_tbl_type;\n+\tenum tf_tcam_tbl_type type;\n \t/**\n \t * [in] Enable search for matching entry\n \t */\n@@ -100,9 +108,9 @@ struct tf_tcam_alloc_search_parms {\n \t */\n \tuint8_t *key;\n \t/**\n-\t * [in] key size in bits (if search)\n+\t * [in] key size (if search)\n \t */\n-\tuint16_t key_sz_in_bits;\n+\tuint16_t key_size;\n \t/**\n \t * [in] Mask data to match on (if search)\n \t */\n@@ -139,17 +147,29 @@ struct tf_tcam_set_parms {\n \t */\n \tenum tf_tcam_tbl_type type;\n \t/**\n-\t * [in] Entry data\n+\t * [in] Entry index to write to\n \t */\n-\tuint8_t *data;\n+\tuint32_t idx;\n \t/**\n-\t * [in] Entry size\n+\t * [in] array containing key\n \t */\n-\tuint16_t data_sz_in_bytes;\n+\tuint8_t *key;\n \t/**\n-\t * [in] Entry index to write to\n+\t * [in] array containing mask fields\n \t */\n-\tuint32_t idx;\n+\tuint8_t *mask;\n+\t/**\n+\t * [in] key size\n+\t */\n+\tuint16_t key_size;\n+\t/**\n+\t * [in] array containing result\n+\t */\n+\tuint8_t *result;\n+\t/**\n+\t * [in] result size\n+\t */\n+\tuint16_t result_size;\n };\n \n /**\n@@ -165,17 +185,29 @@ struct tf_tcam_get_parms {\n \t */\n \tenum tf_tcam_tbl_type type;\n \t/**\n-\t * [out] Entry data\n+\t * [in] Entry index to read\n \t */\n-\tuint8_t *data;\n+\tuint32_t idx;\n \t/**\n-\t * [out] Entry size\n+\t * [out] array containing key\n \t */\n-\tuint16_t data_sz_in_bytes;\n+\tuint8_t *key;\n \t/**\n-\t * [in] Entry index to read\n+\t * [out] array containing mask fields\n \t */\n-\tuint32_t idx;\n+\tuint8_t *mask;\n+\t/**\n+\t * [out] key size\n+\t */\n+\tuint16_t key_size;\n+\t/**\n+\t * [out] array containing result\n+\t */\n+\tuint8_t *result;\n+\t/**\n+\t * [out] result size\n+\t */\n+\tuint16_t result_size;\n };\n \n /**\n",
    "prefixes": [
        "v5",
        "17/51"
    ]
}