get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 8542,
    "url": "https://patches.dpdk.org/api/patches/8542/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1446476869-22378-3-git-send-email-helin.zhang@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": "<1446476869-22378-3-git-send-email-helin.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1446476869-22378-3-git-send-email-helin.zhang@intel.com",
    "date": "2015-11-02T15:07:49",
    "name": "[dpdk-dev,v5,2/2] app/testpmd: add test commands for selecting different GRE key sizes",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0e38bd95e1501d14d9d23187149afbb818caabc7",
    "submitter": {
        "id": 14,
        "url": "https://patches.dpdk.org/api/people/14/?format=api",
        "name": "Zhang, Helin",
        "email": "helin.zhang@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1446476869-22378-3-git-send-email-helin.zhang@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/8542/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/8542/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 10B628E81;\n\tMon,  2 Nov 2015 16:08:04 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 625DE8DB1\n\tfor <dev@dpdk.org>; Mon,  2 Nov 2015 16:08:02 +0100 (CET)",
            "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby orsmga101.jf.intel.com with ESMTP; 02 Nov 2015 07:08:01 -0800",
            "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 02 Nov 2015 07:08:00 -0800",
            "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id tA2F7wgf005871;\n\tMon, 2 Nov 2015 23:07:58 +0800",
            "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid tA2F7tlo022426; Mon, 2 Nov 2015 23:07:57 +0800",
            "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tA2F7tfi022422; \n\tMon, 2 Nov 2015 23:07:55 +0800"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.20,234,1444719600\"; d=\"scan'208\";a=\"824977526\"",
        "From": "Helin Zhang <helin.zhang@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Mon,  2 Nov 2015 23:07:49 +0800",
        "Message-Id": "<1446476869-22378-3-git-send-email-helin.zhang@intel.com>",
        "X-Mailer": "git-send-email 1.7.4.1",
        "In-Reply-To": "<1446476869-22378-1-git-send-email-helin.zhang@intel.com>",
        "References": "<1446180860-28509-1-git-send-email-helin.zhang@intel.com>\n\t<1446476869-22378-1-git-send-email-helin.zhang@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v5 2/2] app/testpmd: add test commands for\n\tselecting different GRE key sizes",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <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": "Test commands are added to support selecting differnt length of GRE key.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\nSigned-off-by: Andrey Chilikin <andrey.chilikin@intel.com>\n---\n app/test-pmd/cmdline.c                      | 52 +++++++++++++++++++++++++++++\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 ++++++\n 2 files changed, 63 insertions(+)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 6a384a2..1018379 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -6739,6 +6739,57 @@ cmdline_parse_inst_t cmd_tunnel_udp_config = {\n \t},\n };\n \n+/* *** GLOBAL CONFIG *** */\n+struct cmd_global_config_result {\n+\tcmdline_fixed_string_t cmd;\n+\tuint8_t port_id;\n+\tcmdline_fixed_string_t cfg_type;\n+\tuint8_t len;\n+};\n+\n+static void\n+cmd_global_config_parsed(void *parsed_result,\n+\t\t\t __attribute__((unused)) struct cmdline *cl,\n+\t\t\t __attribute__((unused)) void *data)\n+{\n+\tstruct cmd_global_config_result *res = parsed_result;\n+\tstruct rte_eth_global_cfg conf;\n+\tint ret;\n+\n+\tmemset(&conf, 0, sizeof(conf));\n+\tconf.cfg_type = RTE_ETH_GLOBAL_CFG_TYPE_GRE_KEY_LEN;\n+\tconf.cfg.gre_key_len = res->len;\n+\tret = rte_eth_dev_filter_ctrl(res->port_id, RTE_ETH_FILTER_NONE,\n+\t\t\t\t      RTE_ETH_FILTER_SET, &conf);\n+\tif (ret != 0)\n+\t\tprintf(\"Global config error\\n\");\n+}\n+\n+cmdline_parse_token_string_t cmd_global_config_cmd =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_global_config_result, cmd,\n+\t\t\"global_config\");\n+cmdline_parse_token_num_t cmd_global_config_port_id =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_global_config_result, port_id, UINT8);\n+cmdline_parse_token_string_t cmd_global_config_type =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_global_config_result,\n+\t\tcfg_type, \"gre-key-len\");\n+cmdline_parse_token_num_t cmd_global_config_gre_key_len =\n+\tTOKEN_NUM_INITIALIZER(struct cmd_global_config_result,\n+\t\tlen, UINT8);\n+\n+cmdline_parse_inst_t cmd_global_config = {\n+\t.f = cmd_global_config_parsed,\n+\t.data = (void *)NULL,\n+\t.help_str = \"global_config <port_id> gre-key-len <number>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_global_config_cmd,\n+\t\t(void *)&cmd_global_config_port_id,\n+\t\t(void *)&cmd_global_config_type,\n+\t\t(void *)&cmd_global_config_gre_key_len,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** CONFIGURE VM MIRROR VLAN/POOL RULE *** */\n struct cmd_set_mirror_mask_result {\n \tcmdline_fixed_string_t set;\n@@ -9579,6 +9630,7 @@ cmdline_parse_ctx_t main_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_vf_rate_limit,\n \t(cmdline_parse_inst_t *)&cmd_tunnel_filter,\n \t(cmdline_parse_inst_t *)&cmd_tunnel_udp_config,\n+\t(cmdline_parse_inst_t *)&cmd_global_config,\n \t(cmdline_parse_inst_t *)&cmd_set_mirror_mask,\n \t(cmdline_parse_inst_t *)&cmd_set_mirror_link,\n \t(cmdline_parse_inst_t *)&cmd_reset_mirror_rule,\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 75b0a57..957f889 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -1812,3 +1812,14 @@ Set the input set for Fdir::\n For example to add source IP to FD input set for flow type of ipv4 on port 0::\n \n    testpmd> set_fdir_input_set 0 ipv4 src-ipv4 add\n+\n+global_config\n+~~~~~~~~~~~~~\n+\n+Set different GRE key length for input set::\n+\n+   global_config (port_id) gre-key-len (number in bytes)\n+\n+For example to set GRE key length for input set to 4 bytes on port 0::\n+\n+   testpmd> global_config 0 gre-key-len 4\n",
    "prefixes": [
        "dpdk-dev",
        "v5",
        "2/2"
    ]
}