get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 117735,
    "url": "http://patchwork.dpdk.org/api/patches/117735/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20221009202541.352724-2-yuanx.wang@intel.com/",
    "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": "<20221009202541.352724-2-yuanx.wang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20221009202541.352724-2-yuanx.wang@intel.com",
    "date": "2022-10-09T20:25:38",
    "name": "[v9,1/4] ethdev: introduce protocol header API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "b3a27a63d6ebe9c291f70303308e5f0a448bb196",
    "submitter": {
        "id": 2087,
        "url": "http://patchwork.dpdk.org/api/people/2087/?format=api",
        "name": "Wang, YuanX",
        "email": "yuanx.wang@intel.com"
    },
    "delegate": {
        "id": 3961,
        "url": "http://patchwork.dpdk.org/api/users/3961/?format=api",
        "username": "arybchenko",
        "first_name": "Andrew",
        "last_name": "Rybchenko",
        "email": "andrew.rybchenko@oktetlabs.ru"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20221009202541.352724-2-yuanx.wang@intel.com/mbox/",
    "series": [
        {
            "id": 25061,
            "url": "http://patchwork.dpdk.org/api/series/25061/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=25061",
            "date": "2022-10-09T20:25:37",
            "name": "support protocol based buffer split",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/25061/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/117735/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/117735/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 70977A0542;\n\tSun,  9 Oct 2022 14:39:38 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5EBE641141;\n\tSun,  9 Oct 2022 14:39:38 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id 696FF4113F\n for <dev@dpdk.org>; Sun,  9 Oct 2022 14:39:37 +0200 (CEST)",
            "from orsmga008.jf.intel.com ([10.7.209.65])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Oct 2022 05:39:36 -0700",
            "from unknown (HELO localhost.localdomain) ([10.239.252.55])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 09 Oct 2022 05:39:31 -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=1665319177; x=1696855177;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=rsizVrJj5PTvyzhfbNrlcDMiq0vFSfiwasFfnVyWNhU=;\n b=HEs8nNTbleiyoF3lnAV/JVoyadWRqKQ2c/Hud9xgCYMxAN7kRDPh4Yzs\n 3FIQtZwPugCIDpw+drEiYGb4Ty1Uu8B4RfaQaMpPQobF8davKMApTQCiU\n OQ2mw4mEFb1z9Cf3QXb+5tfMxLcDEpUIiCM+ax0n+3X3urDeCWlxuUXsY\n 4h9k85hsWksu6b/5Yilymy5aFHoLVP5DGiR061dK2X7mAJzptRsgUXJ5w\n auNV4EL5C/OimT8e744qftTIe6F+d+snnEEmLYbP6YEWvvW55f5AtoYMZ\n MNGCUdsqbQs3yXXI9UFbj+Cg/Yj0Eg7O2I2YjRm+dU9ohUatNT4dXE0Ks Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6500,9779,10494\"; a=\"304040369\"",
            "E=Sophos;i=\"5.95,171,1661842800\"; d=\"scan'208\";a=\"304040369\"",
            "E=McAfee;i=\"6500,9779,10494\"; a=\"656628305\"",
            "E=Sophos;i=\"5.95,171,1661842800\"; d=\"scan'208\";a=\"656628305\""
        ],
        "From": "Yuan Wang <yuanx.wang@intel.com>",
        "To": "dev@dpdk.org, Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@amd.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Ray Kinsella <mdr@ashroe.eu>",
        "Cc": "ferruh.yigit@xilinx.com, xiaoyun.li@intel.com, aman.deep.singh@intel.com,\n yuying.zhang@intel.com, qi.z.zhang@intel.com, qiming.yang@intel.com,\n jerinjacobk@gmail.com, viacheslavo@nvidia.com, stephen@networkplumber.org,\n xuan.ding@intel.com, hpothula@marvell.com, yaqi.tang@intel.com,\n Yuan Wang <yuanx.wang@intel.com>, Wenxuan Wu <wenxuanx.wu@intel.com>",
        "Subject": "[PATCH v9 1/4] ethdev: introduce protocol header API",
        "Date": "Mon, 10 Oct 2022 04:25:38 +0800",
        "Message-Id": "<20221009202541.352724-2-yuanx.wang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20221009202541.352724-1-yuanx.wang@intel.com>",
        "References": "<20220812181552.2908067-1-yuanx.wang@intel.com>\n <20221009202541.352724-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/nics/features.rst           |  2 +-\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                 |  1 +\n 6 files changed, 85 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst\nindex 6aa1085c5b..fea604e77f 100644\n--- a/doc/guides/nics/features.rst\n+++ b/doc/guides/nics/features.rst\n@@ -183,7 +183,7 @@ Scatters the packets being received on specified boundaries to segmented mbufs.\n * **[uses]       rte_eth_rxconf**: ``rx_conf.rx_seg, rx_conf.rx_nseg``.\n * **[implements] datapath**: ``Buffer Split functionality``.\n * **[provides]   rte_eth_dev_info**: ``rx_offload_capa:RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT``.\n-* **[related] API**: ``rte_eth_rx_queue_setup()``.\n+* **[related] API**: ``rte_eth_rx_queue_setup()``, ``rte_eth_buffer_split_get_supported_hdr_ptypes()``.\n \n \n .. _nic_features_lro:\ndiff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex c560dbdab7..16aca14bab 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -189,6 +189,11 @@ New Features\n   into single event containing ``rte_event_vector``\n   whose event type is ``RTE_EVENT_TYPE_CRYPTODEV_VECTOR``.\n \n+* **Added protocol header based buffer split.**\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 e2bd4642b9..1300acc95d 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@@ -1366,6 +1378,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 4703ab0caf..79d1f9b993 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -6209,6 +6209,39 @@ rte_eth_tx_descriptor_dump(uint16_t port_id, uint16_t queue_id,\n \t\t\t\t\t\tqueue_id, offset, num, 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 == NULL)\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 8c4a35cc1f..f9da569179 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -6337,6 +6337,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 3205556ce7..30b067e0b6 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -296,6 +296,7 @@ EXPERIMENTAL {\n \trte_flow_async_action_handle_query;\n \trte_mtr_meter_policy_get;\n \trte_mtr_meter_profile_get;\n+\trte_eth_buffer_split_get_supported_hdr_ptypes;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v9",
        "1/4"
    ]
}