Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82149/?format=api
http://patches.dpdk.org/api/patches/82149/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201026052105.1561859-5-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": "<20201026052105.1561859-5-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20201026052105.1561859-5-thomas@monjalon.net", "date": "2020-10-26T05:20:54", "name": "[04/15] node: switch IPv4 metadata to dynamic mbuf field", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "7be40489d91adeb1c8a0dc397f953bb264555665", "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/20201026052105.1561859-5-thomas@monjalon.net/mbox/", "series": [ { "id": 13308, "url": "http://patches.dpdk.org/api/series/13308/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13308", "date": "2020-10-26T05:20:50", "name": "remove mbuf userdata", "version": 1, "mbox": "http://patches.dpdk.org/series/13308/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/82149/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/82149/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 A3C81A04B5;\n\tMon, 26 Oct 2020 06:22:49 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 048B52C15;\n\tMon, 26 Oct 2020 06:21:35 +0100 (CET)", "from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 86EBE2BE1\n for <dev@dpdk.org>; Mon, 26 Oct 2020 06:21:28 +0100 (CET)", "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id 3947B5C0113;\n Mon, 26 Oct 2020 01:21:27 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Mon, 26 Oct 2020 01:21:27 -0400", "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 1EE783064610;\n Mon, 26 Oct 2020 01:21:26 -0400 (EDT)" ], "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=gEuJnVlDEl5Z1\n 7oyUizyNxAipFStp/F4aZfCHXOBwGM=; b=qfqmUyZKrr9Aq5Rf5ty5TbN41X4OK\n b6N7H1uc1oA2LrIYEsQlkV15rbD+6XyDXSd9Pqo818honzkaXsuvOAYxOmYFmt4i\n zHotGI2cJd4wX0NURzMgmRTEqqTHR9l4T890T18V5sPV0fMEm0UEjIi4AibbgLZ/\n gckACXUsdeWiXTqG1y4+nG7DKYxGdsTqN2MvleQlS+xo4SCwpn6mZnLwo0XiTUHI\n kblYBqRC7x0PSKlIC6f1yALuzqfn/AyMCUCr+/QUD+KzZQNgrrQiYDN1E5iYqKJe\n 8pqkvu64sKwp/Kxsw3oanIG7z+bYMahQFsGvJQbhcYdLKJ7N/H7CCt1vg==", "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=gEuJnVlDEl5Z17oyUizyNxAipFStp/F4aZfCHXOBwGM=; b=Of4cIkxN\n jMY9aAJe8BT12ZlyvTIhvhgBhFQRhzW1ApltmUBnbyJlR91WCg3EOSeipWpb2/GW\n DuYlJB0K39c8JaByKM5UZMYQZzeLlzAjzHO+8vF44jpJNHM9oHTtplteRaLfZMjb\n F0SwEUuDmpHdnf8BHDVAajtbdMnRU4XMdHg1/tErm1NdLBp5hNyKY8XK0PE3Z7o7\n QwBWAdlf8QKfwEuEXOtFRXepkMNbo3mCPW8Eg8/o8MUNajrG84lPCWqT3KXRp/aw\n vYOpx2WSxM97WFBawRJr9zC3UP2w7ScZC71rnd9CJ6YDyIurTx8H9AYNOLOmlckD\n trTWOoQZ5Q3VfA==" ], "X-ME-Sender": "<xms:11yWXw6wH0MsiN5H8ol5-L3Y61sXViqthtSvhwcV27T4SRDnYNIjeg>\n <xme:11yWXx6miMUyliVaG1lnV_QCtFiZaBEcnuiobNR611mK-SRMRA7e2fry9Dnuu9IAo\n W97pLF-1ltRwpGqjQ>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrkeehgdekgecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf\n frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu\n tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih\n iivgepfeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho\n nhdrnhgvth", "X-ME-Proxy": "<xmx:11yWX_cGdv9_ScvGRWM_9srivos_4QV7WxtgNhZF-qoKvE44I9XwMw>\n <xmx:11yWX1JNGrL981XN92IQRBnpXz0BWRjCShOlIwSOorF6Oc1iBgNfaQ>\n <xmx:11yWX0JchhZnc-aU1pTwcc17JvghWIF8KWCzRSSLHT7znd9q_7X_CQ>\n <xmx:11yWX880MfxcNn_1FmZ_6NwwPHa39HkcjQaOjYjolkWvB4BZtYFHQA>", "From": "Thomas Monjalon <thomas@monjalon.net>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com, david.marchand@redhat.com,\n bruce.richardson@intel.com, olivier.matz@6wind.com,\n andrew.rybchenko@oktetlabs.ru, akhil.goyal@nxp.com,\n Nithin Dabilpuram <ndabilpuram@marvell.com>,\n Pavan Nikhilesh <pbhagavatula@marvell.com>", "Date": "Mon, 26 Oct 2020 06:20:54 +0100", "Message-Id": "<20201026052105.1561859-5-thomas@monjalon.net>", "X-Mailer": "git-send-email 2.28.0", "In-Reply-To": "<20201026052105.1561859-1-thomas@monjalon.net>", "References": "<20201026052105.1561859-1-thomas@monjalon.net>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[dpdk-dev] [PATCH 04/15] node: switch IPv4 metadata to dynamic mbuf\n\tfield", "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 node_mbuf_priv1 was stored in the deprecated mbuf field udata64.\nIt is moved to a dynamic field in order to allow removal of udata64.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n lib/librte_node/ip4_lookup.c | 7 +++++++\n lib/librte_node/ip4_rewrite.c | 10 ++++++++++\n lib/librte_node/node_private.h | 12 ++++++++++--\n 3 files changed, 27 insertions(+), 2 deletions(-)", "diff": "diff --git a/lib/librte_node/ip4_lookup.c b/lib/librte_node/ip4_lookup.c\nindex 8835aab9dd..2cc91c0c67 100644\n--- a/lib/librte_node/ip4_lookup.c\n+++ b/lib/librte_node/ip4_lookup.c\n@@ -21,6 +21,8 @@\n \n #include \"node_private.h\"\n \n+int node_mbuf_priv1_dynfield_offset;\n+\n #define IPV4_L3FWD_LPM_MAX_RULES 1024\n #define IPV4_L3FWD_LPM_NUMBER_TBL8S (1 << 8)\n \n@@ -178,6 +180,11 @@ ip4_lookup_node_init(const struct rte_graph *graph, struct rte_node *node)\n \tRTE_SET_USED(node);\n \n \tif (!init_once) {\n+\t\tnode_mbuf_priv1_dynfield_offset = rte_mbuf_dynfield_register(\n+\t\t\t\t&node_mbuf_priv1_dynfield_desc);\n+\t\tif (node_mbuf_priv1_dynfield_offset < 0)\n+\t\t\treturn -1;\n+\n \t\t/* Setup LPM tables for all sockets */\n \t\tRTE_LCORE_FOREACH(lcore_id)\n \t\t{\ndiff --git a/lib/librte_node/ip4_rewrite.c b/lib/librte_node/ip4_rewrite.c\nindex bb7f671b5c..2ffb3f4340 100644\n--- a/lib/librte_node/ip4_rewrite.c\n+++ b/lib/librte_node/ip4_rewrite.c\n@@ -248,9 +248,19 @@ ip4_rewrite_node_process(struct rte_graph *graph, struct rte_node *node,\n static int\n ip4_rewrite_node_init(const struct rte_graph *graph, struct rte_node *node)\n {\n+\tstatic bool init_once;\n \n \tRTE_SET_USED(graph);\n \tRTE_SET_USED(node);\n+\n+\tif (!init_once) {\n+\t\tnode_mbuf_priv1_dynfield_offset = rte_mbuf_dynfield_register(\n+\t\t\t\t&node_mbuf_priv1_dynfield_desc);\n+\t\tif (node_mbuf_priv1_dynfield_offset < 0)\n+\t\t\treturn -1;\n+\t\tinit_once = true;\n+\t}\n+\n \tnode_dbg(\"ip4_rewrite\", \"Initialized ip4_rewrite node initialized\");\n \n \treturn 0;\ndiff --git a/lib/librte_node/node_private.h b/lib/librte_node/node_private.h\nindex ab7941c12b..bafea3704d 100644\n--- a/lib/librte_node/node_private.h\n+++ b/lib/librte_node/node_private.h\n@@ -8,6 +8,7 @@\n #include <rte_common.h>\n #include <rte_log.h>\n #include <rte_mbuf.h>\n+#include <rte_mbuf_dyn.h>\n \n extern int rte_node_logtype;\n #define NODE_LOG(level, node_name, ...) \\\n@@ -21,7 +22,6 @@ extern int rte_node_logtype;\n #define node_dbg(node_name, ...) NODE_LOG(DEBUG, node_name, __VA_ARGS__)\n \n /**\n- *\n * Node mbuf private data to store next hop, ttl and checksum.\n */\n struct node_mbuf_priv1 {\n@@ -37,6 +37,13 @@ struct node_mbuf_priv1 {\n \t};\n };\n \n+static const struct rte_mbuf_dynfield node_mbuf_priv1_dynfield_desc = {\n+\t.name = \"rte_node_dynfield_priv1\",\n+\t.size = sizeof(uint64_t),\n+\t.align = __alignof__(uint64_t),\n+};\n+extern int node_mbuf_priv1_dynfield_offset;\n+\n /**\n * Node mbuf private area 2.\n */\n@@ -60,7 +67,8 @@ struct node_mbuf_priv2 {\n static __rte_always_inline struct node_mbuf_priv1 *\n node_mbuf_priv1(struct rte_mbuf *m)\n {\n-\treturn (struct node_mbuf_priv1 *)&m->udata64;\n+\treturn RTE_MBUF_DYNFIELD(m,\n+\t\tnode_mbuf_priv1_dynfield_offset, struct node_mbuf_priv1 *);\n }\n \n /**\n", "prefixes": [ "04/15" ] }{ "id": 82149, "url": "