Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136648/?format=api
http://patchwork.dpdk.org/api/patches/136648/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20240213165737.1534180-4-cristian.dumitrescu@intel.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20240213165737.1534180-4-cristian.dumitrescu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240213165737.1534180-4-cristian.dumitrescu@intel.com", "date": "2024-02-13T16:57:37", "name": "[3/3] examples/pipeline: add example for IPv6 address swap", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "5f8d06aacf8ffb06b3ebbec1bad5d0f5e2dabef7", "submitter": { "id": 19, "url": "http://patchwork.dpdk.org/api/people/19/?format=api", "name": "Cristian Dumitrescu", "email": "cristian.dumitrescu@intel.com" }, "delegate": { "id": 1, "url": "http://patchwork.dpdk.org/api/users/1/?format=api", "username": "tmonjalo", "first_name": "Thomas", "last_name": "Monjalon", "email": "thomas@monjalon.net" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20240213165737.1534180-4-cristian.dumitrescu@intel.com/mbox/", "series": [ { "id": 31092, "url": "http://patchwork.dpdk.org/api/series/31092/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=31092", "date": "2024-02-13T16:57:36", "name": "pipeline: extend the IPv6 support", "version": 1, "mbox": "http://patchwork.dpdk.org/series/31092/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/136648/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/136648/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 AC44743B0C;\n\tTue, 13 Feb 2024 17:58:52 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 22BE742E17;\n\tTue, 13 Feb 2024 17:58:50 +0100 (CET)", "from mgamail.intel.com (mgamail.intel.com [198.175.65.17])\n by mails.dpdk.org (Postfix) with ESMTP id DC93D42E0C\n for <dev@dpdk.org>; Tue, 13 Feb 2024 17:58:46 +0100 (CET)", "from fmviesa007.fm.intel.com ([10.60.135.147])\n by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Feb 2024 08:57:41 -0800", "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.184])\n by fmviesa007.fm.intel.com with ESMTP; 13 Feb 2024 08:57:41 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1707843527; x=1739379527;\n h=from:to:subject:date:message-id:in-reply-to:references:\n mime-version:content-transfer-encoding;\n bh=/l0n/L5llVkSlKWeij28Iq4THUaw0tbbb8J1j3ujWjc=;\n b=j3sq57OuMN/ptsvp3rEM+A5hbGQzasD++0o0eUcVuU75oJcbQQR/thTS\n LE332S35x6lpW1CZwXG9AYcysJW8BSaGvAGsRXDCbcAf6oj7uzmy4ydQt\n h014u1oGWUo815GgEZzWQDi7VUB22jzU+IPzNHPrWOnvxOJDSW0UNqEUk\n 3RFniF/QFx4ev2I5To2Gxcm61ZAkgfWFm9AbU7xp6m7JtwIYZIuvW7asa\n JxpFAF0MZ1xY3XBaDIIzMGzf2+cqzsT3A78bZ/CTTS0MmzMFkbZKBJrX+\n qM6tCS79OgrTTs+ESAP+sSBCBwcMsq1kfd/PmpV+TG45b0Dm4/Um+IK19 w==;", "X-IronPort-AV": [ "E=McAfee;i=\"6600,9927,10982\"; a=\"2000500\"", "E=Sophos;i=\"6.06,157,1705392000\";\n d=\"scan'208\";a=\"2000500\"", "E=Sophos;i=\"6.06,157,1705392000\";\n d=\"scan'208\";a=\"2855757\"" ], "X-ExtLoop1": "1", "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>", "To": "dev@dpdk.org", "Subject": "[PATCH 3/3] examples/pipeline: add example for IPv6 address swap", "Date": "Tue, 13 Feb 2024 16:57:37 +0000", "Message-Id": "<20240213165737.1534180-4-cristian.dumitrescu@intel.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20240213165737.1534180-1-cristian.dumitrescu@intel.com>", "References": "<20240213165737.1534180-1-cristian.dumitrescu@intel.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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" }, "content": "Add example for swapping the two halves of the IPv6 source address.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n examples/pipeline/examples/ipv6_addr_swap.cli | 35 ++++++++\n .../pipeline/examples/ipv6_addr_swap.spec | 83 +++++++++++++++++++\n 2 files changed, 118 insertions(+)\n create mode 100644 examples/pipeline/examples/ipv6_addr_swap.cli\n create mode 100644 examples/pipeline/examples/ipv6_addr_swap.spec", "diff": "diff --git a/examples/pipeline/examples/ipv6_addr_swap.cli b/examples/pipeline/examples/ipv6_addr_swap.cli\nnew file mode 100644\nindex 0000000000..a8c9c77e00\n--- /dev/null\n+++ b/examples/pipeline/examples/ipv6_addr_swap.cli\n@@ -0,0 +1,35 @@\n+; SPDX-License-Identifier: BSD-3-Clause\n+; Copyright(c) 2022 Intel Corporation\n+\n+# Example command line:\n+#\t./build/examples/dpdk-pipeline -l0-1 -- -s ./examples/pipeline/examples/ipv6_addr_swap.cli\n+#\n+# Once the application has started, the command to get the CLI prompt is:\n+#\ttelnet 0.0.0.0 8086\n+\n+;\n+; Pipeline code generation & shared object library build.\n+;\n+pipeline codegen ./examples/pipeline/examples/ipv6_addr_swap.spec /tmp/ipv6_addr_swap.c\n+pipeline libbuild /tmp/ipv6_addr_swap.c /tmp/ipv6_addr_swap.so\n+\n+;\n+; List of DPDK devices.\n+;\n+; Note: Customize the parameters below to match your setup.\n+;\n+mempool MEMPOOL0 meta 0 pkt 2176 pool 32K cache 256 numa 0\n+ethdev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+ethdev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+ethdev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+ethdev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+\n+;\n+; List of pipelines.\n+;\n+pipeline PIPELINE0 build lib /tmp/ipv6_addr_swap.so io ./examples/pipeline/examples/ethdev.io numa 0\n+\n+;\n+; Pipelines-to-threads mapping.\n+;\n+pipeline PIPELINE0 enable thread 1\ndiff --git a/examples/pipeline/examples/ipv6_addr_swap.spec b/examples/pipeline/examples/ipv6_addr_swap.spec\nnew file mode 100644\nindex 0000000000..42f8216463\n--- /dev/null\n+++ b/examples/pipeline/examples/ipv6_addr_swap.spec\n@@ -0,0 +1,83 @@\n+; SPDX-License-Identifier: BSD-3-Clause\n+; Copyright(c) 2022 Intel Corporation\n+\n+; This simple example swaps the two halves of the IPv6 source address.\n+;\n+; It demonstrates how to operate with 128-bit fields (used to represent IPv6 addresses) by using\n+; 64-bit operations.\n+;\n+; Notes:\n+;\n+; 1. The 128-bit fields are always stored in network byte order (NBO), even when these fields are\n+; meta-data fields, so the instructions like \"mov\" or \"movh\" that accept a 128-bit operand and\n+; a 64-bit (or lesser size) operand require the latter to be also stored in NBO, i.e. it must\n+; be a header field. Hence, the 64-bit upper_half and lower_half fields below are stored in a\n+; header, and not in meta-data.\n+;\n+; 2. To write a IPv6 address, the lower half (bits 63-0) must be written first using the mov\n+; instruction, as it also fills the upper half (bits 127-64) with zeros, and then the upper\n+; half must me written using the movh instruction, as the movh instruction does not change the\n+; lower half.\n+\n+//\n+// Headers.\n+//\n+struct ethernet_h {\n+\tbit<48> dst_addr\n+\tbit<48> src_addr\n+\tbit<16> ethertype\n+}\n+\n+struct ipv6_h {\n+\tbit<32> version_traffic_class_flow_label\n+\tbit<16> payload_length\n+\tbit<8> next_header\n+\tbit<8> hop_limit\n+\tbit<128> src_addr\n+\tbit<128> dst_addr\n+}\n+\n+struct sandbox_h {\n+\tbit<64> upper_half\n+\tbit<64> lower_half\n+}\n+\n+header ethernet instanceof ethernet_h\n+header ipv6 instanceof ipv6_h\n+header tmp instanceof sandbox_h\n+\n+//\n+// Meta-data.\n+//\n+struct metadata_t {\n+\tbit<32> port\n+}\n+\n+metadata instanceof metadata_t\n+\n+//\n+// Pipeline.\n+//\n+apply {\n+\t//\n+\t// RX and parse.\n+\t//\n+\trx m.port\n+\textract h.ethernet\n+\textract h.ipv6\n+\n+\t//\n+\t// Swap the two halves of the IPv6 source address.\n+\t//\n+\tmovh h.tmp.upper_half h.ipv6.src_addr\n+\tmov h.tmp.lower_half h.ipv6.src_addr\n+\tmov h.ipv6.src_addr h.tmp.upper_half\n+\tmovh h.ipv6.src_addr h.tmp.lower_half\n+\n+\t//\n+\t// De-parse and TX.\n+\t//\n+\temit h.ethernet\n+\temit h.ipv6\n+\ttx m.port\n+}\n", "prefixes": [ "3/3" ] }{ "id": 136648, "url": "