Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/105576/?format=api
http://patchwork.dpdk.org/api/patches/105576/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20220103150813.1694888-2-gakhil@marvell.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": "<20220103150813.1694888-2-gakhil@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220103150813.1694888-2-gakhil@marvell.com", "date": "2022-01-03T15:08:06", "name": "[1/8] ethdev: introduce IP reassembly offload", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "22ebfc9c245909fd46643ed56c4736441d6dbb3a", "submitter": { "id": 2094, "url": "http://patchwork.dpdk.org/api/people/2094/?format=api", "name": "Akhil Goyal", "email": "gakhil@marvell.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20220103150813.1694888-2-gakhil@marvell.com/mbox/", "series": [ { "id": 21052, "url": "http://patchwork.dpdk.org/api/series/21052/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=21052", "date": "2022-01-03T15:08:05", "name": "ethdev: introduce IP reassembly offload", "version": 1, "mbox": "http://patchwork.dpdk.org/series/21052/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/105576/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/105576/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 874F6A04A3;\n\tMon, 3 Jan 2022 16:08:42 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 57A22410E0;\n\tMon, 3 Jan 2022 16:08:41 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173])\n by mails.dpdk.org (Postfix) with ESMTP id 897074069F\n for <dev@dpdk.org>; Mon, 3 Jan 2022 16:08:39 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id\n 2037tVUC029250;\n Mon, 3 Jan 2022 07:08:37 -0800", "from dc5-exch01.marvell.com ([199.233.59.181])\n by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3dbw5w6mn1-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 03 Jan 2022 07:08:37 -0800", "from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com\n (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2;\n Mon, 3 Jan 2022 07:08:35 -0800", "from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com\n (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend\n Transport; Mon, 3 Jan 2022 07:08:35 -0800", "from localhost.localdomain (unknown [10.28.48.55])\n by maili.marvell.com (Postfix) with ESMTP id AE7FC3F70A9;\n Mon, 3 Jan 2022 07:08:31 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0220;\n bh=UDF/kwG/ou8SIjIDgcfAhSL3dAl0RGzW1PrCA9M0nBQ=;\n b=cEH8IN31sbnDOq6VikArq4xG1ThCMxShSEOGdDGltZ/o3ei1G1VBxMnON/oBj/QkPNd7\n G44YJMzKEsUgb0mzaYyDpVA851PhjtuwM7vQTti9qNoOc4I3dwUugFfsqDh3K6C63Nn5\n yTf/bXRvKjOU6YCAzZM0yx09OZm+QKq9jNItfLaYftXGywibtyEn6XV4oVY7A67gqzbG\n kTS1Y+YdSMnkxG91zOuMOeOFuZSANhC2YJYFBKFqsD/FFkJfpbHQES88RE0TihobD36z\n znz/mDSlBnBAHHsp41YLkcnm6bz5EFoklD6A54ehhrGJqsO5ywmHbZpLLsm6bqDOw4tn 5Q==", "From": "Akhil Goyal <gakhil@marvell.com>", "To": "<dev@dpdk.org>", "CC": "<anoobj@marvell.com>, <radu.nicolau@intel.com>,\n <declan.doherty@intel.com>,\n <hemant.agrawal@nxp.com>, <matan@nvidia.com>,\n <konstantin.ananyev@intel.com>, <thomas@monjalon.net>,\n <ferruh.yigit@intel.com>, <andrew.rybchenko@oktetlabs.ru>,\n <olivier.matz@6wind.com>, <rosen.xu@intel.com>, Akhil Goyal\n <gakhil@marvell.com>", "Subject": "[PATCH 1/8] ethdev: introduce IP reassembly offload", "Date": "Mon, 3 Jan 2022 20:38:06 +0530", "Message-ID": "<20220103150813.1694888-2-gakhil@marvell.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20220103150813.1694888-1-gakhil@marvell.com>", "References": "<20210823100259.1619886-1-gakhil@marvell.com>\n <20220103150813.1694888-1-gakhil@marvell.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Proofpoint-ORIG-GUID": "DScuw4DURZV6zyA64O7l_XQMtRi_oknu", "X-Proofpoint-GUID": "DScuw4DURZV6zyA64O7l_XQMtRi_oknu", "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513\n definitions=2022-01-03_06,2022-01-01_01,2021-12-02_01", "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": "IP Reassembly is a costly operation if it is done in software.\nThe operation becomes even more costlier if IP fragmants are encrypted.\nHowever, if it is offloaded to HW, it can considerably save application cycles.\n\nHence, a new offload RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY is introduced in\nethdev for devices which can attempt reassembly of packets in hardware.\nrte_eth_dev_info is updated with the reassembly capabilities which a device\ncan support.\n\nThe resulting reassembled packet would be a typical segmented mbuf in\ncase of success.\n\nAnd if reassembly of fragments is failed or is incomplete (if fragments do\nnot come before the reass_timeout), the mbuf ol_flags can be updated.\nThis is updated in a subsequent patch.\n\nSigned-off-by: Akhil Goyal <gakhil@marvell.com>\n---\n doc/guides/nics/features.rst | 12 ++++++++++++\n lib/ethdev/rte_ethdev.c | 1 +\n lib/ethdev/rte_ethdev.h | 32 +++++++++++++++++++++++++++++++-\n 3 files changed, 44 insertions(+), 1 deletion(-)", "diff": "diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst\nindex 27be2d2576..1dfdee9602 100644\n--- a/doc/guides/nics/features.rst\n+++ b/doc/guides/nics/features.rst\n@@ -602,6 +602,18 @@ Supports inner packet L4 checksum.\n ``tx_offload_capa,tx_queue_offload_capa:RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM``.\n \n \n+.. _nic_features_ip_reassembly:\n+\n+IP reassembly\n+-------------\n+\n+Supports IP reassembly in hardware.\n+\n+* **[uses] rte_eth_rxconf,rte_eth_rxmode**: ``offloads:RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY``.\n+* **[provides] mbuf**: ``mbuf.ol_flags:RTE_MBUF_F_RX_IP_REASSEMBLY_INCOMPLETE``.\n+* **[provides] rte_eth_dev_info**: ``reass_capa``.\n+\n+\n .. _nic_features_shared_rx_queue:\n \n Shared Rx queue\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex a1d475a292..d9a03f12f9 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -126,6 +126,7 @@ static const struct {\n \tRTE_RX_OFFLOAD_BIT2STR(OUTER_UDP_CKSUM),\n \tRTE_RX_OFFLOAD_BIT2STR(RSS_HASH),\n \tRTE_RX_OFFLOAD_BIT2STR(BUFFER_SPLIT),\n+\tRTE_RX_OFFLOAD_BIT2STR(IP_REASSEMBLY),\n };\n \n #undef RTE_RX_OFFLOAD_BIT2STR\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex fa299c8ad7..11427b2e4d 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -1586,6 +1586,7 @@ struct rte_eth_conf {\n #define RTE_ETH_RX_OFFLOAD_RSS_HASH RTE_BIT64(19)\n #define DEV_RX_OFFLOAD_RSS_HASH RTE_ETH_RX_OFFLOAD_RSS_HASH\n #define RTE_ETH_RX_OFFLOAD_BUFFER_SPLIT RTE_BIT64(20)\n+#define RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY RTE_BIT64(21)\n \n #define RTE_ETH_RX_OFFLOAD_CHECKSUM (RTE_ETH_RX_OFFLOAD_IPV4_CKSUM | \\\n \t\t\t\t RTE_ETH_RX_OFFLOAD_UDP_CKSUM | \\\n@@ -1781,6 +1782,33 @@ enum rte_eth_representor_type {\n \tRTE_ETH_REPRESENTOR_PF, /**< representor of Physical Function. */\n };\n \n+/* Flag to offload IP reassembly for IPv4 packets. */\n+#define RTE_ETH_DEV_REASSEMBLY_F_IPV4 (RTE_BIT32(0))\n+/* Flag to offload IP reassembly for IPv6 packets. */\n+#define RTE_ETH_DEV_REASSEMBLY_F_IPV6 (RTE_BIT32(1))\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this structure may change without prior notice.\n+ *\n+ * A structure used to set IP reassembly configuration.\n+ *\n+ * If RTE_ETH_RX_OFFLOAD_IP_REASSEMBLY flag is set in offloads field,\n+ * the PMD will attempt IP reassembly for the received packets as per\n+ * properties defined in this structure:\n+ *\n+ */\n+struct rte_eth_ip_reass_params {\n+\t/** Maximum time in ms which PMD can wait for other fragments. */\n+\tuint32_t reass_timeout;\n+\t/** Maximum number of fragments that can be reassembled. */\n+\tuint16_t max_frags;\n+\t/**\n+\t * Flags to enable reassembly of packet types -\n+\t * RTE_ETH_DEV_REASSEMBLY_F_xxx.\n+\t */\n+\tuint16_t flags;\n+};\n+\n /**\n * A structure used to retrieve the contextual information of\n * an Ethernet device, such as the controlling driver of the\n@@ -1841,8 +1869,10 @@ struct rte_eth_dev_info {\n \t * embedded managed interconnect/switch.\n \t */\n \tstruct rte_eth_switch_info switch_info;\n+\t/** IP reassembly offload capabilities that a device can support. */\n+\tstruct rte_eth_ip_reass_params reass_capa;\n \n-\tuint64_t reserved_64s[2]; /**< Reserved for future fields */\n+\tuint64_t reserved_64s[1]; /**< Reserved for future fields */\n \tvoid *reserved_ptrs[2]; /**< Reserved for future fields */\n };\n \n", "prefixes": [ "1/8" ] }{ "id": 105576, "url": "