get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 116834,
    "url": "https://patches.dpdk.org/api/patches/116834/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220926094039.1572741-2-yuanx.wang@intel.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": "<20220926094039.1572741-2-yuanx.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220926094039.1572741-2-yuanx.wang@intel.com",
    "date": "2022-09-26T09:40:36",
    "name": "[v5,1/4] ethdev: introduce protocol header API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "31fdc1e518ea4e42fcb2a3e1a12c4c77964b6b1e",
    "submitter": {
        "id": 2087,
        "url": "https://patches.dpdk.org/api/people/2087/?format=api",
        "name": "Wang, YuanX",
        "email": "yuanx.wang@intel.com"
    },
    "delegate": {
        "id": 3961,
        "url": "https://patches.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20220926094039.1572741-2-yuanx.wang@intel.com/mbox/",
    "series": [
        {
            "id": 24816,
            "url": "https://patches.dpdk.org/api/series/24816/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24816",
            "date": "2022-09-26T09:40:35",
            "name": "support protocol based buffer split",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/24816/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/116834/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/116834/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 65FCCA00C3;\n\tMon, 26 Sep 2022 03:56:58 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5928A40DF7;\n\tMon, 26 Sep 2022 03:56:58 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n by mails.dpdk.org (Postfix) with ESMTP id B0999400D4\n for <dev@dpdk.org>; Mon, 26 Sep 2022 03:56:56 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Sep 2022 18:56:55 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.252.55])\n by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Sep 2022 18:56:50 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1664157416; x=1695693416;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=wNlxZTnqjIY1OucDBppa4zXgG3//1Tqtg0w8YFH4COs=;\n b=JlqeykWbxgT2m6nyG1u0q+4WEuFifHlsrDCiEO2GvA9/wMxuNh+8rKwl\n O02Vup8QUqSUHo41sAEP3u+hANRebU8itmtJ0XcBhLR8FN18Vd7nnuElE\n 6epkWwNxfsGrnA7+4RIV4bT7POwFoCsfJhdWggNMYW3l66Pebcxw8ngeh\n 5bvR9zH90ZbBvqtOGYzMFxgAaLlfedtbwR+Y9f6GGr3KT/yaRziYnzMNQ\n vv962n9TL+xtWlxuyJwdbNpmAdSl5uM2+CYRmL5AHt+me0AfOZ81CFqEr\n sRKNfZvklP0TAlZUSnVN8HE0bOgEwivV91Eqg/zKaapYWNPi7AxKWaFlk g==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10481\"; a=\"298517592\"",
            "E=Sophos;i=\"5.93,345,1654585200\"; d=\"scan'208\";a=\"298517592\"",
            "E=Sophos;i=\"5.93,345,1654585200\"; d=\"scan'208\";a=\"620873392\""
        ],
        "From": "Yuan Wang <yuanx.wang@intel.com>",
        "To": "dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@xilinx.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>",
        "Cc": "xiaoyun.li@intel.com, aman.deep.singh@intel.com, yuying.zhang@intel.com,\n qi.z.zhang@intel.com, qiming.yang@intel.com, jerinjacobk@gmail.com,\n viacheslavo@nvidia.com, stephen@networkplumber.org, xuan.ding@intel.com,\n hpothula@marvell.com, yaqi.tang@intel.com,\n Yuan Wang <yuanx.wang@intel.com>, Wenxuan Wu <wenxuanx.wu@intel.com>",
        "Subject": "[PATCH v5 1/4] ethdev: introduce protocol header API",
        "Date": "Mon, 26 Sep 2022 17:40:36 +0800",
        "Message-Id": "<20220926094039.1572741-2-yuanx.wang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20220926094039.1572741-1-yuanx.wang@intel.com>",
        "References": "<20220812181552.2908067-1-yuanx.wang@intel.com>\n <20220926094039.1572741-1-yuanx.wang@intel.com>",
        "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": "Add a new ethdev API to retrieve supported protocol headers\nof a PMD, which helps to configure protocol header based buffer split.\n\nSigned-off-by: Yuan Wang <yuanx.wang@intel.com>\nSigned-off-by: Xuan Ding <xuan.ding@intel.com>\nSigned-off-by: Wenxuan Wu <wenxuanx.wu@intel.com>\nReviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>\n---\n doc/guides/rel_notes/release_22_11.rst |  5 ++++\n lib/ethdev/ethdev_driver.h             | 15 ++++++++++++\n lib/ethdev/rte_ethdev.c                | 33 ++++++++++++++++++++++++++\n lib/ethdev/rte_ethdev.h                | 30 +++++++++++++++++++++++\n lib/ethdev/version.map                 |  3 +++\n 5 files changed, 86 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex 235ac9bf94..8e5bdde46a 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -59,6 +59,11 @@ New Features\n \n   * Added support to set device link down/up.\n \n+* **Added new ethdev API for PMD to get buffer split supported protocol types.**\n+\n+  Added ``rte_eth_buffer_split_get_supported_hdr_ptypes()``, to get supported\n+  header protocols of a PMD to split.\n+\n \n Removed Items\n -------------\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 8cd8eb8685..791b264610 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -1055,6 +1055,18 @@ typedef int (*eth_ip_reassembly_conf_get_t)(struct rte_eth_dev *dev,\n typedef int (*eth_ip_reassembly_conf_set_t)(struct rte_eth_dev *dev,\n \t\tconst struct rte_eth_ip_reassembly_params *conf);\n \n+/**\n+ * @internal\n+ * Get supported header protocols of a PMD to split.\n+ *\n+ * @param dev\n+ *   Ethdev handle of port.\n+ *\n+ * @return\n+ *   An array pointer to store supported protocol headers.\n+ */\n+typedef const uint32_t *(*eth_buffer_split_supported_hdr_ptypes_get_t)(struct rte_eth_dev *dev);\n+\n /**\n  * @internal\n  * Dump private info from device to a file.\n@@ -1302,6 +1314,9 @@ struct eth_dev_ops {\n \t/** Set IP reassembly configuration */\n \teth_ip_reassembly_conf_set_t ip_reassembly_conf_set;\n \n+\t/** Get supported header ptypes to split */\n+\teth_buffer_split_supported_hdr_ptypes_get_t buffer_split_supported_hdr_ptypes_get;\n+\n \t/** Dump private info from device */\n \teth_dev_priv_dump_t eth_dev_priv_dump;\n \ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 0c2c1088c0..1f0a7f8f3f 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -6002,6 +6002,39 @@ rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)\n \treturn eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file));\n }\n \n+int\n+rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num)\n+{\n+\tint i, j;\n+\tstruct rte_eth_dev *dev;\n+\tconst uint32_t *all_types;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (ptypes == NULL && num > 0) {\n+\t\tRTE_ETHDEV_LOG(ERR,\n+\t\t\t\"Cannot get ethdev port %u supported header protocol types to NULL when array size is non zero\\n\",\n+\t\t\tport_id);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tif (*dev->dev_ops->buffer_split_supported_hdr_ptypes_get == NULL)\n+\t\treturn -ENOTSUP;\n+\tall_types = (*dev->dev_ops->buffer_split_supported_hdr_ptypes_get)(dev);\n+\n+\tif (!all_types)\n+\t\treturn 0;\n+\n+\tfor (i = 0, j = 0; all_types[i] != RTE_PTYPE_UNKNOWN; ++i) {\n+\t\tif (j < num)\n+\t\t\tptypes[j] = all_types[i];\n+\t\tj++;\n+\t}\n+\n+\treturn j;\n+}\n+\n RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);\n \n RTE_INIT(ethdev_init_telemetry)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 45d17ddd13..c440e3863a 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5924,6 +5924,36 @@ rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,\n \treturn rte_eth_tx_buffer_flush(port_id, queue_id, buffer);\n }\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice\n+ *\n+ * Get supported header protocols to split on Rx.\n+ *\n+ * When a packet type is announced to be split, it *must* be supported by\n+ * the PMD. For instance, if eth-ipv4, eth-ipv4-udp is announced, the PMD must\n+ * return the following packet types for these packets:\n+ * - Ether/IPv4             -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4\n+ * - Ether/IPv4/UDP         -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4 | RTE_PTYPE_L4_UDP\n+ *\n+ * @param port_id\n+ *   The port identifier of the device.\n+ * @param[out] ptypes\n+ *   An array pointer to store supported protocol headers, allocated by caller.\n+ *   These ptypes are composed with RTE_PTYPE_*.\n+ * @param num\n+ *   Size of the array pointed by param ptypes.\n+ * @return\n+ *   - (>=0) Number of supported ptypes. If the number of types exceeds num,\n+ *           only num entries will be filled into the ptypes array, but the full\n+ *           count of supported ptypes will be returned.\n+ *   - (-ENOTSUP) if header protocol is not supported by device.\n+ *   - (-ENODEV) if *port_id* invalid.\n+ *   - (-EINVAL) if bad parameter.\n+ */\n+__rte_experimental\n+int rte_eth_buffer_split_get_supported_hdr_ptypes(uint16_t port_id, uint32_t *ptypes, int num);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 03f52fee91..e496c8d938 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -285,6 +285,9 @@ EXPERIMENTAL {\n \trte_mtr_color_in_protocol_priority_get;\n \trte_mtr_color_in_protocol_set;\n \trte_mtr_meter_vlan_table_update;\n+\n+\t# added in 22.11\n+\trte_eth_buffer_split_get_supported_hdr_ptypes;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v5",
        "1/4"
    ]
}