get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68555,
    "url": "https://patches.dpdk.org/api/patches/68555/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.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": "<47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com",
    "date": "2020-04-15T13:48:44",
    "name": "[RFC] app/testpmd: add generic swap forwarding engine",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "1ed7763f73a35b83e842892872bfb1160c2bd530",
    "submitter": {
        "id": 1065,
        "url": "https://patches.dpdk.org/api/people/1065/?format=api",
        "name": "Xiaoyu Min",
        "email": "jackmin@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com/mbox/",
    "series": [
        {
            "id": 9395,
            "url": "https://patches.dpdk.org/api/series/9395/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9395",
            "date": "2020-04-15T13:48:44",
            "name": "[RFC] app/testpmd: add generic swap forwarding engine",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/9395/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/68555/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/68555/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 11917A0563;\n\tWed, 15 Apr 2020 15:48:49 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 32A261D725;\n\tWed, 15 Apr 2020 15:48:49 +0200 (CEST)",
            "from git-send-mailer.rdmz.labs.mlnx (unknown [37.142.13.130])\n by dpdk.org (Postfix) with ESMTP id 5B47E1D723\n for <dev@dpdk.org>; Wed, 15 Apr 2020 15:48:48 +0200 (CEST)"
        ],
        "From": "Xiaoyu Min <jackmin@mellanox.com>",
        "To": "thomas@monjalon.net, asafp@mellanox.com,\n Wenzhuo Lu <wenzhuo.lu@intel.com>,\n Jingjing Wu <jingjing.wu@intel.com>,\n Bernard Iremonger <bernard.iremonger@intel.com>,\n John McNamara <john.mcnamara@intel.com>,\n Marko Kovacevic <marko.kovacevic@intel.com>",
        "Cc": "dev@dpdk.org",
        "Date": "Wed, 15 Apr 2020 16:48:44 +0300",
        "Message-Id": "\n <47cf5b417fb3c74c04e5a020dba700c5d748383d.1586958002.git.jackmin@mellanox.com>",
        "X-Mailer": "git-send-email 2.21.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC] app/testpmd: add generic swap forwarding engine",
        "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": "This RFC propose a generic `swap` forwarding engine, which could be seen\nas an extension of existing `macswap` but provide more flexibility.\n\nWith this generic `swap` forwarding engine, we can `swap` the source and\ndestination of L2/L3 address as well as the source and destination port\nof L4 according to the user inputs.\n\nThis will be very helpful for developer/tester in some test scenarios.\nFor example, connection tracking functinality in OVS, which needs to\nswap UDP ports in addition to L2/L3 addresses in order to complete one\nconnection.\n\nSigned-off-by: Xiaoyu Min <jackmin@mellanox.com>\n---\n app/test-pmd/parameters.c                   |  2 ++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++++++++++++++-\n 2 files changed, 16 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c\nindex 404dba2b20..5c9aecd6cb 100644\n--- a/app/test-pmd/parameters.c\n+++ b/app/test-pmd/parameters.c\n@@ -147,6 +147,8 @@ usage(char* progname)\n \t       \"is default).\\n\");\n \tprintf(\"  --forward-mode=N: set forwarding mode (N: %s).\\n\",\n \t       list_pkt_forwarding_modes());\n+\tprintf(\"  --forward-mode=swap[:TYPE[,TYPE]]: set forwarding mode to swap \"\n+\t       \"(TYPE: auto (default) or mac or ip or tp).\\n\");\n \tprintf(\"  --rss-ip: set RSS functions to IPv4/IPv6 only .\\n\");\n \tprintf(\"  --rss-udp: set RSS functions to IPv4/IPv6 + UDP.\\n\");\n \tprintf(\"  --rxq=N: set the number of RX queues per port to N.\\n\");\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex dcee5de455..27f0600493 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -298,7 +298,7 @@ set fwd\n Set the packet forwarding mode::\n \n    testpmd> set fwd (io|mac|macswap|flowgen| \\\n-                     rxonly|txonly|csum|icmpecho|noisy) (\"\"|retry)\n+                     rxonly|txonly|csum|icmpecho|noisy|swap) (\"\"|retry)\n \n ``retry`` can be specified for forwarding engines except ``rx_only``.\n \n@@ -336,6 +336,19 @@ The available information categories are:\n   Simulate more realistic behavior of a guest machine engaged in receiving\n   and sending packets performing Virtual Network Function (VNF).\n \n+* ``swap[:TYPE[,TYPE]*]``: Generic swap forwarding mode.\n+ \n+  Swap the source and destination address or/and source and destination port of packet according to ``TYPE`` before forwarding them.\n+  ``TYPE`` could be:\n+\n+  - ``auto``: swaps all supported fields (L2 to L4) if available, default.\n+ \n+  - ``mac``: swaps the source address and destination address of Ethernet, as same as ``macswap``.\n+ \n+  - ``ip``: swaps the source address and destination address of IP (v4 and v6).\n+ \n+  - ``tp``: swaps the source port and destination port of transport layer (TCP and UDP).\n+\n Example::\n \n    testpmd> set fwd rxonly\n",
    "prefixes": [
        "RFC"
    ]
}