get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 109342,
    "url": "https://patches.dpdk.org/api/patches/109342/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220406184836.72784-4-cristian.dumitrescu@intel.com/",
    "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": "<20220406184836.72784-4-cristian.dumitrescu@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220406184836.72784-4-cristian.dumitrescu@intel.com",
    "date": "2022-04-06T18:48:34",
    "name": "[V4,4/6] examples/pipeline: add packet mirroring example",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "59f5411c4d7c188163c3b6a5b896841e662b83ee",
    "submitter": {
        "id": 19,
        "url": "https://patches.dpdk.org/api/people/19/?format=api",
        "name": "Cristian Dumitrescu",
        "email": "cristian.dumitrescu@intel.com"
    },
    "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/20220406184836.72784-4-cristian.dumitrescu@intel.com/mbox/",
    "series": [
        {
            "id": 22385,
            "url": "https://patches.dpdk.org/api/series/22385/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22385",
            "date": "2022-04-06T18:48:31",
            "name": "[V4,1/6] port: support packet mirroring",
            "version": 4,
            "mbox": "https://patches.dpdk.org/series/22385/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/109342/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/109342/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 7CA47A0509;\n\tWed,  6 Apr 2022 20:49:02 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2A5B04286C;\n\tWed,  6 Apr 2022 20:48:46 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id 28A6042852\n for <dev@dpdk.org>; Wed,  6 Apr 2022 20:48:42 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 11:48:40 -0700",
            "from silpixa00400573.ir.intel.com (HELO\n silpixa00400573.ger.corp.intel.com) ([10.237.223.107])\n by FMSMGA003.fm.intel.com with ESMTP; 06 Apr 2022 11:48:40 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1649270922; x=1680806922;\n h=from:to:subject:date:message-id:in-reply-to:references;\n bh=U4Qlg0IWYbEdx/jU7CD9AxbwIaIdcPIzbDwiHRBva0k=;\n b=k6CfUAdzk1z32hZcbLhkFFq4RCUNS359TF9/yStHVWkOZiOpqPR6Kz7z\n JTtTKNx3rK8DmJotFDk1KJjEVMdCMfN0fAxYaFUEMG8uy5vGT5y7tTUe2\n cDeuAc9gkatoFEShLlYAwt9IyZ+q026h8hihsx/aew49XdWbDezIRqSW3\n r7Fbf2wMzKxUgjlKbFpc52Cv79m7oQ2REXYvfS4s16fH/3VZb7ei51dvN\n RZkzNJUXQuUKPPGxFwOuhlh1T+CQrz+MgkonvOqwFKCpH4BxFNXE3stOV\n +RjQXI4KW2trUNhXN7PsU2TxPY8B2VdwtwmmKwIYT0dZxdN1K1IPwA2fK Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10309\"; a=\"261121845\"",
            "E=Sophos;i=\"5.90,240,1643702400\"; d=\"scan'208\";a=\"261121845\"",
            "E=Sophos;i=\"5.90,240,1643702400\"; d=\"scan'208\";a=\"642173087\""
        ],
        "X-ExtLoop1": "1",
        "From": "Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "To": "dev@dpdk.org",
        "Subject": "[PATCH V4 4/6] examples/pipeline: add packet mirroring example",
        "Date": "Wed,  6 Apr 2022 19:48:34 +0100",
        "Message-Id": "<20220406184836.72784-4-cristian.dumitrescu@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20220406184836.72784-1-cristian.dumitrescu@intel.com>",
        "References": "<20220405213632.48028-1-cristian.dumitrescu@intel.com>\n <20220406184836.72784-1-cristian.dumitrescu@intel.com>",
        "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 program to illustrate packet mirroring.\n\nSigned-off-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>\n---\n examples/pipeline/examples/mirroring.cli  | 43 ++++++++++++\n examples/pipeline/examples/mirroring.spec | 80 +++++++++++++++++++++++\n 2 files changed, 123 insertions(+)\n create mode 100644 examples/pipeline/examples/mirroring.cli\n create mode 100644 examples/pipeline/examples/mirroring.spec",
    "diff": "diff --git a/examples/pipeline/examples/mirroring.cli b/examples/pipeline/examples/mirroring.cli\nnew file mode 100644\nindex 0000000000..46d57db4ec\n--- /dev/null\n+++ b/examples/pipeline/examples/mirroring.cli\n@@ -0,0 +1,43 @@\n+; SPDX-License-Identifier: BSD-3-Clause\n+; Copyright(c) 2022 Intel Corporation\n+\n+;\n+; Customize the LINK parameters to match your setup.\n+;\n+mempool MEMPOOL0 buffer 2304 pool 32K cache 256 cpu 0\n+\n+link LINK0 dev 0000:18:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+link LINK1 dev 0000:18:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+link LINK2 dev 0000:3b:00.0 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+link LINK3 dev 0000:3b:00.1 rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on\n+\n+;\n+; PIPELINE0 setup.\n+;\n+pipeline PIPELINE0 create 0\n+pipeline PIPELINE0 mirror slots 4 sessions 16\n+\n+pipeline PIPELINE0 port in 0 link LINK0 rxq 0 bsz 32\n+pipeline PIPELINE0 port in 1 link LINK1 rxq 0 bsz 32\n+pipeline PIPELINE0 port in 2 link LINK2 rxq 0 bsz 32\n+pipeline PIPELINE0 port in 3 link LINK3 rxq 0 bsz 32\n+\n+pipeline PIPELINE0 port out 0 link LINK0 txq 0 bsz 32\n+pipeline PIPELINE0 port out 1 link LINK1 txq 0 bsz 32\n+pipeline PIPELINE0 port out 2 link LINK2 txq 0 bsz 32\n+pipeline PIPELINE0 port out 3 link LINK3 txq 0 bsz 32\n+\n+pipeline PIPELINE0 build ./examples/pipeline/examples/mirroring.spec\n+\n+;\n+; Packet mirroring sessions.\n+;\n+pipeline PIPELINE0 mirror session 0 port 1 clone fast truncate 0\n+pipeline PIPELINE0 mirror session 1 port 2 clone slow truncate 0\n+pipeline PIPELINE0 mirror session 2 port 3 clone slow truncate 64\n+pipeline PIPELINE0 mirror session 3 port 0 clone slow truncate 128\n+\n+;\n+; Pipelines-to-threads mapping.\n+;\n+thread 1 pipeline PIPELINE0 enable\ndiff --git a/examples/pipeline/examples/mirroring.spec b/examples/pipeline/examples/mirroring.spec\nnew file mode 100644\nindex 0000000000..faf5d60e96\n--- /dev/null\n+++ b/examples/pipeline/examples/mirroring.spec\n@@ -0,0 +1,80 @@\n+; SPDX-License-Identifier: BSD-3-Clause\n+; Copyright(c) 2022 Intel Corporation\n+\n+; This simple example illustrates how to perform packet mirroring. The \"mirror\" instruction is used\n+; to flag the current packet for mirroring, which means that at TX time, before the current packet\n+; is sent out, it will first be cloned (using either the fast or the slow/deep cloning method) and\n+; the clone packet sent out on the output port specified by the mirror session.\n+;\n+; In this example, the UDP packets with destination port 5000 are mirrored to the output port\n+; specified by the mirror session 0, while the rest of the packets are not mirrored. Therefore, for\n+; every UDP input packet with this specific destination port there will be two output packets (the\n+; current packet and its clone packet), while for every other input packet there will be a single\n+; output packet.\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 ipv4_h {\n+\tbit<8> ver_ihl\n+\tbit<8> diffserv\n+\tbit<16> total_len\n+\tbit<16> identification\n+\tbit<16> flags_offset\n+\tbit<8> ttl\n+\tbit<8> protocol\n+\tbit<16> hdr_checksum\n+\tbit<32> src_addr\n+\tbit<32> dst_addr\n+}\n+\n+struct udp_h {\n+\tbit<16> src_port\n+\tbit<16> dst_port\n+\tbit<16> length\n+\tbit<16> checksum\n+}\n+\n+header ethernet instanceof ethernet_h\n+header ipv4 instanceof ipv4_h\n+header udp instanceof udp_h\n+\n+//\n+// Meta-data.\n+//\n+struct metadata_t {\n+\tbit<32> port\n+\tbit<32> mirror_slot\n+\tbit<32> mirror_session\n+}\n+\n+metadata instanceof metadata_t\n+\n+//\n+// Pipeline.\n+//\n+apply {\n+\trx m.port\n+\textract h.ethernet\n+\textract h.ipv4\n+\textract h.udp\n+\n+\t//\n+\t// Mark for mirroring all packets with UDP destination port of 5000.\n+\t//\n+\tMIRROR_UDP_DST_PORT_5000 : jmpneq EMIT h.udp.dst_port 5000\n+\tmov m.mirror_slot 0\n+\tmov m.mirror_session 0\n+\tmirror m.mirror_slot m.mirror_session\n+\n+\tEMIT : emit h.ethernet\n+\temit h.ipv4\n+\temit h.udp\n+\ttx m.port\n+}\n",
    "prefixes": [
        "V4",
        "4/6"
    ]
}