get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 100925,
    "url": "http://patches.dpdk.org/api/patches/100925/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211010000503.28712-3-ivan.malov@oktetlabs.ru/",
    "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": "<20211010000503.28712-3-ivan.malov@oktetlabs.ru>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211010000503.28712-3-ivan.malov@oktetlabs.ru",
    "date": "2021-10-10T00:04:53",
    "name": "[v2,02/12] ethdev: add represented port item to flow API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bfe490b2d4b68a00fcc19cb7231e3751d53bdc25",
    "submitter": {
        "id": 869,
        "url": "http://patches.dpdk.org/api/people/869/?format=api",
        "name": "Ivan Malov",
        "email": "Ivan.Malov@oktetlabs.ru"
    },
    "delegate": {
        "id": 319,
        "url": "http://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211010000503.28712-3-ivan.malov@oktetlabs.ru/mbox/",
    "series": [
        {
            "id": 19488,
            "url": "http://patches.dpdk.org/api/series/19488/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19488",
            "date": "2021-10-10T00:04:51",
            "name": "ethdev: rework transfer flow API",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/19488/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/100925/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/100925/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 431F1A0C41;\n\tSun, 10 Oct 2021 02:05:33 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9FDE0410E1;\n\tSun, 10 Oct 2021 02:05:24 +0200 (CEST)",
            "from shelob.oktetlabs.ru (unknown [91.220.146.113])\n by mails.dpdk.org (Postfix) with ESMTP id 570894003C\n for <dev@dpdk.org>; Sun, 10 Oct 2021 02:05:18 +0200 (CEST)",
            "from localhost.localdomain (unknown [5.144.122.166])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by shelob.oktetlabs.ru (Postfix) with ESMTPSA id C43AF7F6BF;\n Sun, 10 Oct 2021 03:05:11 +0300 (MSK)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru C43AF7F6BF",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru;\n s=default; t=1633824311;\n bh=hZddYs0eNLnZUwkPj8JAaysH58Bzzb0pRF9KuZf0gNQ=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References;\n b=AfNjnbAobLeMuh3IwI0g9BStgd1tRjVDbHAW4pZ71VnJGecZC3FYkf4peQL5dk8F9\n dWYJuiUyz2v/VYfQY194vJgsmdrAbZr7lqiVkYxggWzLoj2hnKvKDL/+TLVb+5SxIj\n czHeUqgQs2LWK3AhS2eQDVjUbilgcTmG4MWlxTT4=",
        "From": "Ivan Malov <ivan.malov@oktetlabs.ru>",
        "To": "dev@dpdk.org",
        "Cc": "Thomas Monjalon <thomas@monjalon.net>, Ori Kam <orika@nvidia.com>,\n Xiaoyun Li <xiaoyun.li@intel.com>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Date": "Sun, 10 Oct 2021 03:04:53 +0300",
        "Message-Id": "<20211010000503.28712-3-ivan.malov@oktetlabs.ru>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20211010000503.28712-1-ivan.malov@oktetlabs.ru>",
        "References": "<20211001134716.1608857-1-andrew.rybchenko@oktetlabs.ru>\n <20211010000503.28712-1-ivan.malov@oktetlabs.ru>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v2 02/12] ethdev: add represented port item to\n flow API",
        "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": "For use in \"transfer\" flows. Supposed to match traffic entering the\nembedded switch from the entity represented by the given ethdev.\nSuch an entity can be a network (via a network port), a guest\nmachine (via a VF) or another ethdev in the same application.\n\nMust not be combined with direction attributes.\n\nSigned-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>\n---\n app/test-pmd/cmdline_flow.c                 | 25 +++++++++++\n doc/guides/prog_guide/rte_flow.rst          | 46 +++++++++++++++++++++\n doc/guides/rel_notes/release_21_11.rst      |  2 +-\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  5 +++\n lib/ethdev/rte_flow.c                       |  1 +\n lib/ethdev/rte_flow.h                       | 13 +++++-\n 6 files changed, 90 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex a912a8d815..68698d805d 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -308,6 +308,8 @@ enum index {\n \tITEM_POL_POLICY,\n \tITEM_PORT_REPRESENTOR,\n \tITEM_PORT_REPRESENTOR_PORT_ID,\n+\tITEM_REPRESENTED_PORT,\n+\tITEM_REPRESENTED_PORT_ETHDEV_PORT_ID,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -1003,6 +1005,7 @@ static const enum index next_item[] = {\n \tITEM_INTEGRITY,\n \tITEM_CONNTRACK,\n \tITEM_PORT_REPRESENTOR,\n+\tITEM_REPRESENTED_PORT,\n \tEND_SET,\n \tZERO,\n };\n@@ -1377,6 +1380,12 @@ static const enum index item_port_representor[] = {\n \tZERO,\n };\n \n+static const enum index item_represented_port[] = {\n+\tITEM_REPRESENTED_PORT_ETHDEV_PORT_ID,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -3632,6 +3641,21 @@ static const struct token token_list[] = {\n \t\t\t     item_param),\n \t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ethdev, port_id)),\n \t},\n+\t[ITEM_REPRESENTED_PORT] = {\n+\t\t.name = \"represented_port\",\n+\t\t.help = \"match traffic entering the embedded switch from the entity represented by the given ethdev\",\n+\t\t.priv = PRIV_ITEM(REPRESENTED_PORT,\n+\t\t\t\t  sizeof(struct rte_flow_item_ethdev)),\n+\t\t.next = NEXT(item_represented_port),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_REPRESENTED_PORT_ETHDEV_PORT_ID] = {\n+\t\t.name = \"ethdev_port_id\",\n+\t\t.help = \"ethdev port ID\",\n+\t\t.next = NEXT(item_represented_port, NEXT_ENTRY(COMMON_UNSIGNED),\n+\t\t\t     item_param),\n+\t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_ethdev, port_id)),\n+\t},\n \t/* Validate/create actions. */\n \t[ACTIONS] = {\n \t\t.name = \"actions\",\n@@ -8368,6 +8392,7 @@ flow_item_default_mask(const struct rte_flow_item *item)\n \t\tmask = &rte_flow_item_pfcp_mask;\n \t\tbreak;\n \tcase RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR:\n+\tcase RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT:\n \t\tmask = &rte_flow_item_ethdev_mask;\n \t\tbreak;\n \tdefault:\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 2e0f590777..3dc209af4d 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1484,6 +1484,52 @@ at the opposite end of the \"wire\" leading to the ethdev.\n \n - Default ``mask`` provides exact match behaviour.\n \n+Item: ``REPRESENTED_PORT``\n+^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Matches traffic entering the embedded switch from\n+the entity represented by the given ethdev.\n+\n+Term **ethdev** and the concept of **port representor** are synonymous.\n+The **represented port** is an *entity* plugged to the embedded switch\n+at the opposite end of the \"wire\" leading to the ethdev.\n+\n+::\n+\n+    .------------------------.\n+    |    PORT_REPRESENTOR    |  Ethdev (Application Port Referred to by its ID)\n+    '------------------------'\n+                :\n+                 :\n+    .------------------------.\n+    |  Embedded Switch Port  |  Logical Port\n+    '------------------------'\n+                :\n+                 :\n+                :\n+                 :\n+    .------------------------.\n+    |  Embedded Flow Engine  |\n+    '------------------------'\n+                /\\\n+                ||\n+                ||\n+                ||\n+    .------------------------.\n+    |  Embedded Switch Port  |  Logical Port\n+    '------------------------'\n+                /\\\n+                ||\n+    .------------------------.\n+    |    REPRESENTED_PORT    |  Net / Guest / Another Ethdev (Same Application)\n+    '------------------------'\n+\n+\n+- Incompatibe with `Attribute: Traffic direction`_.\n+- Requires `Attribute: Transfer`_.\n+\n+This item is meant to use the same structure as `Item: PORT_REPRESENTOR`_.\n+\n Actions\n ~~~~~~~\n \ndiff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst\nindex 1261cb2bf3..39ff16780b 100644\n--- a/doc/guides/rel_notes/release_21_11.rst\n+++ b/doc/guides/rel_notes/release_21_11.rst\n@@ -188,7 +188,7 @@ API Changes\n    Also, make sure to start the actual text at the margin.\n    =======================================================\n \n-* ethdev: Added item ``PORT_REPRESENTOR`` to flow API.\n+* ethdev: Added items ``PORT_REPRESENTOR``, ``REPRESENTED_PORT`` to flow API.\n \n * kvargs: The experimental function ``rte_kvargs_strcmp()`` has been\n   removed. Its usages have been replaced by a new function\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex dcb9f47d98..44a399899f 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -3799,6 +3799,11 @@ This section lists supported pattern items and their attributes, if any.\n \n   - ``port_id {unsigned}``: ethdev port ID\n \n+- ``represented_port``: match traffic entering the embedded switch from\n+  the entity represented by the given ethdev\n+\n+  - ``ethdev_port_id {unsigned}``: ethdev port ID\n+\n Actions list\n ^^^^^^^^^^^^\n \ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex 5e9317c6d1..d4b654a2c6 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -101,6 +101,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \tMK_FLOW_ITEM(INTEGRITY, sizeof(struct rte_flow_item_integrity)),\n \tMK_FLOW_ITEM(CONNTRACK, sizeof(uint32_t)),\n \tMK_FLOW_ITEM(PORT_REPRESENTOR, sizeof(struct rte_flow_item_ethdev)),\n+\tMK_FLOW_ITEM(REPRESENTED_PORT, sizeof(struct rte_flow_item_ethdev)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 3625fd2c12..24d41aeb7b 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -583,6 +583,16 @@ enum rte_flow_item_type {\n \t * @see struct rte_flow_item_ethdev\n \t */\n \tRTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR,\n+\n+\t/**\n+\t * [META]\n+\t *\n+\t * Matches traffic entering the embedded switch from\n+\t * the entity represented by the given ethdev.\n+\t *\n+\t * @see struct rte_flow_item_ethdev\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_REPRESENTED_PORT,\n };\n \n /**\n@@ -1813,7 +1823,8 @@ static const struct rte_flow_item_conntrack rte_flow_item_conntrack_mask = {\n  * @b EXPERIMENTAL: this structure may change without prior notice\n  *\n  * Provides an ethdev port ID for use with the following items:\n- * RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR.\n+ * RTE_FLOW_ITEM_TYPE_PORT_REPRESENTOR,\n+ * RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT.\n  */\n struct rte_flow_item_ethdev {\n \tuint16_t port_id; /**< ethdev port ID */\n",
    "prefixes": [
        "v2",
        "02/12"
    ]
}