get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80965,
    "url": "http://patches.dpdk.org/api/patches/80965/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/406ab1872004e841ea694e554dbc44e8dd2c9bd3.1602776948.git.dekelp@nvidia.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": "<406ab1872004e841ea694e554dbc44e8dd2c9bd3.1602776948.git.dekelp@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/406ab1872004e841ea694e554dbc44e8dd2c9bd3.1602776948.git.dekelp@nvidia.com",
    "date": "2020-10-15T15:51:46",
    "name": "[v5,1/2] ethdev: add VLAN attributes to ETH and VLAN items",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "104300c3be1cf3db1d34187d4610f024cfe39ba9",
    "submitter": {
        "id": 1897,
        "url": "http://patches.dpdk.org/api/people/1897/?format=api",
        "name": "Dekel Peled",
        "email": "dekelp@nvidia.com"
    },
    "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/406ab1872004e841ea694e554dbc44e8dd2c9bd3.1602776948.git.dekelp@nvidia.com/mbox/",
    "series": [
        {
            "id": 13020,
            "url": "http://patches.dpdk.org/api/series/13020/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=13020",
            "date": "2020-10-15T15:51:45",
            "name": "support VLAN attributes in ETH and VLAN items",
            "version": 5,
            "mbox": "http://patches.dpdk.org/series/13020/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80965/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80965/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 9F276A04DB;\n\tThu, 15 Oct 2020 17:53:20 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 5BC951EB46;\n\tThu, 15 Oct 2020 17:52:48 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id 59D031EB06\n for <dev@dpdk.org>; Thu, 15 Oct 2020 17:52:43 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n dekelp@nvidia.com) with SMTP; 15 Oct 2020 18:52:39 +0300",
            "from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx\n [10.228.134.250])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09FFqcPp003312;\n Thu, 15 Oct 2020 18:52:39 +0300"
        ],
        "From": "Dekel Peled <dekelp@nvidia.com>",
        "To": "orika@nvidia.com, wenzhuo.lu@intel.com, beilei.xing@intel.com,\n bernard.iremonger@intel.com, mdr@ashroe.eu, nhorman@tuxdriver.com,\n thomas@monjalon.net, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru",
        "Cc": "dev@dpdk.org",
        "Date": "Thu, 15 Oct 2020 18:51:46 +0300",
        "Message-Id": "\n <406ab1872004e841ea694e554dbc44e8dd2c9bd3.1602776948.git.dekelp@nvidia.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "In-Reply-To": "<cover.1602776947.git.dekelp@nvidia.com>",
        "References": "\n <209f5087596180d7866a43f0a0f12c9a032eb7ce.1601577847.git.dekelp@nvidia.com>\n <cover.1602776947.git.dekelp@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v5 1/2] ethdev: add VLAN attributes to ETH and\n\tVLAN items",
        "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 patch implements the change proposes in RFC [1], adding dedicated\nfields to ETH and VLAN items structs, to clearly define the required\ncharacteristic of a packet, and enable precise match criteria.\nDocumentation is updated accordingly.\n\n[1] https://mails.dpdk.org/archives/dev/2020-August/177536.html\n\nSigned-off-by: Dekel Peled <dekelp@nvidia.com>\nAcked-by: Matan Azrad <matan@nvidia.com>\n---\n doc/guides/prog_guide/rte_flow.rst     | 13 ++++++++++---\n doc/guides/rel_notes/deprecation.rst   |  5 -----\n doc/guides/rel_notes/release_20_11.rst |  7 +++++++\n lib/librte_ethdev/rte_flow.h           | 17 +++++++++++++----\n 4 files changed, 30 insertions(+), 12 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 55497c9..b93cc77 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -907,13 +907,15 @@ EtherType/TPID provided by the subsequent pattern item. This is the same\n order as on the wire.\n If the ``type`` field contains a TPID value, then only tagged packets with the\n specified TPID will match the pattern.\n-Otherwise, only untagged packets will match the pattern.\n-If the ``ETH`` item is the only item in the pattern, and the ``type`` field is\n-not specified, then both tagged and untagged packets will match the pattern.\n+The field ``has_vlan`` can be used to match any type of tagged packets,\n+instead of using the ``type`` field.\n+If the ``type`` and ``has_vlan`` fields are not specified, then both tagged\n+and untagged packets will match the pattern.\n \n - ``dst``: destination MAC.\n - ``src``: source MAC.\n - ``type``: EtherType or TPID.\n+- ``has_vlan``: packet header contains at least one VLAN.\n - Default ``mask`` matches destination and source addresses only.\n \n Item: ``VLAN``\n@@ -926,9 +928,14 @@ The corresponding standard outer EtherType (TPID) values are\n preceding pattern item.\n If a ``VLAN`` item is present in the pattern, then only tagged packets will\n match the pattern.\n+The field ``has_more_vlan`` can be used to match any type of tagged packets,\n+instead of using the ``inner_type field``.\n+If the ``inner_type`` and ``has_more_vlan`` fields are not specified,\n+then any tagged packets will match the pattern.\n \n - ``tci``: tag control information.\n - ``inner_type``: inner EtherType or TPID.\n+- ``has_more_vlan``: packet header contains at least one more VLAN, after this VLAN.\n - Default ``mask`` matches the VID part of TCI only (lower 12 bits).\n \n Item: ``IPV4``\ndiff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst\nindex d1f5ed3..99520cd 100644\n--- a/doc/guides/rel_notes/deprecation.rst\n+++ b/doc/guides/rel_notes/deprecation.rst\n@@ -154,11 +154,6 @@ Deprecation Notices\n   as deprecated in DPDK 20.11, along with the associated macros ``ETH_MIRROR_*``.\n   This API will be fully removed in DPDK 21.11.\n \n-* ethdev: The ``struct rte_flow_item_eth`` and ``struct rte_flow_item_vlan``\n-  structs will be modified, to include an additional value, indicating existence\n-  or absence of a VLAN header following the current header, as proposed in RFC\n-  https://mails.dpdk.org/archives/dev/2020-August/177536.html.\n-\n * security: The API ``rte_security_session_create`` takes only single mempool\n   for session and session private data. So the application need to create\n   mempool for twice the number of sessions needed and will also lead to\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex f8686a5..e371d39 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -321,6 +321,13 @@ API Changes\n   As the data of ``uint8_t`` will be truncated when queue number under\n   a TC is greater than 256.\n \n+* ethdev: Added new field ``has_vlan`` to structure ``rte_flow_item_eth``,\n+  indicating that packet header contains at least one VLAN.\n+\n+* ethdev: Added new field ``has_more_vlan`` to structure\n+  ``rte_flow_item_vlan``, indicating that packet header contains at least one\n+  more VLAN, after this VLAN.\n+\n * vhost: Moved vDPA APIs from experimental to stable.\n \n * rawdev: Added a structure size parameter to the functions\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex d3e8d8a..4839528 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -728,15 +728,17 @@ struct rte_flow_item_raw {\n  * same order as on the wire.\n  * If the @p type field contains a TPID value, then only tagged packets with the\n  * specified TPID will match the pattern.\n- * Otherwise, only untagged packets will match the pattern.\n- * If the @p ETH item is the only item in the pattern, and the @p type field\n- * is not specified, then both tagged and untagged packets will match the\n- * pattern.\n+ * The field @p has_vlan can be used to match any type of tagged packets,\n+ * instead of using the @p type field.\n+ * If the @p type and @p has_vlan fields are not specified, then both tagged\n+ * and untagged packets will match the pattern.\n  */\n struct rte_flow_item_eth {\n \tstruct rte_ether_addr dst; /**< Destination MAC. */\n \tstruct rte_ether_addr src; /**< Source MAC. */\n \trte_be16_t type; /**< EtherType or TPID. */\n+\tuint32_t has_vlan:1; /**< Packet header contains at least one VLAN. */\n+\tuint32_t reserved:31; /**< Reserved, must be zero. */\n };\n \n /** Default mask for RTE_FLOW_ITEM_TYPE_ETH. */\n@@ -758,10 +760,17 @@ struct rte_flow_item_eth {\n  * the preceding pattern item.\n  * If a @p VLAN item is present in the pattern, then only tagged packets will\n  * match the pattern.\n+ * The field @p has_more_vlan can be used to match any type of tagged packets,\n+ * instead of using the @p inner_type field.\n+ * If the @p inner_type and @p has_more_vlan fields are not specified,\n+ * then any tagged packets will match the pattern.\n  */\n struct rte_flow_item_vlan {\n \trte_be16_t tci; /**< Tag control information. */\n \trte_be16_t inner_type; /**< Inner EtherType or TPID. */\n+\tuint32_t has_more_vlan:1;\n+\t/**< Packet header contains at least one more VLAN, after this VLAN. */\n+\tuint32_t reserved:31; /**< Reserved, must be zero. */\n };\n \n /** Default mask for RTE_FLOW_ITEM_TYPE_VLAN. */\n",
    "prefixes": [
        "v5",
        "1/2"
    ]
}