Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/82155/?format=api
http://patches.dpdk.org/api/patches/82155/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20201026052105.1561859-11-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-11-thomas@monjalon.net>", "list_archive_url": "https://inbox.dpdk.org/dev/20201026052105.1561859-11-thomas@monjalon.net", "date": "2020-10-26T05:21:00", "name": "[10/15] test/distributor: switch sequence to dynamic mbuf field", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "ab6df91f708a257f1d51567ae3a970cbbd7550e1", "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-11-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/82155/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/82155/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 07459A04B5;\n\tMon, 26 Oct 2020 06:24:59 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 744764C96;\n\tMon, 26 Oct 2020 06:21:51 +0100 (CET)", "from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 41AC337AF\n for <dev@dpdk.org>; Mon, 26 Oct 2020 06:21:43 +0100 (CET)", "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id E77305C00D0;\n Mon, 26 Oct 2020 01:21:42 -0400 (EDT)", "from mailfrontend2 ([10.202.2.163])\n by compute2.internal (MEProxy); Mon, 26 Oct 2020 01:21:42 -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 B2F9E3064610;\n Mon, 26 Oct 2020 01:21:41 -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=qmQlG5XoH6PaW\n vCT6wNZX/8TiXpVBn0+JAWrwPDTlAY=; b=puDXtvNG0A23G5dB4BXmoo3JtVfeq\n z9qTdEMcnhqXni0ZncPrZPQeOu2mI3ksyV9Eh5eU4ZPSy7r+4Fr4sCrMKZGMJqCH\n jcNyqMaK2KTuqZEhvLNWRn4XMB2rTmQr2NgShXb+blaJcA8QLRn/GWsbya+rdMPJ\n ay3MBbx1A8SRWzzBRpoYTih4MH4yRpXcT03oJb7t3PgJVR+rPLPlro11LjYj5FbL\n ArbjoOmpOK4vQzZng4DFR3k44rLDqTXGyj16GRepQj5ZT2NO5uPWYCqEkEctAYgK\n By02tMUF/zzjIZrpQosKUWXbsZmUbqd0r/Boj+/GL+xIU1xWhqp5PREjw==", "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=qmQlG5XoH6PaWvCT6wNZX/8TiXpVBn0+JAWrwPDTlAY=; b=LZm0QoNO\n L8M8w6tDRYpnd40dUPHl3Hvlt42SxnirZnCudbHPSKJy38gv27cYQM/0GmZzC61M\n s1be6YnWhPRubp78gtCgFYCT0SBW1fgM6SNjlz2LWmhKKpDEQpDP8o7IgIloBD1U\n 6AGSzjz4VlISPlYliYr9VNEf/0zkA6lOb4uBZg+HqoE5lDhbcWaXGAjSKv6VQYtb\n 5JfURa34uoxroULzXmSt/uC07pidwDGSL2IBOyCEJkDfa5W0a5EeCZ5UOub4BXF+\n WNVtDDlQSzvHBd5Qb3QdZZBddxk4IM8S6tQGmvDjx2X1Aanj2Uc6EH2+4OYjO9V9\n yZ28qyLZhc+cCw==" ], "X-ME-Sender": "<xms:5lyWX2zM3gRXHzXh525MkgNWgBuBlkqDdzwf-llmG6LsyL1wZravmQ>\n <xme:5lyWXyQuDKL8pGePA9aeeIw4QGgI43UJNldEDvQ02cQrSgW1J4ZwzWXoK0qPtG7I7\n 8ZLae00PrjE4sFLnw>", "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrkeehgdekgecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf\n frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu\n tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih\n iivgepjeenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho\n nhdrnhgvth", "X-ME-Proxy": "<xmx:5lyWX4VVNKlgU8B_cdePV1kjhc3JPTdUCpKvqW4rbcvI7ekEah6GsQ>\n <xmx:5lyWX8hTnYGVRm5uI0qz87ICHFal2i1bCIINe9e2wsh8hg-gXT7fJQ>\n <xmx:5lyWX4Ag5nHLm_7SetNVi3XbYsfF4r5ojq7BK0FXLPVPqnAuC5NcNA>\n <xmx:5lyWX376hrBReFJUbaC7q_ZhE8fWXy6OkQS8Na64HKJFh25NAmGEhA>", "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 David Hunt <david.hunt@intel.com>", "Date": "Mon, 26 Oct 2020 06:21:00 +0100", "Message-Id": "<20201026052105.1561859-11-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 10/15] test/distributor: switch sequence to\n\tdynamic mbuf field", "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 test used 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 app/test/test_distributor.c | 27 ++++++++++++++++++++++-----\n 1 file changed, 22 insertions(+), 5 deletions(-)", "diff": "diff --git a/app/test/test_distributor.c b/app/test/test_distributor.c\nindex eb889b91d1..074a06f4a2 100644\n--- a/app/test/test_distributor.c\n+++ b/app/test/test_distributor.c\n@@ -10,6 +10,7 @@\n #include <rte_errno.h>\n #include <rte_mempool.h>\n #include <rte_mbuf.h>\n+#include <rte_mbuf_dyn.h>\n #include <rte_distributor.h>\n #include <rte_string_fns.h>\n \n@@ -17,6 +18,10 @@\n #define BURST 32\n #define BIG_BATCH 1024\n \n+static int seq_dynfield_offset;\n+#define SEQ_FIELD(mbuf) \\\n+\t(*RTE_MBUF_DYNFIELD(mbuf, seq_dynfield_offset, uint32_t *))\n+\n struct worker_params {\n \tchar name[64];\n \tstruct rte_distributor *dist;\n@@ -578,7 +583,7 @@ handle_and_mark_work(void *arg)\n \t\t__atomic_fetch_add(&worker_stats[id].handled_packets, num,\n \t\t\t\t__ATOMIC_RELAXED);\n \t\tfor (i = 0; i < num; i++)\n-\t\t\tbuf[i]->udata64 += id + 1;\n+\t\t\tSEQ_FIELD(buf[i]) += id + 1;\n \t\tnum = rte_distributor_get_pkt(db, id,\n \t\t\t\tbuf, buf, num);\n \t}\n@@ -631,10 +636,10 @@ sanity_mark_test(struct worker_params *wp, struct rte_mempool *p)\n \t\t\t<< shift;\n \t}\n \t/* Assign a sequence number to each packet. The sequence is shifted,\n-\t * so that lower bits of the udate64 will hold mark from worker.\n+\t * so that lower bits will hold mark from worker.\n \t */\n \tfor (i = 0; i < buf_count; i++)\n-\t\tbufs[i]->udata64 = i << seq_shift;\n+\t\tSEQ_FIELD(bufs[i]) = i << seq_shift;\n \n \tcount = 0;\n \tfor (i = 0; i < buf_count/burst; i++) {\n@@ -660,8 +665,8 @@ sanity_mark_test(struct worker_params *wp, struct rte_mempool *p)\n \n \t/* Sort returned packets by sent order (sequence numbers). */\n \tfor (i = 0; i < buf_count; i++) {\n-\t\tseq = returns[i]->udata64 >> seq_shift;\n-\t\tid = returns[i]->udata64 - (seq << seq_shift);\n+\t\tseq = SEQ_FIELD(returns[i]) >> seq_shift;\n+\t\tid = SEQ_FIELD(returns[i]) - (seq << seq_shift);\n \t\tsorted[seq] = id;\n \t}\n \n@@ -805,6 +810,18 @@ test_distributor(void)\n \tstatic struct rte_mempool *p;\n \tint i;\n \n+\tstatic const struct rte_mbuf_dynfield seq_dynfield_desc = {\n+\t\t.name = \"test_distributor_dynfield_seq\",\n+\t\t.size = sizeof(uint32_t),\n+\t\t.align = __alignof__(uint32_t),\n+\t};\n+\tseq_dynfield_offset =\n+\t\trte_mbuf_dynfield_register(&seq_dynfield_desc);\n+\tif (seq_dynfield_offset < 0) {\n+\t\tprintf(\"Error registering mbuf field\\n\");\n+\t\treturn TEST_FAILED;\n+\t}\n+\n \tif (rte_lcore_count() < 2) {\n \t\tprintf(\"Not enough cores for distributor_autotest, expecting at least 2\\n\");\n \t\treturn TEST_SKIPPED;\n", "prefixes": [ "10/15" ] }{ "id": 82155, "url": "