get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128031,
    "url": "http://patchwork.dpdk.org/api/patches/128031/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-4-ivan.malov@arknetworks.am/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20230604232523.6746-4-ivan.malov@arknetworks.am>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230604232523.6746-4-ivan.malov@arknetworks.am",
    "date": "2023-06-04T23:24:52",
    "name": "[v3,03/34] common/sfc_efx/base: add API to list HW tables",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5114da8bba171e1b1bb6aa8f39c611c583519c18",
    "submitter": {
        "id": 2962,
        "url": "http://patchwork.dpdk.org/api/people/2962/?format=api",
        "name": "Ivan Malov",
        "email": "ivan.malov@arknetworks.am"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20230604232523.6746-4-ivan.malov@arknetworks.am/mbox/",
    "series": [
        {
            "id": 28336,
            "url": "http://patchwork.dpdk.org/api/series/28336/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28336",
            "date": "2023-06-04T23:24:49",
            "name": "net/sfc: support HW conntrack assistance",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/28336/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/128031/comments/",
    "check": "warning",
    "checks": "http://patchwork.dpdk.org/api/patches/128031/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id F0BC542C2C;\n\tMon,  5 Jun 2023 01:25:49 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CCDC242D31;\n\tMon,  5 Jun 2023 01:25:29 +0200 (CEST)",
            "from agw.arknetworks.am (agw.arknetworks.am [79.141.165.80])\n by mails.dpdk.org (Postfix) with ESMTP id C7F41410ED\n for <dev@dpdk.org>; Mon,  5 Jun 2023 01:25:25 +0200 (CEST)",
            "from localhost.localdomain (unknown [78.109.68.201])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by agw.arknetworks.am (Postfix) with ESMTPSA id 38613E11FF;\n Mon,  5 Jun 2023 03:25:25 +0400 (+04)"
        ],
        "From": "Ivan Malov <ivan.malov@arknetworks.am>",
        "To": "dev@dpdk.org",
        "Cc": "Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ferruh Yigit <ferruh.yigit@amd.com>,\n Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>,\n Andy Moreton <amoreton@xilinx.com>",
        "Subject": "[PATCH v3 03/34] common/sfc_efx/base: add API to list HW tables",
        "Date": "Mon,  5 Jun 2023 03:24:52 +0400",
        "Message-Id": "<20230604232523.6746-4-ivan.malov@arknetworks.am>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "References": "<20230601195538.8265-1-ivan.malov@arknetworks.am>\n <20230604232523.6746-1-ivan.malov@arknetworks.am>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "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"
    },
    "content": "From: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>\n\nNew MCDI Table Access API allows management of\nthe HW tables' content.\nThis part of API helps to list all supported tables.\nIn the near future, only the CT table is planned\nto be used, so only one identifier for this table\nwas added to the efx.\nNew table IDs will be added as needed.\n\nSigned-off-by: Denis Pryazhennikov <denis.pryazhennikov@arknetworks.am>\nReviewed-by: Andy Moreton <amoreton@xilinx.com>\n---\n drivers/common/sfc_efx/base/efx.h       | 15 ++++\n drivers/common/sfc_efx/base/efx_table.c | 94 +++++++++++++++++++++++++\n drivers/common/sfc_efx/base/meson.build |  1 +\n drivers/common/sfc_efx/version.map      |  2 +\n 4 files changed, 112 insertions(+)\n create mode 100644 drivers/common/sfc_efx/base/efx_table.c",
    "diff": "diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h\nindex 520674a602..2de08d1230 100644\n--- a/drivers/common/sfc_efx/base/efx.h\n+++ b/drivers/common/sfc_efx/base/efx.h\n@@ -5070,6 +5070,21 @@ efx_nic_dma_map(\n \t__in\t\tsize_t len,\n \t__out\t\tefsys_dma_addr_t *nic_addrp);\n \n+/* Unique IDs for HW tables */\n+typedef enum efx_table_id_e {\n+\tEFX_TABLE_ID_CONNTRACK = 0x10300,\n+} efx_table_id_t;\n+\n+LIBEFX_API\n+extern\t__checkReturn\t\t\t\tefx_rc_t\n+efx_table_list(\n+\t__in\t\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\t\tuint32_t entry_ofst,\n+\t__out_opt\t\t\t\tunsigned int *total_n_tablesp,\n+\t__out_ecount_opt(n_table_ids)\t\tefx_table_id_t *table_ids,\n+\t__in\t\t\t\t\tunsigned int n_table_ids,\n+\t__out_opt\t\t\t\tunsigned int *n_table_ids_writtenp);\n+\n #ifdef\t__cplusplus\n }\n #endif\ndiff --git a/drivers/common/sfc_efx/base/efx_table.c b/drivers/common/sfc_efx/base/efx_table.c\nnew file mode 100644\nindex 0000000000..7cfdfea36e\n--- /dev/null\n+++ b/drivers/common/sfc_efx/base/efx_table.c\n@@ -0,0 +1,94 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ *\n+ * Copyright (c) 2023 Advanced Micro Devices, Inc.\n+ */\n+\n+#include \"efx.h\"\n+#include \"efx_impl.h\"\n+\n+\t__checkReturn\t\t\t\tefx_rc_t\n+efx_table_list(\n+\t__in\t\t\t\t\tefx_nic_t *enp,\n+\t__in\t\t\t\t\tuint32_t entry_ofst,\n+\t__out_opt\t\t\t\tunsigned int *total_n_tablesp,\n+\t__out_ecount_opt(n_table_ids)\t\tefx_table_id_t *table_ids,\n+\t__in\t\t\t\t\tunsigned int n_table_ids,\n+\t__out_opt\t\t\t\tunsigned int *n_table_ids_writtenp)\n+{\n+\tconst efx_nic_cfg_t *encp = efx_nic_cfg_get(enp);\n+\tunsigned int n_entries;\n+\tefx_mcdi_req_t req;\n+\tunsigned int i;\n+\tefx_rc_t rc;\n+\tEFX_MCDI_DECLARE_BUF(payload,\n+\t    MC_CMD_TABLE_LIST_IN_LEN,\n+\t    MC_CMD_TABLE_LIST_OUT_LENMAX_MCDI2);\n+\n+\t/* Ensure EFX and MCDI use same values for table IDs */\n+\tEFX_STATIC_ASSERT(EFX_TABLE_ID_CONNTRACK == TABLE_ID_CONNTRACK_TABLE);\n+\n+\tif (encp->enc_table_api_supported == B_FALSE) {\n+\t\trc = ENOTSUP;\n+\t\tgoto fail1;\n+\t}\n+\n+\tif ((n_table_ids != 0) &&\n+\t   ((table_ids == NULL) || (n_table_ids_writtenp == NULL))) {\n+\t\trc = EINVAL;\n+\t\tgoto fail2;\n+\t}\n+\n+\treq.emr_cmd = MC_CMD_TABLE_LIST;\n+\treq.emr_in_buf = payload;\n+\treq.emr_in_length = MC_CMD_TABLE_LIST_IN_LEN;\n+\treq.emr_out_buf = payload;\n+\treq.emr_out_length = MC_CMD_TABLE_LIST_OUT_LENMAX_MCDI2;\n+\n+\tMCDI_IN_SET_DWORD(req, TABLE_LIST_IN_FIRST_TABLE_ID_INDEX, entry_ofst);\n+\n+\tefx_mcdi_execute(enp, &req);\n+\n+\tif (req.emr_rc != 0) {\n+\t\trc = req.emr_rc;\n+\t\tgoto fail3;\n+\t}\n+\n+\tif (req.emr_out_length_used < MC_CMD_TABLE_LIST_OUT_LENMIN) {\n+\t\trc = EMSGSIZE;\n+\t\tgoto fail4;\n+\t}\n+\n+\tif (total_n_tablesp != NULL)\n+\t\t*total_n_tablesp = MCDI_OUT_DWORD(req, TABLE_LIST_OUT_N_TABLES);\n+\n+\tn_entries = MC_CMD_TABLE_LIST_OUT_TABLE_ID_NUM(req.emr_out_length_used);\n+\n+\tif (table_ids != NULL) {\n+\t\tif (n_entries > n_table_ids) {\n+\t\t\trc = ENOMEM;\n+\t\t\tgoto fail5;\n+\t\t}\n+\n+\t\tfor (i = 0; i < n_entries; i++) {\n+\t\t\ttable_ids[i] = MCDI_OUT_INDEXED_DWORD(req,\n+\t\t\t    TABLE_LIST_OUT_TABLE_ID, i);\n+\t\t}\n+\t}\n+\n+\tif (n_table_ids_writtenp != NULL)\n+\t\t*n_table_ids_writtenp = n_entries;\n+\n+\treturn (0);\n+\n+fail5:\n+\tEFSYS_PROBE(fail5);\n+fail4:\n+\tEFSYS_PROBE(fail4);\n+fail3:\n+\tEFSYS_PROBE(fail3);\n+fail2:\n+\tEFSYS_PROBE(fail2);\n+fail1:\n+\tEFSYS_PROBE1(fail1, efx_rc_t, rc);\n+\treturn (rc);\n+}\ndiff --git a/drivers/common/sfc_efx/base/meson.build b/drivers/common/sfc_efx/base/meson.build\nindex ff7f33fb44..7fc04aa57b 100644\n--- a/drivers/common/sfc_efx/base/meson.build\n+++ b/drivers/common/sfc_efx/base/meson.build\n@@ -16,6 +16,7 @@ sources = [\n         'efx_lic.c',\n         'efx_mac.c',\n         'efx_mae.c',\n+        'efx_table.c',\n         'efx_mcdi.c',\n         'efx_mon.c',\n         'efx_nic.c',\ndiff --git a/drivers/common/sfc_efx/version.map b/drivers/common/sfc_efx/version.map\nindex aabc354118..5717cc0ed2 100644\n--- a/drivers/common/sfc_efx/version.map\n+++ b/drivers/common/sfc_efx/version.map\n@@ -232,6 +232,8 @@ INTERNAL {\n \tefx_sram_buf_tbl_clear;\n \tefx_sram_buf_tbl_set;\n \n+\tefx_table_list;\n+\n \tefx_tunnel_config_clear;\n \tefx_tunnel_config_udp_add;\n \tefx_tunnel_config_udp_remove;\n",
    "prefixes": [
        "v3",
        "03/34"
    ]
}