get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 41536,
    "url": "http://patchwork.dpdk.org/api/patches/41536/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20180626085401.4289-1-xuemingl@mellanox.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20180626085401.4289-1-xuemingl@mellanox.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20180626085401.4289-1-xuemingl@mellanox.com",
    "date": "2018-06-26T08:54:01",
    "name": "[RFC,v2] ethdev: add flow metadata",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "6c1cd0cbcf5a9c696ac643d1bb9e1afc6595473e",
    "submitter": {
        "id": 814,
        "url": "http://patchwork.dpdk.org/api/people/814/?format=api",
        "name": "Xueming Li",
        "email": "xuemingl@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20180626085401.4289-1-xuemingl@mellanox.com/mbox/",
    "series": [
        {
            "id": 232,
            "url": "http://patchwork.dpdk.org/api/series/232/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=232",
            "date": "2018-06-26T08:54:01",
            "name": "[RFC,v2] ethdev: add flow metadata",
            "version": 2,
            "mbox": "http://patchwork.dpdk.org/series/232/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/41536/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/41536/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 16A411B3A6;\n\tTue, 26 Jun 2018 10:54:32 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n\tby dpdk.org (Postfix) with ESMTP id 2EB0A1B3A1\n\tfor <dev@dpdk.org>; Tue, 26 Jun 2018 10:54:31 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n\txuemingl@mellanox.com)\n\twith ESMTPS (AES256-SHA encrypted); 26 Jun 2018 11:57:06 +0300",
            "from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx\n\t[10.12.205.180])\n\tby labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w5Q8sQPC003398;\n\tTue, 26 Jun 2018 11:54:27 +0300",
            "from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1])\n\tby dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id\n\tw5Q8sPVB004336; Tue, 26 Jun 2018 16:54:25 +0800",
            "(from xuemingl@localhost)\n\tby dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id\n\tw5Q8sHQ0004335; Tue, 26 Jun 2018 16:54:17 +0800"
        ],
        "From": "Xueming Li <xuemingl@mellanox.com>",
        "To": "",
        "Cc": "Xueming Li <xuemingl@mellanox.com>, dev@dpdk.org,\n\tAdrien Mazarguil <adrien.mazarguil@6wind.com>,\n\tShahaf Shuler <shahafs@mellanox.com>,\n\tThomas Monjalon <thomas@monjalon.net>,\n\tOlivier Matz <olivier.matz@6wind.com>",
        "Date": "Tue, 26 Jun 2018 16:54:01 +0800",
        "Message-Id": "<20180626085401.4289-1-xuemingl@mellanox.com>",
        "X-Mailer": "git-send-email 2.13.3",
        "In-Reply-To": "<20180607125240.17017-1-xuemingl@mellanox.com>",
        "References": "<20180607125240.17017-1-xuemingl@mellanox.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC v2] ethdev: add flow metadata",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Currently, rte_flow pattern only match packet header fields.\nThis patch adds additional data to match the packet.\n\nFor example, in egress direction, to do an action depending on the VM\nid, the application needs to configure rte_flow rule with the new\nmetadata pattern:\n    pattern meta data is {vm} / end action encap …\nThen the PMD will send VM id as metadata associated in mbuf to NIC,\nthen egress flow on NIC match metadata as other regular packet headers,\nthe appropriate encapsulation is done according to the VM id metadata.\n\nMetadata could be used on ingress as well to save useful info before\nflow modification (not defined yet) or decapsulation action. PMD is\nresponsible to save metadata into mbuf field. The application must get\nmetadata from the mbuf.\n\nCc: Thomas Monjalon <thomas@monjalon.net>\nCc: Olivier Matz <olivier.matz@6wind.com>\nCc: Shahaf Shuler <shahafs@mellanox.com>\nSigned-off-by: Xueming Li <xuemingl@mellanox.com>\n---\n doc/guides/prog_guide/rte_flow.rst |  7 +++++++\n lib/librte_ethdev/rte_flow.c       |  1 +\n lib/librte_ethdev/rte_flow.h       | 28 ++++++++++++++++++++++++++++\n 3 files changed, 36 insertions(+)",
    "diff": "diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex b305a72a5..7989e5856 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -1191,6 +1191,13 @@ Normally preceded by any of:\n - `Item: ICMP6_ND_NS`_\n - `Item: ICMP6_ND_OPT`_\n \n+Item: ``META``\n+^^^^^^^^^^^^^^\n+\n+Matches a metadata variable.\n+\n+- ``data``: 64 bit value.\n+\n Actions\n ~~~~~~~\n \ndiff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c\nindex b2afba089..54a07dd4a 100644\n--- a/lib/librte_ethdev/rte_flow.c\n+++ b/lib/librte_ethdev/rte_flow.c\n@@ -66,6 +66,7 @@ static const struct rte_flow_desc_data rte_flow_desc_item[] = {\n \t\t     sizeof(struct rte_flow_item_icmp6_nd_opt_sla_eth)),\n \tMK_FLOW_ITEM(ICMP6_ND_OPT_TLA_ETH,\n \t\t     sizeof(struct rte_flow_item_icmp6_nd_opt_tla_eth)),\n+\tMK_FLOW_ITEM(META, sizeof(struct rte_flow_item_meta)),\n };\n \n /** Generate flow_action[] entry. */\ndiff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h\nindex f8ba71cdb..61b3dbe7b 100644\n--- a/lib/librte_ethdev/rte_flow.h\n+++ b/lib/librte_ethdev/rte_flow.h\n@@ -413,6 +413,18 @@ enum rte_flow_item_type {\n \t * See struct rte_flow_item_mark.\n \t */\n \tRTE_FLOW_ITEM_TYPE_MARK,\n+\n+\t/**\n+\t * Matches a metadata variable.\n+\t *\n+\t * Possible sources of metadata:\n+\t * - mbuf udata64 field on egress\n+\t * - egress metadata loopback to ingress\n+\t * - data copied from packet header\n+\t *\n+\t * See struct rte_flow_item_meta.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_META,\n };\n \n /**\n@@ -849,6 +861,22 @@ static const struct rte_flow_item_gre rte_flow_item_gre_mask = {\n #endif\n \n /**\n+ * RTE_FLOW_ITEM_TYPE_META.\n+ *\n+ * Matches a meta data header.\n+ */\n+struct rte_flow_item_meta {\n+\tuint64_t data;\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_META. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_meta rte_flow_item_meta_mask = {\n+\t.data = RTE_BE64(UINT64_MAX),\n+};\n+#endif\n+\n+/**\n  * RTE_FLOW_ITEM_TYPE_FUZZY\n  *\n  * Fuzzy pattern match, expect faster than default.\n",
    "prefixes": [
        "RFC",
        "v2"
    ]
}