get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 27917,
    "url": "https://patches.dpdk.org/api/patches/27917/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1503647430-93905-4-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": "<1503647430-93905-4-git-send-email-beilei.xing@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1503647430-93905-4-git-send-email-beilei.xing@intel.com",
    "date": "2017-08-25T07:50:26",
    "name": "[dpdk-dev,3/7] app/testpmd: add GTP fields to flow command",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "9504191e777be8f9eea345d80682beb02b69a9f6",
    "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/1503647430-93905-4-git-send-email-beilei.xing@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/27917/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/27917/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id D6E3C7D67;\n\tFri, 25 Aug 2017 09:51:22 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id D00DE7D05\n\tfor <dev@dpdk.org>; Fri, 25 Aug 2017 09:51:17 +0200 (CEST)",
            "from fmsmga006.fm.intel.com ([10.253.24.20])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Aug 2017 00:51:17 -0700",
            "from unknown (HELO dpdk9.sh.intel.com) ([10.67.119.137])\n\tby fmsmga006.fm.intel.com with ESMTP; 25 Aug 2017 00:51:16 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.41,424,1498546800\"; d=\"scan'208\";a=\"144422392\"",
        "From": "Beilei Xing <beilei.xing@intel.com>",
        "To": "jingjing.wu@intel.com",
        "Cc": "dev@dpdk.org",
        "Date": "Fri, 25 Aug 2017 15:50:26 +0800",
        "Message-Id": "<1503647430-93905-4-git-send-email-beilei.xing@intel.com>",
        "X-Mailer": "git-send-email 2.5.5",
        "In-Reply-To": "<1503647430-93905-1-git-send-email-beilei.xing@intel.com>",
        "References": "<1503647430-93905-1-git-send-email-beilei.xing@intel.com>",
        "Subject": "[dpdk-dev] [PATCH 3/7] app/testpmd: add GTP fields to flow command",
        "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 exposes the following item fields through the flow command:\n\n- GTP TEID\n\nSigned-off-by: Beilei Xing <beilei.xing@intel.com>\n---\n app/test-pmd/cmdline_flow.c                 | 22 ++++++++++++++++++++++\n app/test-pmd/config.c                       |  1 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 ++++\n 3 files changed, 27 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex a17a004..4ab5bcc 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -171,6 +171,8 @@ enum index {\n \tITEM_GRE_PROTO,\n \tITEM_FUZZY,\n \tITEM_FUZZY_THRESH,\n+\tITEM_GTP,\n+\tITEM_GTP_TEID,\n \n \t/* Validate/create actions. */\n \tACTIONS,\n@@ -451,6 +453,7 @@ static const enum index next_item[] = {\n \tITEM_MPLS,\n \tITEM_GRE,\n \tITEM_FUZZY,\n+\tITEM_GTP,\n \tZERO,\n };\n \n@@ -588,6 +591,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 +1430,19 @@ 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 = \"GTP TEID\",\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 \n \t/* Validate/create actions. */\n \t[ACTIONS] = {\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 3ae3e1c..1f320a0 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -947,6 +947,7 @@ 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 };\n \n /** Compute storage space needed by item specification. */\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 2ed62f5..6ec463e 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``: match GTP header.\n+\n+    - ``teid {unsigned}``: GTP TEID.\n+\n Actions list\n ^^^^^^^^^^^^\n \n",
    "prefixes": [
        "dpdk-dev",
        "3/7"
    ]
}