Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/96336/?format=api
http://patches.dpdk.org/api/patches/96336/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210727174340.2125-1-cristian.dumitrescu@intel.com/", "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": "<20210727174340.2125-1-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20210727174340.2125-1-cristian.dumitrescu@intel.com", "date": "2021-07-27T17:43:36", "name": "[V2,1/5] pipeline: prepare for variable size headers", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "98fce56fe9b9057baf163c12306f5a309faf37dd", "submitter": { "id": 19, "url": "http://patches.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "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/20210727174340.2125-1-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 18023, "url": "http://patches.dpdk.org/api/series/18023/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18023", "date": "2021-07-27T17:43:37", "name": "[V2,1/5] pipeline: prepare for variable size headers", "version": 2, "mbox": "http://patches.dpdk.org/series/18023/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/96336/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/96336/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 314B5A0C55;\n\tTue, 27 Jul 2021 19:43:56 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 20684410FD;\n\tTue, 27 Jul 2021 19:43:51 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 26D29410F0\n for <dev@dpdk.org>; Tue, 27 Jul 2021 19:43:48 +0200 (CEST)", "from fmsmga002.fm.intel.com ([10.253.24.26])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 27 Jul 2021 10:43:41 -0700", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by fmsmga002.fm.intel.com with ESMTP; 27 Jul 2021 10:43:40 -0700" ], "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10058\"; a=\"199677779\"", "E=Sophos;i=\"5.84,274,1620716400\"; d=\"scan'208\";a=\"199677779\"", "E=Sophos;i=\"5.84,274,1620716400\"; d=\"scan'208\";a=\"517040381\"" ], "X-ExtLoop1": "1", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Date": "Tue, 27 Jul 2021 18:43:36 +0100", "Message-Id": "<20210727174340.2125-1-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210727163609.97769-1-cristian.dumitrescu@intel.com>", "References": "<20210727163609.97769-1-cristian.dumitrescu@intel.com>", "Subject": "[dpdk-dev] [PATCH V2 1/5] pipeline: prepare for variable size\n headers", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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 emit instruction that is responsible for pushing headers into the\noutput packet is now reading the header length from internal run-time\nstructures as opposed to constant value from the instruction opcode.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n lib/pipeline/rte_swx_pipeline.c | 14 ++++++++++----\n 1 file changed, 10 insertions(+), 4 deletions(-)", "diff": "diff --git a/lib/pipeline/rte_swx_pipeline.c b/lib/pipeline/rte_swx_pipeline.c\nindex 84505e2a45..2f5cfacd85 100644\n--- a/lib/pipeline/rte_swx_pipeline.c\n+++ b/lib/pipeline/rte_swx_pipeline.c\n@@ -251,6 +251,7 @@ TAILQ_HEAD(header_tailq, header);\n \n struct header_runtime {\n \tuint8_t *ptr0;\n+\tuint32_t n_bytes;\n };\n \n struct header_out_runtime {\n@@ -2522,11 +2523,14 @@ header_build(struct rte_swx_pipeline *p)\n \n \t\tTAILQ_FOREACH(h, &p->headers, node) {\n \t\t\tuint8_t *header_storage;\n+\t\t\tuint32_t n_bytes = h->st->n_bits / 8;\n \n \t\t\theader_storage = &t->header_storage[offset];\n-\t\t\toffset += h->st->n_bits / 8;\n+\t\t\toffset += n_bytes;\n \n \t\t\tt->headers[h->id].ptr0 = header_storage;\n+\t\t\tt->headers[h->id].n_bytes = n_bytes;\n+\n \t\t\tt->structs[h->struct_id] = header_storage;\n \t\t}\n \t}\n@@ -3262,9 +3266,11 @@ __instr_hdr_emit_exec(struct rte_swx_pipeline *p, uint32_t n_emit)\n \tfor (i = 0; i < n_emit; i++) {\n \t\tuint32_t header_id = ip->io.hdr.header_id[i];\n \t\tuint32_t struct_id = ip->io.hdr.struct_id[i];\n-\t\tuint32_t n_bytes = ip->io.hdr.n_bytes[i];\n \n \t\tstruct header_runtime *hi = &t->headers[header_id];\n+\t\tuint8_t *hi_ptr0 = hi->ptr0;\n+\t\tuint32_t n_bytes = hi->n_bytes;\n+\n \t\tuint8_t *hi_ptr = t->structs[struct_id];\n \n \t\tif (!MASK64_BIT_GET(valid_headers, header_id))\n@@ -3281,7 +3287,7 @@ __instr_hdr_emit_exec(struct rte_swx_pipeline *p, uint32_t n_emit)\n \t\t\tif (!t->n_headers_out) {\n \t\t\t\tho = &t->headers_out[0];\n \n-\t\t\t\tho->ptr0 = hi->ptr0;\n+\t\t\t\tho->ptr0 = hi_ptr0;\n \t\t\t\tho->ptr = hi_ptr;\n \n \t\t\t\tho_ptr = hi_ptr;\n@@ -3302,7 +3308,7 @@ __instr_hdr_emit_exec(struct rte_swx_pipeline *p, uint32_t n_emit)\n \t\t\tho->n_bytes = ho_nbytes;\n \n \t\t\tho++;\n-\t\t\tho->ptr0 = hi->ptr0;\n+\t\t\tho->ptr0 = hi_ptr0;\n \t\t\tho->ptr = hi_ptr;\n \n \t\t\tho_ptr = hi_ptr;\n", "prefixes": [ "V2", "1/5" ] }{ "id": 96336, "url": "