Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/83864/?format=api
https://patches.dpdk.org/api/patches/83864/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201109212937.989954-3-thomas@monjalon.net/", "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": "<20201109212937.989954-3-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20201109212937.989954-3-thomas@monjalon.net", "date": "2020-11-09T21:29:37", "name": "[v2,2/2] mbuf: move pool pointer in first half", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "096d91bbd540c1430f7378e0d32d59f74d29939e", "submitter": { "id": 685, "url": "https://patches.dpdk.org/api/people/685/?format=api", "name": "Thomas Monjalon", "email": "thomas@monjalon.net" }, "delegate": { "id": 1, "url": "https://patches.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/20201109212937.989954-3-thomas@monjalon.net/mbox/", "series": [ { "id": 13754, "url": "https://patches.dpdk.org/api/series/13754/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13754", "date": "2020-11-09T21:29:35", "name": "move mbuf pool pointer", "version": 2, "mbox": "https://patches.dpdk.org/series/13754/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/83864/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/83864/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 0FDE5A0527;\n\tMon, 9 Nov 2020 22:30:28 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 84ECC9B04;\n\tMon, 9 Nov 2020 22:29:58 +0100 (CET)", "from new2-smtp.messagingengine.com (new2-smtp.messagingengine.com\n [66.111.4.224]) by dpdk.org (Postfix) with ESMTP id 1DE376CA9\n for <dev@dpdk.org>; Mon, 9 Nov 2020 22:29:54 +0100 (CET)", "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailnew.nyi.internal (Postfix) with ESMTP id C6FAB5809C8;\n Mon, 9 Nov 2020 16:29:52 -0500 (EST)", "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Mon, 09 Nov 2020 16:29:52 -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 F1A733063067;\n Mon, 9 Nov 2020 16:29:50 -0500 (EST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=fm2; bh=ov1WSuAUhi/dT\n JoFEAPd6RiFNrGXkpX/qwiXmWgsLhU=; b=er5qTxvnSFg4TlxzKF9ZC/9l9Opvc\n iJWICc8NhA31pQNEUAxLAs42LWLNXrkZQHVQFUTP6ozy0fWmm2oFf/3ax97CuiIt\n 0H/YRRnZmHwtMbFSBFDLgXQ/uyv+mGfMfMvu8xcyq5MTJHO6m+SSADIstxlGbNIQ\n Mwp7nYzS4O8+T4UsHtCUI73DumtHIgx3QGkVvV9GhNsI9BP+9c6/ER8kKKziZXJ6\n v74SBciNMshQzPdp/Xagw2s3k5nV0PzzdxhJog3pBPirosGdYejrqIsodGG94fh6\n DpwQqWZr6800miSKUWaOd+OpiRMH0YgvD5wrsu+PcsbZ0KwbanSfTy0Kg==", "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm1; bh=ov1WSuAUhi/dTJoFEAPd6RiFNrGXkpX/qwiXmWgsLhU=; b=fL1v8p5w\n TwigSuUrnd+gfHETAvbekYLwLI3rXHNrjWs3W8VH9om8VpH+1a+zEt7hL1hV4rux\n MHOG42IbIXEbALyygZuiUpBRMQDRL4+niaO28EhzaxwcMPqIWUiiAOEEH5fYJLuK\n 03dMHuvubprIhApweJvupTfB3bJ/n9aaAvHgKf2gEwYQueaazIsLjMym/sr/ntnh\n J9qXEhjRcEVohemQeyhzPgR/zSZtCBSgEvEn4u8LQ190B9AV5jwcanz+UN5HFXsh\n 6JNu4oPVTE1uY5s32DfHwsS6+7EdrBxuLHnrBi1183hax4m9o8mRMTmeBDptWjxo\n zCM7UNWnMFMSuQ==" ], "X-ME-Sender": "<xms:0LSpXy_dQ-E1oXRvhw4TXcdVkpeAXDg8NfXiBwtU8lI06tIvq4leyQ>\n <xme:0LSpXyuD59Ppuf9V3ZLrwBXvSb2hJMXm6xg0ZtmkIuM6XQjzKOe6Qf071om428k2Z\n t7rSD6gmi21md3npA>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrudduhedgudehvdcutefuodetggdotefrod\n ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh\n necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd\n enucfjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm\n rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc\n ggtffrrghtthgvrhhnpedtjeegffduuedvtdehieffvdevjeegleevheevteekleejieej\n teeuteeugeelvdenucffohhmrghinhepughpughkrdhorhhgpdihohhuthhusggvrdgtoh\n hmnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedt\n necurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvg\n ht", "X-ME-Proxy": "<xmx:0LSpX4DTb2aH9j2XZFa_cMGl_nhbHYNueuFxfVAF5K0zXbpAAeKiVA>\n <xmx:0LSpX6d5hVS3gExjiCieZCWCMtBaj_53lKERrgFTaxfgq5wDEOjC-Q>\n <xmx:0LSpX3OaWBwO005KaNZVdRQzdNPyWe-0GkvfSzWxsC-kb6TNkXSTYQ>\n <xmx:0LSpX4GvNpC8V_U0GDToki1R1UejAy6wc1OVsfW-adH1mjfZu-K4pA>", "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>", "Date": "Mon, 9 Nov 2020 22:29:37 +0100", "Message-Id": "<20201109212937.989954-3-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20201109212937.989954-1-thomas@monjalon.net>", "References": "<20201107155306.463148-1-thomas@monjalon.net>\n <20201109212937.989954-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH v2 2/2] 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": "According to the Technical Board decision\n(http://mails.dpdk.org/archives/dev/2020-November/191859.html),\nthe mempool pointer in the mbuf struct is moved\nfrom the second to the first half.\nIt may increase performance in some cases\non systems having 64-byte cache line, i.e. mbuf split in two cache lines.\n\nDue to this change, tx_offload is moved.\nHopefully no vector data path is impacted.\n\nMoving this field gives more space to dynfield1\nwhile dropping the temporary dynfield0.\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 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 5 files changed, 4 insertions(+), 13 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/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": [ "v2", "2/2" ] }{ "id": 83864, "url": "