get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/82625/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 82625,
    "url": "https://patches.dpdk.org/api/patches/82625/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20201028102640.3191964-13-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": "<20201028102640.3191964-13-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20201028102640.3191964-13-thomas@monjalon.net",
    "date": "2020-10-28T10:26:37",
    "name": "[v4,12/15] app/eventdev: switch flow ID to dynamic mbuf field",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "fcd03a8252952ac873de3f3c2ee5ce60ea841799",
    "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/20201028102640.3191964-13-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 13416,
            "url": "https://patches.dpdk.org/api/series/13416/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=13416",
            "date": "2020-10-28T10:26:25",
            "name": "remove mbuf userdata",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/13416/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/82625/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/82625/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 905ABA04DD;\n\tWed, 28 Oct 2020 11:30:57 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 644F4CA5D;\n\tWed, 28 Oct 2020 11:27:36 +0100 (CET)",
            "from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com\n [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 11617C9EE\n for <dev@dpdk.org>; Wed, 28 Oct 2020 11:27:27 +0100 (CET)",
            "from compute2.internal (compute2.nyi.internal [10.202.2.42])\n by mailout.nyi.internal (Postfix) with ESMTP id B8E6E5C01A3;\n Wed, 28 Oct 2020 06:27:25 -0400 (EDT)",
            "from mailfrontend1 ([10.202.2.162])\n by compute2.internal (MEProxy); Wed, 28 Oct 2020 06:27:25 -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 B842D3280060;\n Wed, 28 Oct 2020 06:27:24 -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=HhLwf0w4DGO4G\n rUYkzhR7OWJ7zfGCnjW/SYxuiDy6eY=; b=vAVC4ZVjhtZTCkU0QOSv77P4GAjAb\n xy3S5dCXcp7BY5vp3DJ2QK3o4UWqDw+fuMoOTM2/4X+JGC89yuCRFKhjqcnELQDV\n G8sprwMOY8SnU6E7231e9wwQcASOYY79JsMEf1WTBCSLHU3D5+prTBJklQ2cjo3x\n 5UYM1s3s0yJR+xhcJHlDhGEApm/QiYs/5jy2qfWv4H8YxuCNDSvI6sppBhCdIQQ8\n VsQO1CeAk+cnDrbpwF+qXPnFBL6fgp9YF7E1DgLIBe0fa65vZMpRGt40FxNlLnlY\n W5NIyRTsokRUViCvRdptMIxrfEsJXQPTRNJ8nUJqUCC/tMcr6PSjAPDgA==",
            "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=HhLwf0w4DGO4GrUYkzhR7OWJ7zfGCnjW/SYxuiDy6eY=; b=H/DubX13\n JO89iugMHwq7Zhb8SpLHKHnlU2Zjv+1wpTuhWR+UVO0k5gwjSN73E47xlRQ6IcKT\n pscoHXfMST1gTFg+gtlEdBFgjoe/vH/QOwfF5lLNZsrF3IS73h3pQ7my701tEHtY\n yc2xr69QOumrS+w0EswjcE3t9IRZIpCkn+NFW7S1hetk2Hloq0fBIaPfTboj5jjU\n 6Zy8Tr6O00fDmfCiEF3Xw+xIvjcRA6p8u8DWWs1hGmt2MH/ixaWtf9a22h4Lx5qc\n blbGGFEmTBddwWfl52TTwJOHqdVVL60uvV8vBe5lrVkT+E1FH92zV7Vtjz9LTTxo\n oL0JURj+wdV0CA=="
        ],
        "X-ME-Sender": "<xms:jUeZXw73l4WpWsdJmcbj-sAt2MrYKH7aRg88IcU5OFUrAyJAA364uA>\n <xme:jUeZXx7hiJYHNqpCvDU-Kx3L_x77WjO8EeqJm0t0rN9hggKTcwM1CV3wCWmgVM7yS\n zVW8egFiCfdlPgwRw>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedujedrledugdduhecutefuodetggdotefrodftvf\n curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu\n uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc\n fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhmrghs\n ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf\n frrghtthgvrhhnpedvhefgiedvjeegtdevheefhfetleefgfeivefgffevfeejgedtgfeu\n tdehtdegveenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih\n iivgepleenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho\n nhdrnhgvth",
        "X-ME-Proxy": "<xmx:jUeZX_clkZVaRcbnGE48o0cSlkiny0U7ROrkxEmJiEtatq2lArveFg>\n <xmx:jUeZX1KAgI2UtiUHSbNsbxvjaANnyQ7cfngxa0aFh6Ib8L5UNEgfSg>\n <xmx:jUeZX0IT3Fa2sVMQLNuY_OLXNI4KpB48en9c99O0pKafSXmuXOoiGQ>\n <xmx:jUeZX-igYnkXjSMmJs4dj09hnNdthtOFdlLB1WZUsIqtxxQX8nQl3Q>",
        "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 Jerin Jacob <jerinj@marvell.com>",
        "Date": "Wed, 28 Oct 2020 11:26:37 +0100",
        "Message-Id": "<20201028102640.3191964-13-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.28.0",
        "In-Reply-To": "<20201028102640.3191964-1-thomas@monjalon.net>",
        "References": "<20201026052105.1561859-1-thomas@monjalon.net>\n <20201028102640.3191964-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 12/15] app/eventdev: switch flow ID to dynamic\n\tmbuf 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 order test stored the flow ID 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 app/test-eventdev/test_order_atq.c    |  4 ++--\n app/test-eventdev/test_order_common.c | 21 +++++++++++++++------\n app/test-eventdev/test_order_common.h | 21 +++++++++++++++++++++\n app/test-eventdev/test_order_queue.c  |  4 ++--\n 4 files changed, 40 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/app/test-eventdev/test_order_atq.c b/app/test-eventdev/test_order_atq.c\nindex cfcb1dc4e9..71215a07b6 100644\n--- a/app/test-eventdev/test_order_atq.c\n+++ b/app/test-eventdev/test_order_atq.c\n@@ -35,7 +35,7 @@ order_atq_worker(void *arg, const bool flow_id_cap)\n \t\t}\n \n \t\tif (!flow_id_cap)\n-\t\t\tev.flow_id = ev.mbuf->udata64;\n+\t\t\torder_flow_id_copy_from_mbuf(t, &ev);\n \n \t\tif (ev.sub_event_type == 0) { /* stage 0 from producer */\n \t\t\torder_atq_process_stage_0(&ev);\n@@ -72,7 +72,7 @@ order_atq_worker_burst(void *arg, const bool flow_id_cap)\n \n \t\tfor (i = 0; i < nb_rx; i++) {\n \t\t\tif (!flow_id_cap)\n-\t\t\t\tev[i].flow_id = ev[i].mbuf->udata64;\n+\t\t\t\torder_flow_id_copy_from_mbuf(t, &ev[i]);\n \n \t\t\tif (ev[i].sub_event_type == 0) { /*stage 0 */\n \t\t\t\torder_atq_process_stage_0(&ev[i]);\ndiff --git a/app/test-eventdev/test_order_common.c b/app/test-eventdev/test_order_common.c\nindex dc55d93921..01a44bcd75 100644\n--- a/app/test-eventdev/test_order_common.c\n+++ b/app/test-eventdev/test_order_common.c\n@@ -46,13 +46,10 @@ order_producer(void *arg)\n \t\tif (m == NULL)\n \t\t\tcontinue;\n \n-\t\tconst uint32_t flow = (uintptr_t)m % nb_flows;\n+\t\tconst flow_id_t flow = (uintptr_t)m % nb_flows;\n \t\t/* Maintain seq number per flow */\n \t\tm->seqn = producer_flow_seq[flow]++;\n-\t\tm->udata64 = flow;\n-\n-\t\tev.flow_id = flow;\n-\t\tev.mbuf = m;\n+\t\torder_flow_id_save(t, flow, m, &ev);\n \n \t\twhile (rte_event_enqueue_burst(dev_id, port, &ev, 1) != 1) {\n \t\t\tif (t->err)\n@@ -138,6 +135,12 @@ int\n order_test_setup(struct evt_test *test, struct evt_options *opt)\n {\n \tvoid *test_order;\n+\tstruct test_order *t;\n+\tstatic const struct rte_mbuf_dynfield flow_id_dynfield_desc = {\n+\t\t.name = \"test_event_dynfield_flow_id\",\n+\t\t.size = sizeof(flow_id_t),\n+\t\t.align = __alignof__(flow_id_t),\n+\t};\n \n \ttest_order = rte_zmalloc_socket(test->name, sizeof(struct test_order),\n \t\t\t\tRTE_CACHE_LINE_SIZE, opt->socket_id);\n@@ -146,8 +149,14 @@ order_test_setup(struct evt_test *test, struct evt_options *opt)\n \t\tgoto nomem;\n \t}\n \ttest->test_priv = test_order;\n+\tt = evt_test_priv(test);\n \n-\tstruct test_order *t = evt_test_priv(test);\n+\tt->flow_id_dynfield_offset =\n+\t\trte_mbuf_dynfield_register(&flow_id_dynfield_desc);\n+\tif (t->flow_id_dynfield_offset < 0) {\n+\t\tevt_err(\"failed to register mbuf field\");\n+\t\treturn -rte_errno;\n+\t}\n \n \tt->producer_flow_seq = rte_zmalloc_socket(\"test_producer_flow_seq\",\n \t\t\t\t sizeof(*t->producer_flow_seq) * opt->nb_flows,\ndiff --git a/app/test-eventdev/test_order_common.h b/app/test-eventdev/test_order_common.h\nindex e0fe9c968a..90eac96fc8 100644\n--- a/app/test-eventdev/test_order_common.h\n+++ b/app/test-eventdev/test_order_common.h\n@@ -13,6 +13,7 @@\n #include <rte_lcore.h>\n #include <rte_malloc.h>\n #include <rte_mbuf.h>\n+#include <rte_mbuf_dyn.h>\n \n #include \"evt_common.h\"\n #include \"evt_options.h\"\n@@ -20,6 +21,8 @@\n \n #define BURST_SIZE 16\n \n+typedef uint32_t flow_id_t;\n+\n struct test_order;\n \n struct worker_data {\n@@ -49,6 +52,7 @@ struct test_order {\n \tuint32_t nb_flows;\n \tuint64_t nb_pkts;\n \tstruct rte_mempool *pool;\n+\tint flow_id_dynfield_offset;\n \tstruct prod_data prod;\n \tstruct worker_data worker[EVT_MAX_PORTS];\n \tuint32_t *producer_flow_seq;\n@@ -56,6 +60,23 @@ struct test_order {\n \tstruct evt_options *opt;\n } __rte_cache_aligned;\n \n+static inline void\n+order_flow_id_copy_from_mbuf(struct test_order *t, struct rte_event *event)\n+{\n+\tevent->flow_id = *RTE_MBUF_DYNFIELD(event->mbuf,\n+\t\t\tt->flow_id_dynfield_offset, flow_id_t *);\n+}\n+\n+static inline void\n+order_flow_id_save(struct test_order *t, flow_id_t flow_id,\n+\t\tstruct rte_mbuf *mbuf, struct rte_event *event)\n+{\n+\t*RTE_MBUF_DYNFIELD(mbuf,\n+\t\t\tt->flow_id_dynfield_offset, flow_id_t *) = flow_id;\n+\tevent->flow_id = flow_id;\n+\tevent->mbuf = mbuf;\n+}\n+\n static inline int\n order_nb_event_ports(struct evt_options *opt)\n {\ndiff --git a/app/test-eventdev/test_order_queue.c b/app/test-eventdev/test_order_queue.c\nindex 1511c0092d..621367805a 100644\n--- a/app/test-eventdev/test_order_queue.c\n+++ b/app/test-eventdev/test_order_queue.c\n@@ -35,7 +35,7 @@ order_queue_worker(void *arg, const bool flow_id_cap)\n \t\t}\n \n \t\tif (!flow_id_cap)\n-\t\t\tev.flow_id = ev.mbuf->udata64;\n+\t\t\torder_flow_id_copy_from_mbuf(t, &ev);\n \n \t\tif (ev.queue_id == 0) { /* from ordered queue */\n \t\t\torder_queue_process_stage_0(&ev);\n@@ -73,7 +73,7 @@ order_queue_worker_burst(void *arg, const bool flow_id_cap)\n \t\tfor (i = 0; i < nb_rx; i++) {\n \n \t\t\tif (!flow_id_cap)\n-\t\t\t\tev[i].flow_id = ev[i].mbuf->udata64;\n+\t\t\t\torder_flow_id_copy_from_mbuf(t, &ev[i]);\n \n \t\t\tif (ev[i].queue_id == 0) { /* from ordered queue */\n \t\t\t\torder_queue_process_stage_0(&ev[i]);\n",
    "prefixes": [
        "v4",
        "12/15"
    ]
}