Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/8307/?format=api
http://patches.dpdk.org/api/patches/8307/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1446180860-28509-3-git-send-email-helin.zhang@intel.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": "<1446180860-28509-3-git-send-email-helin.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1446180860-28509-3-git-send-email-helin.zhang@intel.com", "date": "2015-10-30T04:54:20", "name": "[dpdk-dev,v4,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": "http://patches.dpdk.org/api/people/14/?format=api", "name": "Zhang, Helin", "email": "helin.zhang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1446180860-28509-3-git-send-email-helin.zhang@intel.com/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/8307/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/8307/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 40AF48E68;\n\tFri, 30 Oct 2015 05:54:39 +0100 (CET)", "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n\tby dpdk.org (Postfix) with ESMTP id 92CBF8DA3\n\tfor <dev@dpdk.org>; Fri, 30 Oct 2015 05:54:33 +0100 (CET)", "from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga103.jf.intel.com with ESMTP; 29 Oct 2015 21:54:33 -0700", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby FMSMGA003.fm.intel.com with ESMTP; 29 Oct 2015 21:54:31 -0700", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id t9U4sTUE023107;\n\tFri, 30 Oct 2015 12:54:29 +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 t9U4sQoG028560; Fri, 30 Oct 2015 12:54:28 +0800", "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9U4sQem028556; \n\tFri, 30 Oct 2015 12:54:26 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.20,217,1444719600\"; d=\"scan'208\";a=\"590787574\"", "From": "Helin Zhang <helin.zhang@intel.com>", "To": "dev@dpdk.org", "Date": "Fri, 30 Oct 2015 12:54:20 +0800", "Message-Id": "<1446180860-28509-3-git-send-email-helin.zhang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1446180860-28509-1-git-send-email-helin.zhang@intel.com>", "References": "<1446099519-7903-1-git-send-email-helin.zhang@intel.com>\n\t<1446180860-28509-1-git-send-email-helin.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v4 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(+)\n\nv4 changes:\nAdded testpmd guide update to this patch directly.", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 1a2cb7d..cd49637 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -6645,6 +6645,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@@ -9484,6 +9535,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 f5951c0..5ed7c66 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -1810,3 +1810,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", "v4", "2/2" ] }{ "id": 8307, "url": "