From patchwork Fri Apr 5 09:05:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qi Zhang X-Patchwork-Id: 52327 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D2E6A1B4A7; Fri, 5 Apr 2019 11:03:55 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 989241B491 for ; Fri, 5 Apr 2019 11:03:44 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Apr 2019 02:03:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,312,1549958400"; d="scan'208";a="133191679" Received: from dpdk51.sh.intel.com ([10.67.110.245]) by orsmga006.jf.intel.com with ESMTP; 05 Apr 2019 02:03:43 -0700 From: Qi Zhang To: ferruh.yigit@intel.com, qi.z.zhang@intel.com, bernard.iremonger@intel.com Cc: dev@dpdk.org, Qiming Yang Date: Fri, 5 Apr 2019 17:05:34 +0800 Message-Id: <20190405090535.7604-5-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20190405090535.7604-1-qi.z.zhang@intel.com> References: <20190405090535.7604-1-qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v5 4/5] app/testpmd: add VXLAN-GPE to tunnel type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Qiming Yang This patch added new item "vxlan-gpe" to tunnel_type to support new VXLAN-GPE packet type, and its clasification. Signed-off-by: Qiming Yang --- app/test-pmd/cmdline.c | 19 ++++++++++++------- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 11 +++++++---- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index ee50e4566..2ab03c111 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -376,12 +376,12 @@ static void cmd_help_long_parsed(void *parsed_result, "filtered for VF(s) from port_id.\n\n" "tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) " - "(inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|" + "(inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|" "imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id)\n" " add a tunnel filter of a port.\n\n" "tunnel_filter rm (port_id) (outer_mac) (inner_mac) (ip_addr) " - "(inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|" + "(inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|" "imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id)\n" " remove a tunnel filter of a port.\n\n" @@ -863,7 +863,7 @@ static void cmd_help_long_parsed(void *parsed_result, " for ports.\n\n" "port config all rss (all|default|ip|tcp|udp|sctp|" - "ether|port|vxlan|geneve|nvgre|none|)\n" + "ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|)\n" " Set the RSS mode.\n\n" "port config port-id rss reta (hash,queue)[,(hash,queue)]\n" @@ -2190,7 +2190,7 @@ cmdline_parse_inst_t cmd_config_rss = { .f = cmd_config_rss_parsed, .data = NULL, .help_str = "port config all rss " - "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none|", + "all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none|", .tokens = { (void *)&cmd_config_rss_port, (void *)&cmd_config_rss_keyword, @@ -8758,6 +8758,8 @@ cmd_tunnel_filter_parsed(void *parsed_result, if (!strcmp(res->tunnel_type, "vxlan")) tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN; + else if (!strcmp(res->tunnel_type, "vxlan-gpe")) + tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_VXLAN_GPE; else if (!strcmp(res->tunnel_type, "nvgre")) tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_NVGRE; else if (!strcmp(res->tunnel_type, "ipingre")) @@ -8807,7 +8809,7 @@ cmdline_parse_token_ipaddr_t cmd_tunnel_filter_ip_value = ip_value); cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type = TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, - tunnel_type, "vxlan#nvgre#ipingre"); + tunnel_type, "vxlan#nvgre#ipingre#vxlan-gpe"); cmdline_parse_token_string_t cmd_tunnel_filter_filter_type = TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, @@ -8931,6 +8933,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result, tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN; } else if (!strcmp(res->tunnel_type, "geneve")) { tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE; + } else if (!strcmp(res->tunnel_type, "vxlan-gpe")) { + tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE; } else { printf("Invalid tunnel type\n"); return; @@ -8965,7 +8969,7 @@ cmdline_parse_token_string_t cmd_config_tunnel_udp_port_action = "add#rm"); cmdline_parse_token_string_t cmd_config_tunnel_udp_port_tunnel_type = TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port, tunnel_type, - "vxlan#geneve"); + "vxlan#geneve#vxlan-gpe"); cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value = TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port, UINT16); @@ -8973,7 +8977,7 @@ cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value = cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = { .f = cmd_cfg_tunnel_udp_port_parsed, .data = NULL, - .help_str = "port config udp_tunnel_port add|rm vxlan|geneve ", + .help_str = "port config udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe ", .tokens = { (void *)&cmd_config_tunnel_udp_port_port, (void *)&cmd_config_tunnel_udp_port_config, @@ -11987,6 +11991,7 @@ flowtype_to_str(uint16_t ftype) {"vxlan", RTE_ETH_FLOW_VXLAN}, {"geneve", RTE_ETH_FLOW_GENEVE}, {"nvgre", RTE_ETH_FLOW_NVGRE}, + {"vxlan-gpe", RTE_ETH_FLOW_VXLAN_GPE}, }; for (i = 0; i < RTE_DIM(ftype_table); i++) { diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index bcf1449a2..5d4dc6f0c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -218,6 +218,7 @@ For example: vxlan geneve nvgre + vxlan-gpe show port rss reta ~~~~~~~~~~~~~~~~~~ @@ -830,7 +831,7 @@ tunnel_filter add Add a tunnel filter on a port:: testpmd> tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) \ - (inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|\ + (inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|\ imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id) The available information categories are: @@ -841,6 +842,8 @@ The available information categories are: * ``ipingre``: Set tunnel type as IP-in-GRE. +* ``vxlan-gpe``: Set tunnel type as VXLAN-GPE + * ``imac-ivlan``: Set filter type as Inner MAC and VLAN. * ``imac-ivlan-tenid``: Set filter type as Inner MAC, VLAN and tenant ID. @@ -868,7 +871,7 @@ tunnel_filter remove Remove a tunnel filter on a port:: testpmd> tunnel_filter rm (port_id) (outer_mac) (inner_mac) (ip_addr) \ - (inner_vlan) (vxlan|nvgre|ipingre) (imac-ivlan|imac-ivlan-tenid|\ + (inner_vlan) (vxlan|nvgre|ipingre|vxlan-gpe) (imac-ivlan|imac-ivlan-tenid|\ imac-tenid|imac|omac-imac-tenid|oip|iip) (tenant_id) (queue_id) rx_vxlan_port add @@ -2059,7 +2062,7 @@ port config - RSS Set the RSS (Receive Side Scaling) mode on or off:: - testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|none) + testpmd> port config all rss (all|default|ip|tcp|udp|sctp|ether|port|vxlan|geneve|nvgre|vxlan-gpe|none) RSS is on by default. @@ -2170,7 +2173,7 @@ port config udp_tunnel_port ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Add/remove UDP tunnel port for VXLAN/GENEVE tunneling protocols:: - testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port) + testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe (udp_port) port config tx_metadata ~~~~~~~~~~~~~~~~~~~~~~~