get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 29409,
    "url": "https://patches.dpdk.org/api/patches/29409/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1506662342-18966-5-git-send-email-beilei.xing@intel.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": "<1506662342-18966-5-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1506662342-18966-5-git-send-email-beilei.xing@intel.com",
    "date": "2017-09-29T05:18:58",
    "name": "[dpdk-dev,v6,4/8] ethdev: add GTP items to support flow API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4dd1ecab5971aec0cb262a8cc1766b4773b454a5",
    "submitter": {
        "id": 410,
        "url": "https://patches.dpdk.org/api/people/410/?format=api",
        "name": "Xing, Beilei",
        "email": "beilei.xing@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1506662342-18966-5-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/29409/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/29409/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 17E6E1B1A6;\n\tFri, 29 Sep 2017 07:19:57 +0200 (CEST)",
            "from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby dpdk.org (Postfix) with ESMTP id DF2752B9A\n\tfor <dev@dpdk.org>; Fri, 29 Sep 2017 07:19:48 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t28 Sep 2017 22:19:48 -0700",
            "from unknown (HELO dpdk9.sh.intel.com) ([10.67.118.52])\n\tby fmsmga002.fm.intel.com with ESMTP; 28 Sep 2017 22:19:47 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.42,451,1500966000\"; d=\"scan'208\";\n\ta=\"1225073106\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com",
        "Cc": "andrey.chilikin@intel.com,\n\tdev@dpdk.org",
        "Date": "Fri, 29 Sep 2017 13:18:58 +0800",
        "Message-Id": "<1506662342-18966-5-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1506662342-18966-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1506565054-67690-1-git-send-email-beilei.xing@intel.com>\n\t<1506662342-18966-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v6 4/8] ethdev: add GTP items to support flow API",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch adds GTP, GTPC and GTPU items for\ngeneric flow API, and also exposes item fields\nthrough the flow command.\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\nAcked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>\n---\n app/test-pmd/cmdline_flow.c                 | 40 ++++++++++++++++++++++\n app/test-pmd/config.c                       |  3 ++\n doc/guides/prog_guide/rte_flow.rst          | 17 ++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 +++\n lib/librte_ether/rte_flow.h                 | 52 +++++++++++++++++++++++++++++\n 5 files changed, 116 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex a17a004..26c3e4f 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -171,6 +171,10 @@ enum index {\n \tITEM_GRE_PROTO,\n \tITEM_FUZZY,\n \tITEM_FUZZY_THRESH,\n+\tITEM_GTP,\n+\tITEM_GTP_TEID,\n+\tITEM_GTPC,\n+\tITEM_GTPU,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -451,6 +455,9 @@ static const enum index next_item[] = {\n \tITEM_MPLS,\n \tITEM_GRE,\n \tITEM_FUZZY,\n+\tITEM_GTP,\n+\tITEM_GTPC,\n+\tITEM_GTPU,\n \tZERO,\n };\n \n@@ -588,6 +595,12 @@ static const enum index item_gre[] = {\n \tZERO,\n };\n \n+static const enum index item_gtp[] = {\n+\tITEM_GTP_TEID,\n+\tITEM_NEXT,\n+\tZERO,\n+};\n+\n static const enum index next_action[] = {\n \tACTION_END,\n \tACTION_VOID,\n@@ -1421,6 +1434,33 @@ static const struct token token_list[] = {\n \t\t.args = ARGS(ARGS_ENTRY(struct rte_flow_item_fuzzy,\n \t\t\t\t\tthresh)),\n \t},\n+\t[ITEM_GTP] = {\n+\t\t.name = \"gtp\",\n+\t\t.help = \"match GTP header\",\n+\t\t.priv = PRIV_ITEM(GTP, sizeof(struct rte_flow_item_gtp)),\n+\t\t.next = NEXT(item_gtp),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_GTP_TEID] = {\n+\t\t.name = \"teid\",\n+\t\t.help = \"tunnel endpoint identifier\",\n+\t\t.next = NEXT(item_gtp, NEXT_ENTRY(UNSIGNED), item_param),\n+\t\t.args = ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_gtp, teid)),\n+\t},\n+\t[ITEM_GTPC] = {\n+\t\t.name = \"gtpc\",\n+\t\t.help = \"match GTP header\",\n+\t\t.priv = PRIV_ITEM(GTPC, sizeof(struct rte_flow_item_gtp)),\n+\t\t.next = NEXT(item_gtp),\n+\t\t.call = parse_vc,\n+\t},\n+\t[ITEM_GTPU] = {\n+\t\t.name = \"gtpu\",\n+\t\t.help = \"match GTP header\",\n+\t\t.priv = PRIV_ITEM(GTPU, sizeof(struct rte_flow_item_gtp)),\n+\t\t.next = NEXT(item_gtp),\n+\t\t.call = parse_vc,\n+\t},\n \n \t/* Validate/create actions. */\n \t[ACTIONS] = {\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex e8e311c..9b09bbd 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -949,6 +949,9 @@ static const struct {\n \tMK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)),\n \tMK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)),\n \tMK_FLOW_ITEM(FUZZY, sizeof(struct rte_flow_item_fuzzy)),\n+\tMK_FLOW_ITEM(GTP, sizeof(struct rte_flow_item_gtp)),\n+\tMK_FLOW_ITEM(GTPC, sizeof(struct rte_flow_item_gtp)),\n+\tMK_FLOW_ITEM(GTPU, sizeof(struct rte_flow_item_gtp)),\n };\n \n /** Compute storage space needed by item specification. */\ndiff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst\nindex 662a912..73f12ee 100644\n--- a/doc/guides/prog_guide/rte_flow.rst\n+++ b/doc/guides/prog_guide/rte_flow.rst\n@@ -955,6 +955,23 @@ Usage example, fuzzy match a TCPv4 packets:\n    | 4     | END      |\n    +-------+----------+\n \n+Item: ``GTP``, ``GTPC``, ``GTPU``\n+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n+\n+Matches a GTPv1 header.\n+\n+Note: GTP, GTPC and GTPU use the same structure. GTPC and GTPU item\n+are defined for a user-friendly API when creating GTP-C and GTP-U\n+flow rules.\n+\n+- ``v_pt_rsv_flags``: version (3b), protocol type (1b), reserved (1b),\n+  extension header flag (1b), sequence number flag (1b), N-PDU number\n+  flag (1b).\n+- ``msg_type``: message type.\n+- ``msg_len``: message length.\n+- ``teid``: tunnel endpoint identifier.\n+- Default ``mask`` matches teid only.\n+\n Actions\n ~~~~~~~\n \ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 2ed62f5..4c2facc 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2696,6 +2696,10 @@ This section lists supported pattern items and their attributes, if any.\n \n   - ``thresh {unsigned}``: accuracy threshold.\n \n+- ``gtp``, ``gtpc``, ``gtpu``: match GTPv1 header.\n+\n+  - ``teid {unsigned}``: tunnel endpoint identifier.\n+\n Actions list\n ^^^^^^^^^^^^\n \ndiff --git a/lib/librte_ether/rte_flow.h b/lib/librte_ether/rte_flow.h\nindex bba6169..b1a1b97 100644\n--- a/lib/librte_ether/rte_flow.h\n+++ b/lib/librte_ether/rte_flow.h\n@@ -309,6 +309,33 @@ enum rte_flow_item_type {\n \t * See struct rte_flow_item_fuzzy.\n \t */\n \tRTE_FLOW_ITEM_TYPE_FUZZY,\n+\n+\t/**\n+\t * Matches a GTP header.\n+\t *\n+\t * Configure flow for GTP packets.\n+\t *\n+\t * See struct rte_flow_item_gtp.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_GTP,\n+\n+\t/**\n+\t * Matches a GTP header.\n+\t *\n+\t * Configure flow for GTP-C packets.\n+\t *\n+\t * See struct rte_flow_item_gtp.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_GTPC,\n+\n+\t/**\n+\t * Matches a GTP header.\n+\t *\n+\t * Configure flow for GTP-U packets.\n+\t *\n+\t * See struct rte_flow_item_gtp.\n+\t */\n+\tRTE_FLOW_ITEM_TYPE_GTPU,\n };\n \n /**\n@@ -735,6 +762,31 @@ static const struct rte_flow_item_fuzzy rte_flow_item_fuzzy_mask = {\n #endif\n \n /**\n+ * RTE_FLOW_ITEM_TYPE_GTP.\n+ *\n+ * Matches a GTPv1 header.\n+ */\n+struct rte_flow_item_gtp {\n+\t/**\n+\t * Version (3b), protocol type (1b), reserved (1b),\n+\t * Extension header flag (1b),\n+\t * Sequence number flag (1b),\n+\t * N-PDU number flag (1b).\n+\t */\n+\tuint8_t v_pt_rsv_flags;\n+\tuint8_t msg_type; /**< Message type. */\n+\trte_be16_t msg_len; /**< Message length. */\n+\trte_be32_t teid; /**< Tunnel endpoint identifier. */\n+};\n+\n+/** Default mask for RTE_FLOW_ITEM_TYPE_GTP. */\n+#ifndef __cplusplus\n+static const struct rte_flow_item_gtp rte_flow_item_gtp_mask = {\n+\t.teid = RTE_BE32(0xffffffff),\n+};\n+#endif\n+\n+/**\n  * Matching pattern item definition.\n  *\n  * A pattern is formed by stacking items starting from the lowest protocol\n",
    "prefixes": [
        "dpdk-dev",
        "v6",
        "4/8"
    ]
}