get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 80797,
    "url": "http://patches.dpdk.org/api/patches/80797/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/6363b9417eea68914d23bbd636567977e5b0eda8.1602700693.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": "<6363b9417eea68914d23bbd636567977e5b0eda8.1602700693.git.dekelp@nvidia.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/6363b9417eea68914d23bbd636567977e5b0eda8.1602700693.git.dekelp@nvidia.com",
    "date": "2020-10-14T18:53:27",
    "name": "[v4,1/2] ethdev: add VLAN attributes to ETH and VLAN items",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "dc13173eca24dbf616efa6305f8122fb75a67a0e",
    "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/6363b9417eea68914d23bbd636567977e5b0eda8.1602700693.git.dekelp@nvidia.com/mbox/",
    "series": [
        {
            "id": 12969,
            "url": "http://patches.dpdk.org/api/series/12969/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12969",
            "date": "2020-10-14T18:53:26",
            "name": "support VLAN attributes in ETH and VLAN items",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/12969/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/80797/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/80797/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 F268BA04DB;\n\tWed, 14 Oct 2020 20:54:58 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id EE2EF1D939;\n\tWed, 14 Oct 2020 20:54:33 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id C10F41D6F6\n for <dev@dpdk.org>; Wed, 14 Oct 2020 20:54:22 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n dekelp@nvidia.com) with SMTP; 14 Oct 2020 21:54:18 +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 09EIsHrJ026455;\n Wed, 14 Oct 2020 21:54:18 +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": "Wed, 14 Oct 2020 21:53:27 +0300",
        "Message-Id": "\n <6363b9417eea68914d23bbd636567977e5b0eda8.1602700693.git.dekelp@nvidia.com>",
        "X-Mailer": "git-send-email 1.7.1",
        "In-Reply-To": "<cover.1602700693.git.dekelp@nvidia.com>",
        "References": "\n <209f5087596180d7866a43f0a0f12c9a032eb7ce.1601577847.git.dekelp@nvidia.com>\n <cover.1602700693.git.dekelp@nvidia.com>",
        "Subject": "[dpdk-dev] [PATCH v4 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>\n---\n doc/guides/prog_guide/rte_flow.rst     | 14 ++++++++++++--\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           | 18 +++++++++++++++---\n 4 files changed, 34 insertions(+), 10 deletions(-)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex f26a6c2..40230d3 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -908,12 +908,16 @@ 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 specific packet types, instead\n+of using the ``type`` field.\n+This can be used to match any type of tagged packets.\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 +930,15 @@ 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 specific packet types,\n+instead of using the ``inner_type field``.\n+This can be used to match any type of tagged packets.\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 584e720..72011b0 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 * ethdev: The ``struct rte_flow_item_ipv6`` struct will be modified to include\n   additional values, indicating existence or absence of IPv6 extension headers\n   following the IPv6 header, as proposed in RFC\ndiff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst\nindex 30db8f2..4932d82 100644\n--- a/doc/guides/rel_notes/release_20_11.rst\n+++ b/doc/guides/rel_notes/release_20_11.rst\n@@ -292,6 +292,13 @@ API Changes\n \n * vhost: Moved vDPA APIs from experimental to stable.\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 * rawdev: Added a structure size parameter to the functions\n   ``rte_rawdev_queue_setup()``, ``rte_rawdev_queue_conf_get()``,\n   ``rte_rawdev_info_get()`` and ``rte_rawdev_configure()``,\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex 3d5fb09..cb3bb5c 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -723,14 +723,18 @@ struct rte_flow_item_raw {\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 specific packet types, instead\n+ * of using the @p type field.\n+ * This can be used to match any type of tagged packets.\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@@ -752,10 +756,18 @@ 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 specific packet types,\n+ * instead of using the @p inner_type field.\n+ * This can be used to match any type of tagged packets.\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": [
        "v4",
        "1/2"
    ]
}