From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B45A99AE0 for ; Fri, 13 Feb 2015 02:27:39 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 12 Feb 2015 17:27:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,567,1418112000"; d="scan'208";a="651535714" Received: from pgsmsx106.gar.corp.intel.com ([10.221.44.98]) by orsmga001.jf.intel.com with ESMTP; 12 Feb 2015 17:27:17 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by PGSMSX106.gar.corp.intel.com (10.221.44.98) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 13 Feb 2015 09:27:15 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by shsmsx102.ccr.corp.intel.com ([169.254.2.62]) with mapi id 14.03.0195.001; Fri, 13 Feb 2015 09:27:14 +0800 From: "Liu, Jijiang" To: "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 3/4] app/testpmd:test RX tunnel filter for NVGRE packet Thread-Index: AQHQRyuqovtcJtOn5kyUBUHkgAtH2JztyRbA Date: Fri, 13 Feb 2015 01:27:14 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DDAE21@SHSMSX101.ccr.corp.intel.com> References: <1423701947-17996-1-git-send-email-jijiang.liu@intel.com> <1423701947-17996-4-git-send-email-jijiang.liu@intel.com> <9BB6961774997848B5B42BEC655768F8BA72B3@SHSMSX104.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F8BA72B3@SHSMSX104.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 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, 13 Feb 2015 01:27:42 -0000 > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, February 13, 2015 9:23 AM > To: Liu, Jijiang; dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v2 3/4] app/testpmd:test RX tunnel filter = for > NVGRE packet >=20 > Hi, jijiang >=20 > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jijiang Liu > > Sent: Thursday, February 12, 2015 8:46 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH v2 3/4] app/testpmd:test RX tunnel filter > > for NVGRE packet > > > > Extend the "tunnel_filter" command in testpmd to test the RX tunnel > > filter API for NVGRE packet. > > > > Signed-off-by: Jijiang Liu > > --- > > app/test-pmd/cmdline.c | 14 ++++++++------ > > 1 files changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > > 9de3e7e..a380d43 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" > > @@ -6851,8 +6851,10 @@ cmd_tunnel_filter_parsed(void *parsed_result, > > > > if (!strcmp(res->tunnel_type, "vxlan")) > > tunnel_filter_conf.tunnel_type =3D RTE_TUNNEL_TYPE_VXLAN; > > + if (!strcmp(res->tunnel_type, "nvgre")) > > + tunnel_filter_conf.tunnel_type =3D > > RTE_TUNNEL_TYPE_NVGRE; > > else { > > - printf("Only VXLAN is supported now.\n"); > > + printf("The tunnel type is supported now.\n"); >=20 > Maybe "not" is missed in the printed sentence. Or you can just remove the= else > {}, because res->tunnel_type can only be "vxlan" or "nvgre". I'll update it in next version. > > return; > > } > > > > @@ -6896,12 +6898,12 @@ cmdline_parse_token_ipaddr_t > > cmd_tunnel_filter_ip_value =3D > > ip_value); > > cmdline_parse_token_string_t cmd_tunnel_filter_tunnel_type =3D > > 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 =3D > > TOKEN_STRING_INITIALIZER(struct cmd_tunnel_filter_result, > > filter_type, "imac-ivlan#imac-ivlan-tenid#imac-tenid#" > > - "imac#omac-imac-tenid"); > > + "imac#omac-imac-tenid#"); >=20 >=20 > Do you need the additional "#"? Don't need it, I'll update it in next version. > > cmdline_parse_token_num_t cmd_tunnel_filter_tenant_id =3D > > TOKEN_NUM_INITIALIZER(struct cmd_tunnel_filter_result, > > tenant_id, UINT32); > > @@ -6914,7 +6916,7 @@ cmdline_parse_inst_t cmd_tunnel_filter =3D { > > .data =3D (void *)0, > > .help_str =3D "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.7.7.6