From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id E70E9B723 for ; Fri, 20 Feb 2015 17:59:07 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 20 Feb 2015 08:54:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,615,1418112000"; d="scan'208";a="654893470" Received: from dwdohert-dpdk-fedora-20.ir.intel.com ([163.33.213.98]) by orsmga001.jf.intel.com with ESMTP; 20 Feb 2015 08:59:06 -0800 From: Declan Doherty To: dev@dpdk.org Date: Fri, 20 Feb 2015 17:01:46 +0000 Message-Id: <1424451707-12342-4-git-send-email-declan.doherty@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1424451707-12342-3-git-send-email-declan.doherty@intel.com> References: <1423701947-17996-1-git-send-email-jijiang.liu@intel.com> <1424451707-12342-1-git-send-email-declan.doherty@intel.com> <1424451707-12342-2-git-send-email-declan.doherty@intel.com> <1424451707-12342-3-git-send-email-declan.doherty@intel.com> Subject: [dpdk-dev] [PATCH v3 3/4] app/testpmd:test RX tunnel filter for NVGRE packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Feb 2015 16:59:08 -0000 From: Jijiang Liu Extend the "tunnel_filter" command in testpmd to test the RX tunnel filter API for NVGRE packet. Signed-off-by: Jijiang Liu Signed-off-by: Declan Doherty --- app/test-pmd/cmdline.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 4753bb4..b4bb91e 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -293,11 +293,11 @@ static void cmd_help_long_parsed(void *parsed_result, " a port\n\n" "tunnel_filter add (port_id) (outer_mac) (inner_mac) (ip_addr) " - "(inner_vlan) (tunnel_type) (filter_type) (tenant_id) (queue_id)\n" + "(inner_vlan) (vxlan|nvgre) (filter_type) (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) (tunnel_type) (filter_type) (tenant_id) (queue_id)\n" + "(inner_vlan) (vxlan|nvgre) (filter_type) (tenant_id) (queue_id)\n" " remove a tunnel filter of a port.\n\n" "rx_vxlan_port add (udp_port) (port_id)\n" @@ -6860,8 +6860,10 @@ 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, "nvgre")) + tunnel_filter_conf.tunnel_type = RTE_TUNNEL_TYPE_NVGRE; else { - printf("Only VXLAN is supported now.\n"); + printf("The tunnel type %s not supported.\n", res->tunnel_type); return; } @@ -6905,7 +6907,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"); + tunnel_type, "vxlan#nvgre"); cmdline_parse_token_string_t cmd_tunnel_filter_filter_type = TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, @@ -6923,7 +6925,7 @@ cmdline_parse_inst_t cmd_tunnel_filter = { .data = (void *)0, .help_str = "add/rm tunnel filter of a port: " "tunnel_filter add port_id outer_mac inner_mac ip " - "inner_vlan tunnel_type(vxlan) filter_type " + "inner_vlan tunnel_type(vxlan|nvgre) filter_type " "(imac-ivlan|imac-ivlan-tenid|imac-tenid|" "imac|omac-imac-tenid) " "tenant_id queue_num", -- 1.9.3