Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/83823/?format=api
http://patches.dpdk.org/api/patches/83823/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201107155306.463148-1-thomas@monjalon.net/", "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": "<20201107155306.463148-1-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20201107155306.463148-1-thomas@monjalon.net", "date": "2020-11-07T15:53:06", "name": "[1/1] mbuf: move pool pointer in first half", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "f5a60dad07cc0544d5081cba35925301f2704b81", "submitter": { "id": 685, "url": "http://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 1, "url": "http://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20201107155306.463148-1-thomas@monjalon.net/mbox/", "series": [ { "id": 13730, "url": "http://patches.dpdk.org/api/series/13730/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13730", "date": "2020-11-07T15:53:06", "name": "[1/1] mbuf: move pool pointer in first half", "version": 1, "mbox": "http://patches.dpdk.org/series/13730/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/83823/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/83823/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id B0282A0527;\n\tSat, 7 Nov 2020 17:34:08 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D7EC72E1E;\n\tSat, 7 Nov 2020 17:34:06 +0100 (CET)", "from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com\n [66.111.4.230]) by dpdk.org (Postfix) with ESMTP id 048672C2E\n for <dev@dpdk.org>; Sat, 7 Nov 2020 17:34:03 +0100 (CET)", "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailnew.nyi.internal (Postfix) with ESMTP id 72C1A580181;\n Sat, 7 Nov 2020 11:34:02 -0500 (EST)", "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Sat, 07 Nov 2020 11:34:02 -0500", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 0487632803D4;\n Sat, 7 Nov 2020 11:33:58 -0500 (EST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding; s=fm2; bh=U3Pmy4IocMA+fctsl2LRYYc1Rw\n P/UPYROKfy4Il/wUY=; b=CXZdLymEtm3WHe+1DiRBPZC+NbDH6lcx1dNLuR8ZK2\n XRP+amWp5ZLmRCJJRVN0pUahz0khU4sv9Mg1/i2PyOW4Kne+eOlEpPvmsOJ7MPhB\n 0emGA6ltEPAze8+Aj1dl0l37Z+asw7L0ILEmNr3mcbsKFQcjAu/8rXl14KlPMNGj\n Z8vb7E5Bcp7Ob1wTAiT1s0f6nXMTTCF46SW1JUGg4uqKKq3nW44cmU7QzdqE30UY\n obzXOai5yz87f3aLwdfiyVDUms1vr556RBhc+mPmXToXUVRb0Fwxuftzk+jVAPUz\n BVSzir41Jb1+oaZqG4GqMxZePDHpK4hd5zmRWweEiXAA==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy\n :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=U3Pmy4IocMA+fctsl\n 2LRYYc1RwP/UPYROKfy4Il/wUY=; b=m6PXpJNGNRbPRKY9niRxS6VLaoH/DywsP\n eFmuRB/n7QKXlgF8BYEK1/2A1MYwX+3rWrgFpwu3NYBbHs3Y9h03qzOBKXx2UoQ8\n jXMQrtS+7x7nyHogUvHMRjZgxYr1Ct1sQtJzwGwnNvRB2BdNgmqx2C+H6BjMKM0m\n cAwDKoQ5kaB2wh4hK0MIHFAtKndseZESWkjqu8eibK0csV6vJXs/7k/n+Ed/+JlM\n HDvGO1x8A+q10vzUZ9lWLzHIi0zL/QpDV9Aeh8EfdUgmMLVh2g9bM7QPaVK8IyFF\n tzMyVAIQQrB709mjXVb+9dDM2YZHmBSe26ZjS7neVzttOrVWnNutg==" ], "X-ME-Sender": "<xms:eMymXzmohLL4n4PtFz43qkkDBNmLCLECKHRCIe95F2ls4VRlJvRGpg>\n <xme:eMymX23yIPzVvx7uDGrGWbF_26KdPddcxnRMzae3QLS4cTY0XiMJQPy44UeHHavR1\n 2YIRwOJ0KVOfHCQjQ>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrudduuddgledvucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu\n ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf\n grthhtvghrnheptdehvdeivddthffggfevffegkeetkeelhedtteeuheeuhffhgefggefg\n vddvkeefnecuffhomhgrihhnpeihohhuthhusggvrdgtohhmnecukfhppeejjedrudefge\n drvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl\n fhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght", "X-ME-Proxy": "<xmx:eMymX5p-se2jiuDSEtbWgdQd8Eql0W3rBqm3ayXpjYvPeW3J3YaToA>\n <xmx:eMymX7mvLDP2laWQJ10xhVTc_vf-BYbOByZxA5SvWhn_fgTv-H5InQ>\n <xmx:eMymXx3MtpgQAlTXJ6tJMjCzy3hJsSAsBhkkN3GPq05asNW59piT9g>\n <xmx:esymX_Pl0Fd_WAUcapTgp31AqpaVuKo4d2uUiVbDWa7N7NABlcZIgA>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "david.marchand@redhat.com, ferruh.yigit@intel.com, olivier.matz@6wind.com,\n mb@smartsharesystems.com, konstantin.ananyev@intel.com,\n andrew.rybchenko@oktetlabs.ru, viacheslavo@nvidia.com,\n ajit.khaparde@broadcom.com, jerinj@marvell.com, hemant.agrawal@nxp.com,\n Ray Kinsella <mdr@ashroe.eu>, Neil Horman <nhorman@tuxdriver.com>,\n Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Kiran Kumar K <kirankumark@marvell.com>", "Date": "Sat, 7 Nov 2020 16:53:06 +0100", "Message-Id": "<20201107155306.463148-1-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.28.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 1/1] mbuf: move pool pointer in first half", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "The mempool pointer in the mbuf struct is moved\nfrom the second to the first half.\nIt should increase performance on most systems having 64-byte cache line,\ni.e. mbuf is split in two cache lines.\n\nDue to this change, tx_offload is moved, so some vector data paths\nmay need to be adjusted. Note: OCTEON TX2 check is removed temporarily!\n\nMoving this field gives more space to dynfield1.\n\nThis is how the mbuf layout looks like (pahole-style):\n\nword type name byte size\n 0 void * buf_addr; /* 0 + 8 */\n 1 rte_iova_t buf_iova /* 8 + 8 */\n /* --- RTE_MARKER64 rearm_data; */\n 2 uint16_t data_off; /* 16 + 2 */\n uint16_t refcnt; /* 18 + 2 */\n uint16_t nb_segs; /* 20 + 2 */\n uint16_t port; /* 22 + 2 */\n 3 uint64_t ol_flags; /* 24 + 8 */\n /* --- RTE_MARKER rx_descriptor_fields1; */\n 4 uint32_t union packet_type; /* 32 + 4 */\n uint32_t pkt_len; /* 36 + 4 */\n 5 uint16_t data_len; /* 40 + 2 */\n uint16_t vlan_tci; /* 42 + 2 */\n 5.5 uint64_t union hash; /* 44 + 8 */\n 6.5 uint16_t vlan_tci_outer; /* 52 + 2 */\n uint16_t buf_len; /* 54 + 2 */\n 7 struct rte_mempool * pool; /* 56 + 8 */\n /* --- RTE_MARKER cacheline1; */\n 8 struct rte_mbuf * next; /* 64 + 8 */\n 9 uint64_t union tx_offload; /* 72 + 8 */\n10 struct rte_mbuf_ext_shared_info * shinfo; /* 80 + 8 */\n11 uint16_t priv_size; /* 88 + 2 */\n uint16_t timesync; /* 90 + 2 */\n11.5 uint32_t dynfield1[9]; /* 92 + 36 */\n16 /* --- END 128 */\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n doc/guides/rel_notes/deprecation.rst | 7 -------\n drivers/net/octeontx2/otx2_ethdev.c | 2 --\n lib/librte_kni/rte_kni_common.h | 3 ++-\n lib/librte_mbuf/rte_mbuf.h | 1 -\n lib/librte_mbuf/rte_mbuf_core.h | 5 ++---\n lib/librte_mbuf/rte_mbuf_dyn.c | 1 -\n 6 files changed, 4 insertions(+), 15 deletions(-)", "diff": "diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex f3258eb3f7..efb09f0c5e 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -81,13 +81,6 @@ Deprecation Notices\n us extending existing enum/define.\n One solution can be using a fixed size array instead of ``.*MAX.*`` value.\n \n-* mbuf: Some fields will be converted to dynamic API in DPDK 20.11\n- in order to reserve more space for the dynamic fields, as explained in\n- `this presentation <https://www.youtube.com/watch?v=Ttl6MlhmzWY>`_.\n- As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged,\n- avoiding impact on vectorized implementation of the driver datapaths,\n- while evaluating performance gains of a better use of the first cache line.\n-\n * ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,\n and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),\n will be removed in DPDK 20.11.\ndiff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c\nindex 6cebbe677d..d6e0f1dd03 100644\n--- a/drivers/net/octeontx2/otx2_ethdev.c\n+++ b/drivers/net/octeontx2/otx2_ethdev.c\n@@ -748,8 +748,6 @@ nix_tx_offload_flags(struct rte_eth_dev *eth_dev)\n \t\t\t offsetof(struct rte_mbuf, buf_iova) + 16);\n \tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, pkt_len) !=\n \t\t\t offsetof(struct rte_mbuf, ol_flags) + 12);\n-\tRTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, tx_offload) !=\n-\t\t\t offsetof(struct rte_mbuf, pool) + 2 * sizeof(void *));\n \n \tif (conf & DEV_TX_OFFLOAD_VLAN_INSERT ||\n \t conf & DEV_TX_OFFLOAD_QINQ_INSERT)\ndiff --git a/lib/librte_kni/rte_kni_common.h b/lib/librte_kni/rte_kni_common.h\nindex 36d66e2ffa..ffb3182731 100644\n--- a/lib/librte_kni/rte_kni_common.h\n+++ b/lib/librte_kni/rte_kni_common.h\n@@ -84,10 +84,11 @@ struct rte_kni_mbuf {\n \tchar pad2[4];\n \tuint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */\n \tuint16_t data_len; /**< Amount of data in segment buffer. */\n+\tchar pad3[14];\n+\tvoid *pool;\n \n \t/* fields on second cache line */\n \t__attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE)))\n-\tvoid *pool;\n \tvoid *next; /**< Physical address of next mbuf in kernel. */\n };\n \ndiff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h\nindex 3190a29cce..c4c9ebfaa0 100644\n--- a/lib/librte_mbuf/rte_mbuf.h\n+++ b/lib/librte_mbuf/rte_mbuf.h\n@@ -1107,7 +1107,6 @@ rte_pktmbuf_attach_extbuf(struct rte_mbuf *m, void *buf_addr,\n static inline void\n rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)\n {\n-\tmemcpy(&mdst->dynfield0, msrc->dynfield0, sizeof(mdst->dynfield0));\n \tmemcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1));\n }\n \ndiff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h\nindex debaace95a..567551deab 100644\n--- a/lib/librte_mbuf/rte_mbuf_core.h\n+++ b/lib/librte_mbuf/rte_mbuf_core.h\n@@ -586,12 +586,11 @@ struct rte_mbuf {\n \n \tuint16_t buf_len; /**< Length of segment buffer. */\n \n-\tuint64_t dynfield0[1]; /**< Reserved for dynamic fields. */\n+\tstruct rte_mempool *pool; /**< Pool from which mbuf was allocated. */\n \n \t/* second cache line - fields only used in slow path or on TX */\n \tRTE_MARKER cacheline1 __rte_cache_min_aligned;\n \n-\tstruct rte_mempool *pool; /**< Pool from which mbuf was allocated. */\n \tstruct rte_mbuf *next; /**< Next segment of scattered packet. */\n \n \t/* fields to support TX offloads */\n@@ -645,7 +644,7 @@ struct rte_mbuf {\n \t/** Timesync flags for use with IEEE1588. */\n \tuint16_t timesync;\n \n-\tuint32_t dynfield1[7]; /**< Reserved for dynamic fields. */\n+\tuint32_t dynfield1[9]; /**< Reserved for dynamic fields. */\n } __rte_cache_aligned;\n \n /**\ndiff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c\nindex fd3e019a22..7d5e942bf0 100644\n--- a/lib/librte_mbuf/rte_mbuf_dyn.c\n+++ b/lib/librte_mbuf/rte_mbuf_dyn.c\n@@ -125,7 +125,6 @@ init_shared_mem(void)\n \t\t * rte_mbuf_dynfield_copy().\n \t\t */\n \t\tmemset(shm, 0, sizeof(*shm));\n-\t\tmark_free(dynfield0);\n \t\tmark_free(dynfield1);\n \n \t\t/* init free_flags */\n", "prefixes": [ "1/1" ] }{ "id": 83823, "url": "