get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68497,
    "url": "https://patches.dpdk.org/api/patches/68497/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1586938751-32808-12-git-send-email-venkatkumar.duvvuru@broadcom.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<1586938751-32808-12-git-send-email-venkatkumar.duvvuru@broadcom.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1586938751-32808-12-git-send-email-venkatkumar.duvvuru@broadcom.com",
    "date": "2020-04-15T08:18:48",
    "name": "[v4,11/34] net/bnxt: add tf core table scope support",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "4fb5a23be45da8d1afb69d00d93ba6605ffc6b40",
    "submitter": {
        "id": 1635,
        "url": "https://patches.dpdk.org/api/people/1635/?format=api",
        "name": "Venkat Duvvuru",
        "email": "venkatkumar.duvvuru@broadcom.com"
    },
    "delegate": {
        "id": 1766,
        "url": "https://patches.dpdk.org/api/users/1766/?format=api",
        "username": "ajitkhaparde",
        "first_name": "Ajit",
        "last_name": "Khaparde",
        "email": "ajit.khaparde@broadcom.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1586938751-32808-12-git-send-email-venkatkumar.duvvuru@broadcom.com/mbox/",
    "series": [
        {
            "id": 9386,
            "url": "https://patches.dpdk.org/api/series/9386/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9386",
            "date": "2020-04-15T08:18:37",
            "name": "add support for host based flow table management",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/9386/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/68497/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/68497/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 DCCE3A0563;\n\tWed, 15 Apr 2020 10:22:15 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id B11331D56F;\n\tWed, 15 Apr 2020 10:19:55 +0200 (CEST)",
            "from mail-pj1-f66.google.com (mail-pj1-f66.google.com\n [209.85.216.66]) by dpdk.org (Postfix) with ESMTP id 521D31D589\n for <dev@dpdk.org>; Wed, 15 Apr 2020 10:19:53 +0200 (CEST)",
            "by mail-pj1-f66.google.com with SMTP id e16so6163170pjp.1\n for <dev@dpdk.org>; Wed, 15 Apr 2020 01:19:53 -0700 (PDT)",
            "from S60.dhcp.broadcom.net ([192.19.234.250])\n by smtp.gmail.com with ESMTPSA id fy21sm3819019pjb.25.2020.04.15.01.19.49\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Wed, 15 Apr 2020 01:19:51 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com;\n s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=9FcZ6Zz7rTR9MdGtPIu5qAdiCKYEd3/5mxzH5mDfZBY=;\n b=G6OYUJG9Hy7Ue6YCcdSrRZCpBkgAYs3MxJuEfm2/WFMJ2CJUW4YYTQO88EzKpozOF2\n Xzmv+Mz7dQhKa4Aoov9xrRoQnuAkZbjy/lq6CptToUcDJcTuONKpSSMWUf3eielr0zDv\n jSskKC6XmjlFeHRf7OTmfKT/X3Bf4JUDdwMy0=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=9FcZ6Zz7rTR9MdGtPIu5qAdiCKYEd3/5mxzH5mDfZBY=;\n b=ahDxSjiVZtgmN7p01CTJEiCn619WwBrvZTt2Kre3wW/DUyinK+AwktxPJN5GEmrSnN\n bk1b1iRd8/RXSd868gg1iSmVY/Pi16YrlOERSDJhSEzJ9p87OjxelFn8YPcM5VoMA1A8\n GQ1iyR1NhCHnC6Ya55lbUqQ3S81v4liYX9n13XueZV2egR796yRLsdbZ/wjuHtug9m0n\n iJNe5e+hvZNakWCU4I+OptzOJFTQz3cXUADCM9PRS91d2SDxMf89rdew25/BjMUiWO8F\n A1NxX/mbcgjOVCdOav16qSykPTc5ASOacR9xNKnRQOSbtS9WIuI20ygvCJl6NbXzm8fM\n KH4Q==",
        "X-Gm-Message-State": "AGi0PubNm1Vq3DnJ5rbZ2oQxTyr5h+Gti3HpU6BPrlktCYGJsmQ71+qL\n 3IVct5OdFl32EGiqnZR59+4AJ2q/HD2JjqSOZJDu3oLP6r4M5qDfXri3EhH6WN+E3oOsYn6srIn\n wF6S4lSbOGnp37X5yaCBMdw/9yZcWyPbJ0G0sS+Q5szRVBe/06Q8PzrDLaWkBuvMTkoIp",
        "X-Google-Smtp-Source": "\n APiQypK5IgrGyaINVvaWyPfYZ8vN4FQzUFNrE0sLzRzTplVyoDw2Wi5pBBqG9UavmkKkOuh9rs4ILA==",
        "X-Received": "by 2002:a17:902:b48c:: with SMTP id\n y12mr680825plr.184.1586938791831;\n Wed, 15 Apr 2020 01:19:51 -0700 (PDT)",
        "From": "Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>",
        "To": "dev@dpdk.org",
        "Cc": "Farah Smith <farah.smith@broadcom.com>,\n Michael Wildt <michael.wildt@broadcom.com>",
        "Date": "Wed, 15 Apr 2020 13:48:48 +0530",
        "Message-Id": "\n <1586938751-32808-12-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "\n <1586938751-32808-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "References": "\n <1586852011-37536-1-git-send-email-venkatkumar.duvvuru@broadcom.com>\n <1586938751-32808-1-git-send-email-venkatkumar.duvvuru@broadcom.com>",
        "Subject": "[dpdk-dev] [PATCH v4 11/34] net/bnxt: add tf core table scope\n\tsupport",
        "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 TruFlow Table public API\n- Added Table Scope capability including Table Type support code for\n  setting and getting Table Types.\n\nSigned-off-by: Farah Smith <farah.smith@broadcom.com>\nSigned-off-by: Michael Wildt <michael.wildt@broadcom.com>\nReviewed-by: Randy Schacher <stuart.schacher@broadcom.com>\nReviewed-by: Ajit Kumar Khaparde <ajit.khaparde@broadcom.com>\n---\n drivers/net/bnxt/Makefile          |   1 +\n drivers/net/bnxt/tf_core/hwrm_tf.h |  21 ++++++\n drivers/net/bnxt/tf_core/tf_core.c |   4 ++\n drivers/net/bnxt/tf_core/tf_core.h | 128 +++++++++++++++++++++++++++++++++++++\n drivers/net/bnxt/tf_core/tf_msg.c  |  81 +++++++++++++++++++++++\n drivers/net/bnxt/tf_core/tf_msg.h  |  63 ++++++++++++++++++\n drivers/net/bnxt/tf_core/tf_tbl.c  |  43 +++++++++++++\n 7 files changed, 341 insertions(+)\n create mode 100644 drivers/net/bnxt/tf_core/tf_tbl.c",
    "diff": "diff --git a/drivers/net/bnxt/Makefile b/drivers/net/bnxt/Makefile\nindex 02f8c3f..6714a6a 100644\n--- a/drivers/net/bnxt/Makefile\n+++ b/drivers/net/bnxt/Makefile\n@@ -52,6 +52,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/bitalloc.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_msg.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/rand.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_rm.c\n+SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tf_tbl.c\n SRCS-$(CONFIG_RTE_LIBRTE_BNXT_PMD) += tf_core/tfp.c\n \n #\ndiff --git a/drivers/net/bnxt/tf_core/hwrm_tf.h b/drivers/net/bnxt/tf_core/hwrm_tf.h\nindex a8a5547..acb9a8b 100644\n--- a/drivers/net/bnxt/tf_core/hwrm_tf.h\n+++ b/drivers/net/bnxt/tf_core/hwrm_tf.h\n@@ -891,6 +891,27 @@ typedef struct tf_session_sram_resc_flush_input {\n } tf_session_sram_resc_flush_input_t, *ptf_session_sram_resc_flush_input_t;\n BUILD_BUG_ON(sizeof(tf_session_sram_resc_flush_input_t) <= TF_MAX_REQ_SIZE);\n \n+/* Input params for table type set */\n+typedef struct tf_tbl_type_set_input {\n+\t/* Session Id */\n+\tuint32_t\t\t\t fw_session_id;\n+\t/* flags */\n+\tuint16_t\t\t\t flags;\n+\t/* When set to 0, indicates the get apply to RX */\n+#define TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_RX\t\t\t(0x0)\n+\t/* When set to 1, indicates the get apply to TX */\n+#define TF_TBL_TYPE_SET_INPUT_FLAGS_DIR_TX\t\t\t(0x1)\n+\t/* Type of the object to set */\n+\tuint32_t\t\t\t type;\n+\t/* Size of the data to set in bytes */\n+\tuint16_t\t\t\t size;\n+\t/* Data to set */\n+\tuint8_t\t\t\t  data[TF_BULK_SEND];\n+\t/* Index to set */\n+\tuint32_t\t\t\t index;\n+} tf_tbl_type_set_input_t, *ptf_tbl_type_set_input_t;\n+BUILD_BUG_ON(sizeof(tf_tbl_type_set_input_t) <= TF_MAX_REQ_SIZE);\n+\n /* Input params for table type get */\n typedef struct tf_tbl_type_get_input {\n \t/* Session Id */\ndiff --git a/drivers/net/bnxt/tf_core/tf_core.c b/drivers/net/bnxt/tf_core/tf_core.c\nindex 39f4a11..f04a9b1 100644\n--- a/drivers/net/bnxt/tf_core/tf_core.c\n+++ b/drivers/net/bnxt/tf_core/tf_core.c\n@@ -7,6 +7,7 @@\n \n #include \"tf_core.h\"\n #include \"tf_session.h\"\n+#include \"tf_tbl.h\"\n #include \"tf_rm.h\"\n #include \"tf_msg.h\"\n #include \"tfp.h\"\n@@ -173,6 +174,9 @@ 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 1431d06..4c90677 100644\n--- a/drivers/net/bnxt/tf_core/tf_core.h\n+++ b/drivers/net/bnxt/tf_core/tf_core.h\n@@ -458,6 +458,134 @@ int tf_free_identifier(struct tf *tfp,\n \t\t       struct tf_free_identifier_parms *parms);\n \n /**\n+ * @page dram_table DRAM Table Scope Interface\n+ *\n+ * @ref tf_alloc_tbl_scope\n+ *\n+ * @ref tf_free_tbl_scope\n+ *\n+ * If we allocate the EEM memory from the core, we need to store it in\n+ * the shared session data structure to make sure it can be freed later.\n+ * (for example if the PF goes away)\n+ *\n+ * Current thought is that memory is allocated within core.\n+ */\n+\n+\n+/** tf_alloc_tbl_scope_parms definition\n+ */\n+struct tf_alloc_tbl_scope_parms {\n+\t/**\n+\t * [in] All Maximum key size required.\n+\t */\n+\tuint16_t rx_max_key_sz_in_bits;\n+\t/**\n+\t * [in] Maximum Action size required (includes inlined items)\n+\t */\n+\tuint16_t rx_max_action_entry_sz_in_bits;\n+\t/**\n+\t * [in] Memory size in Megabytes\n+\t * Total memory size allocated by user to be divided\n+\t * up for actions, hash, counters.  Only inline external actions.\n+\t * Use this variable or the number of flows, do not set both.\n+\t */\n+\tuint32_t rx_mem_size_in_mb;\n+\t/**\n+\t * [in] Number of flows * 1000. If set, rx_mem_size_in_mb must equal 0.\n+\t */\n+\tuint32_t rx_num_flows_in_k;\n+\t/**\n+\t * [in] SR2 only receive table access interface id\n+\t */\n+\tuint32_t rx_tbl_if_id;\n+\t/**\n+\t * [in] All Maximum key size required.\n+\t */\n+\tuint16_t tx_max_key_sz_in_bits;\n+\t/**\n+\t * [in] Maximum Action size required (includes inlined items)\n+\t */\n+\tuint16_t tx_max_action_entry_sz_in_bits;\n+\t/**\n+\t * [in] Memory size in Megabytes\n+\t * Total memory size allocated by user to be divided\n+\t * up for actions, hash, counters.  Only inline external actions.\n+\t */\n+\tuint32_t tx_mem_size_in_mb;\n+\t/**\n+\t * [in] Number of flows * 1000\n+\t */\n+\tuint32_t tx_num_flows_in_k;\n+\t/**\n+\t * [in] SR2 only receive table access interface id\n+\t */\n+\tuint32_t tx_tbl_if_id;\n+\t/**\n+\t * [out] table scope identifier\n+\t */\n+\tuint32_t tbl_scope_id;\n+};\n+\n+struct tf_free_tbl_scope_parms {\n+\t/**\n+\t * [in] table scope identifier\n+\t */\n+\tuint32_t tbl_scope_id;\n+};\n+\n+/**\n+ * allocate a table scope\n+ *\n+ * On SR2 Firmware will allocate a scope ID.  On other devices, the scope\n+ * is a software construct to identify an EEM table.  This function will\n+ * divide the hash memory/buckets and records according to the device\n+ * device constraints based upon calculations using either the number of flows\n+ * requested or the size of memory indicated.  Other parameters passed in\n+ * determine the configuration (maximum key size, maximum external action record\n+ * size.\n+ *\n+ * This API will allocate the table region in\n+ * DRAM, program the PTU page table entries, and program the number of static\n+ * buckets (if SR2) in the RX and TX CFAs.  Buckets are assumed to start at\n+ * 0 in the EM memory for the scope.  Upon successful completion of this API,\n+ * hash tables are fully initialized and ready for entries to be inserted.\n+ *\n+ * A single API is used to allocate a common table scope identifier in both\n+ * receive and transmit CFA. The scope identifier is common due to nature of\n+ * connection tracking sending notifications between RX and TX direction.\n+ *\n+ * The receive and transmit table access identifiers specify which rings will\n+ * be used to initialize table DRAM.  The application must ensure mutual\n+ * exclusivity of ring usage for table scope allocation and any table update\n+ * operations.\n+ *\n+ * The hash table buckets, EM keys, and EM lookup results are stored in the\n+ * memory allocated based on the rx_em_hash_mb/tx_em_hash_mb parameters.  The\n+ * hash table buckets are stored at the beginning of that memory.\n+ *\n+ * NOTES:  No EM internal setup is done here. On chip EM records are managed\n+ * internally by TruFlow core.\n+ *\n+ * Returns success or failure code.\n+ */\n+int tf_alloc_tbl_scope(struct tf *tfp,\n+\t\t       struct tf_alloc_tbl_scope_parms *parms);\n+\n+\n+/**\n+ * free a table scope\n+ *\n+ * Firmware checks that the table scope ID is owned by the TruFlow\n+ * session, verifies that no references to this table scope remains\n+ * (SR2 ILT) or Profile TCAM entries for either CFA (RX/TX) direction,\n+ * then frees the table scope ID.\n+ *\n+ * Returns success or failure code.\n+ */\n+int tf_free_tbl_scope(struct tf *tfp,\n+\t\t      struct tf_free_tbl_scope_parms *parms);\n+\n+/**\n  * TCAM table type\n  */\n enum tf_tcam_tbl_type {\ndiff --git a/drivers/net/bnxt/tf_core/tf_msg.c b/drivers/net/bnxt/tf_core/tf_msg.c\nindex 9d17440..3f3001c 100644\n--- a/drivers/net/bnxt/tf_core/tf_msg.c\n+++ b/drivers/net/bnxt/tf_core/tf_msg.c\n@@ -869,6 +869,87 @@ tf_msg_session_sram_resc_flush(struct tf *tfp,\n \treturn tfp_le_to_cpu_32(parms.tf_resp_code);\n }\n \n+int\n+tf_msg_set_tbl_entry(struct tf *tfp,\n+\t\t     enum tf_dir dir,\n+\t\t     enum tf_tbl_type type,\n+\t\t     uint16_t size,\n+\t\t     uint8_t *data,\n+\t\t     uint32_t index)\n+{\n+\tint rc;\n+\tstruct tfp_send_msg_parms parms = { 0 };\n+\tstruct tf_tbl_type_set_input req = { 0 };\n+\tstruct tf_session *tfs = (struct tf_session *)(tfp->session->core_data);\n+\n+\t/* Populate the request */\n+\treq.fw_session_id =\n+\t\ttfp_cpu_to_le_32(tfs->session_id.internal.fw_session_id);\n+\treq.flags = tfp_cpu_to_le_16(dir);\n+\treq.type = tfp_cpu_to_le_32(type);\n+\treq.size = tfp_cpu_to_le_16(size);\n+\treq.index = tfp_cpu_to_le_32(index);\n+\n+\ttfp_memcpy(&req.data,\n+\t\t   data,\n+\t\t   size);\n+\n+\tMSG_PREP_NO_RESP(parms,\n+\t\t\t TF_KONG_MB,\n+\t\t\t HWRM_TF,\n+\t\t\t HWRM_TFT_TBL_TYPE_SET,\n+\t\t\t req);\n+\n+\trc = tfp_send_msg_tunneled(tfp, &parms);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\treturn tfp_le_to_cpu_32(parms.tf_resp_code);\n+}\n+\n+int\n+tf_msg_get_tbl_entry(struct tf *tfp,\n+\t\t     enum tf_dir dir,\n+\t\t     enum tf_tbl_type type,\n+\t\t     uint16_t size,\n+\t\t     uint8_t *data,\n+\t\t     uint32_t index)\n+{\n+\tint rc;\n+\tstruct tfp_send_msg_parms parms = { 0 };\n+\tstruct tf_tbl_type_get_input req = { 0 };\n+\tstruct tf_tbl_type_get_output resp = { 0 };\n+\tstruct tf_session *tfs = (struct tf_session *)(tfp->session->core_data);\n+\n+\t/* Populate the request */\n+\treq.fw_session_id =\n+\t\ttfp_cpu_to_le_32(tfs->session_id.internal.fw_session_id);\n+\treq.flags = tfp_cpu_to_le_16(dir);\n+\treq.type = tfp_cpu_to_le_32(type);\n+\treq.index = tfp_cpu_to_le_32(index);\n+\n+\tMSG_PREP(parms,\n+\t\t TF_KONG_MB,\n+\t\t HWRM_TF,\n+\t\t HWRM_TFT_TBL_TYPE_GET,\n+\t\t req,\n+\t\t resp);\n+\n+\trc = tfp_send_msg_tunneled(tfp, &parms);\n+\tif (rc)\n+\t\treturn rc;\n+\n+\t/* Verify that we got enough buffer to return the requested data */\n+\tif (resp.size < size)\n+\t\treturn -EINVAL;\n+\n+\ttfp_memcpy(data,\n+\t\t   &resp.data,\n+\t\t   resp.size);\n+\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))\ndiff --git a/drivers/net/bnxt/tf_core/tf_msg.h b/drivers/net/bnxt/tf_core/tf_msg.h\nindex fa74d78..9055b16 100644\n--- a/drivers/net/bnxt/tf_core/tf_msg.h\n+++ b/drivers/net/bnxt/tf_core/tf_msg.h\n@@ -6,6 +6,7 @@\n #ifndef _TF_MSG_H_\n #define _TF_MSG_H_\n \n+#include \"tf_tbl.h\"\n #include \"tf_rm.h\"\n \n struct tf;\n@@ -150,4 +151,66 @@ int tf_msg_tcam_entry_set(struct tf *tfp,\n int tf_msg_tcam_entry_free(struct tf *tfp,\n \t\t\t   struct tf_free_tcam_entry_parms *parms);\n \n+/**\n+ * Sends Set message of a Table Type element to the firmware.\n+ *\n+ * [in] tfp\n+ *   Pointer to session handle\n+ *\n+ * [in] dir\n+ *   Direction location of the element to set\n+ *\n+ * [in] type\n+ *   Type of the object to set\n+ *\n+ * [in] size\n+ *   Size of the data to set\n+ *\n+ * [in] data\n+ *   Data to set\n+ *\n+ * [in] index\n+ *   Index to set\n+ *\n+ * Returns:\n+ *   0 - Success\n+ */\n+int tf_msg_set_tbl_entry(struct tf *tfp,\n+\t\t\t enum tf_dir dir,\n+\t\t\t enum tf_tbl_type type,\n+\t\t\t uint16_t size,\n+\t\t\t uint8_t *data,\n+\t\t\t uint32_t index);\n+\n+/**\n+ * Sends get message of a Table Type element to the firmware.\n+ *\n+ * [in] tfp\n+ *   Pointer to session handle\n+ *\n+ * [in] dir\n+ *   Direction location of the element to get\n+ *\n+ * [in] type\n+ *   Type of the object to get\n+ *\n+ * [in] size\n+ *   Size of the data read\n+ *\n+ * [in] data\n+ *   Data read\n+ *\n+ * [in] index\n+ *   Index to get\n+ *\n+ * Returns:\n+ *   0 - Success\n+ */\n+int tf_msg_get_tbl_entry(struct tf *tfp,\n+\t\t\t enum tf_dir dir,\n+\t\t\t enum tf_tbl_type type,\n+\t\t\t uint16_t size,\n+\t\t\t uint8_t *data,\n+\t\t\t uint32_t index);\n+\n #endif  /* _TF_MSG_H_ */\ndiff --git a/drivers/net/bnxt/tf_core/tf_tbl.c b/drivers/net/bnxt/tf_core/tf_tbl.c\nnew file mode 100644\nindex 0000000..14bf4ef\n--- /dev/null\n+++ b/drivers/net/bnxt/tf_core/tf_tbl.c\n@@ -0,0 +1,43 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(c) 2019-2020 Broadcom\n+ * All rights reserved.\n+ */\n+\n+/* Truflow Table APIs and supporting code */\n+\n+#include <stdio.h>\n+#include <string.h>\n+#include <stdbool.h>\n+#include <math.h>\n+#include <sys/param.h>\n+#include <rte_common.h>\n+#include <rte_errno.h>\n+#include \"hsi_struct_def_dpdk.h\"\n+\n+#include \"tf_core.h\"\n+#include \"tf_session.h\"\n+#include \"tf_msg.h\"\n+#include \"tfp.h\"\n+#include \"hwrm_tf.h\"\n+#include \"bnxt.h\"\n+#include \"tf_resources.h\"\n+#include \"tf_rm.h\"\n+\n+#define PTU_PTE_VALID          0x1UL\n+#define PTU_PTE_LAST           0x2UL\n+#define PTU_PTE_NEXT_TO_LAST   0x4UL\n+\n+/* Number of pointers per page_size */\n+#define\tMAX_PAGE_PTRS(page_size)  ((page_size) / sizeof(void *))\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",
    "prefixes": [
        "v4",
        "11/34"
    ]
}