Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/117390/?format=api
http://patches.dpdk.org/api/patches/117390/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20221005231836.215112-2-yuanx.wang@intel.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": "<20221005231836.215112-2-yuanx.wang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20221005231836.215112-2-yuanx.wang@intel.com", "date": "2022-10-05T23:18:33", "name": "[v8,1/4] ethdev: introduce protocol header API", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "0db3bc9a6a48bdc41f21162d4297437e7581b8b5", "submitter": { "id": 2087, "url": "http://patches.dpdk.org/api/people/2087/?format=api", "name": "Wang, YuanX", "email": "yuanx.wang@intel.com" }, "delegate": { "id": 3961, "url": "http://patches.dpdk.org/api/users/3961/?format=api", "username": "arybchenko", "first_name": "Andrew", "last_name": "Rybchenko", "email": "andrew.rybchenko@oktetlabs.ru" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20221005231836.215112-2-yuanx.wang@intel.com/mbox/", "series": [ { "id": 24991, "url": "http://patches.dpdk.org/api/series/24991/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=24991", "date": "2022-10-05T23:18:32", "name": "support protocol based buffer split", "version": 8, "mbox": "http://patches.dpdk.org/series/24991/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/117390/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/117390/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 B1A2FA0543;\n\tWed, 5 Oct 2022 17:31:42 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A4E2542670;\n\tWed, 5 Oct 2022 17:31:42 +0200 (CEST)", "from mga06.intel.com (mga06b.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id 47C1740E2D\n for <dev@dpdk.org>; Wed, 5 Oct 2022 17:31:40 +0200 (CEST)", "from fmsmga006.fm.intel.com ([10.253.24.20])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 Oct 2022 08:31:38 -0700", "from unknown (HELO localhost.localdomain) ([10.239.252.55])\n by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 05 Oct 2022 08:31:32 -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=1664983900; x=1696519900;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=IWcBgbYa7Ua1pvMqgmhBoER1sHcxzR5rdNNbmxW9rVI=;\n b=IONWWerik+VKBxaD3eQkPxKXq4toKMeyUAzymW5CoaiM4UIOv4vUhqab\n jLHSNodTbbdd7N+WApmHwUbOJ4KMduvJBAC48Rn3Y36/ZIvAQJ57dy3TA\n Wn0o0PSuyItuL/A0fGEcvdTT2LL52CurrtmC9xv0rEo6GrG/BDV5sVbEY\n UHpcJJiNY3ffeShcIMsyDE1SxKWn+s2LEgu0oLIE9JWTUKAzabd8Gb3EA\n M4Lc9lyS2vHfvJmB5FzRQWqtIoX85YOlZQIgL6BL8ZbhVvKMMyOrMysPP\n znyqHUnZrPmMA5mxwSnUTSmohCQuIcAxJghD1Ts3jhnjNJ5EaFH2a/aG3 Q==;", "X-IronPort-AV": [ "E=McAfee;i=\"6500,9779,10491\"; a=\"365110082\"", "E=Sophos;i=\"5.95,161,1661842800\"; d=\"scan'208\";a=\"365110082\"", "E=McAfee;i=\"6500,9779,10491\"; a=\"869434589\"", "E=Sophos;i=\"5.95,161,1661842800\"; d=\"scan'208\";a=\"869434589\"" ], "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 v8 1/4] ethdev: introduce protocol header API", "Date": "Thu, 6 Oct 2022 07:18:33 +0800", "Message-Id": "<20221005231836.215112-2-yuanx.wang@intel.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20221005231836.215112-1-yuanx.wang@intel.com>", "References": "<20220812181552.2908067-1-yuanx.wang@intel.com>\n <20221005231836.215112-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 | 1 +\n 5 files changed, 84 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst\nindex ac67e7e710..141fd9442b 100644\n--- a/doc/guides/rel_notes/release_22_11.rst\n+++ b/doc/guides/rel_notes/release_22_11.rst\n@@ -123,6 +123,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 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 2821770e2d..ee3b490889 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -6045,6 +6045,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 == 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 a21f58b9cd..c51c1f3fa0 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -6025,6 +6025,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 3def7bfd24..87f06d4ea6 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -288,6 +288,7 @@ EXPERIMENTAL {\n \n \t# added in 22.11\n \trte_flow_async_action_handle_query;\n+\trte_eth_buffer_split_get_supported_hdr_ptypes;\n };\n \n INTERNAL {\n", "prefixes": [ "v8", "1/4" ] }{ "id": 117390, "url": "