From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3587FA04DB; Tue, 17 Nov 2020 13:51:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C4AB5567C; Tue, 17 Nov 2020 13:51:15 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 4DB7E4C90 for ; Tue, 17 Nov 2020 13:51:13 +0100 (CET) IronPort-SDR: T7BMZVBTsktvVPiCbDnRi2SePtFgqBJ/e72dwEpSwJQiEEVuh5NDOVC/tFTjDd9rxi0qq3+DRI ECIUCCm1+8MQ== X-IronPort-AV: E=McAfee;i="6000,8403,9807"; a="167405520" X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="167405520" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 04:51:11 -0800 IronPort-SDR: kRd91Rkqm1gwnyK023B5KixdBPQQxJILO0kwcIrIrKKIE6DsM/UMuCSK8shD4BpurPIoNtxNxs rHjjBbppCy1g== X-IronPort-AV: E=Sophos;i="5.77,485,1596524400"; d="scan'208";a="475908850" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.210.196]) ([10.213.210.196]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 04:51:09 -0800 To: Gregory Etelson , dev@dpdk.org Cc: matan@nvidia.com, rasland@nvidia.com, Ori Kam , Wenzhuo Lu , Beilei Xing , Bernard Iremonger References: <20201115112341.30617-1-getelson@nvidia.com> From: Ferruh Yigit Message-ID: Date: Tue, 17 Nov 2020 12:51:05 +0000 MIME-Version: 1.0 In-Reply-To: <20201115112341.30617-1-getelson@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix flow tunnel create command 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" On 11/15/2020 11:23 AM, Gregory Etelson wrote: > testpmd provides commands to test tunnel offload rte_flow > capabilities. A command that creates a tunnel had a syntax bug that > allowed to spesify the 'create' command part several times. > > Current patch fixed that fault. Correct syntax for tunnel cretion is: > testpmd> flow tunnel create type > multiple times 'type' still supported, is it intentional: flow tunnel create 0 type "a" type "b" type "c" Also 'list' and 'destroy' can be issued multiple times, is it a valid usage: flow tunnel list 0 list 0 list 0 flow tunnel destroy 0 destroy 0 destroy 0 flow tunnel destroy 0 id 0 id 1 id 2 flow tunnel destroy 0 id 0 destroy 0 id 1 id 2 destroy 0 > Signed-off-by: Gregory Etelson > Acked-by: Ori Kam > --- > app/test-pmd/cmdline_flow.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 457f74078d..bf00ba0acb 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -812,8 +812,7 @@ static const enum index next_vc_attr[] = { > ZERO, > }; > > -static const enum index tunnel_create_attr[] = { > - TUNNEL_CREATE, > +static const enum index tunnel_create_type_attr[] = { > TUNNEL_CREATE_TYPE, > END, > ZERO, > @@ -2009,14 +2008,15 @@ static const struct token token_list[] = { > [TUNNEL_CREATE] = { > .name = "create", > .help = "create new tunnel object", > - .next = NEXT(tunnel_create_attr, NEXT_ENTRY(PORT_ID)), > + .next = NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE), > + NEXT_ENTRY(PORT_ID)), > .args = ARGS(ARGS_ENTRY(struct buffer, port)), > .call = parse_tunnel, > }, > [TUNNEL_CREATE_TYPE] = { > .name = "type", > .help = "create new tunnel", > - .next = NEXT(tunnel_create_attr, NEXT_ENTRY(FILE_PATH)), > + .next = NEXT(tunnel_create_type_attr, NEXT_ENTRY(FILE_PATH)), > .args = ARGS(ARGS_ENTRY(struct tunnel_ops, type)), > .call = parse_tunnel, > }, >