DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Gregory Etelson <getelson@nvidia.com>, dev@dpdk.org
Cc: matan@nvidia.com, rasland@nvidia.com, Ori Kam <orika@nvidia.com>,
	Wenzhuo Lu <wenzhuo.lu@intel.com>,
	Beilei Xing <beilei.xing@intel.com>,
	Bernard Iremonger <bernard.iremonger@intel.com>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fix flow tunnel create command
Date: Tue, 17 Nov 2020 12:51:05 +0000	[thread overview]
Message-ID: <a9b2804d-c5f4-5a3c-114b-341edab99a4b@intel.com> (raw)
In-Reply-To: <20201115112341.30617-1-getelson@nvidia.com>

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 <port> type <tunnel 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 <getelson@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>
> ---
>   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,
>   	},
> 


  reply	other threads:[~2020-11-17 12:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-15 11:23 Gregory Etelson
2020-11-17 12:51 ` Ferruh Yigit [this message]
2020-11-17 13:46   ` Gregory Etelson
2020-11-19 11:10 ` [dpdk-dev] [PATCH v2] app/testpmd: fix flow tunnel commands Gregory Etelson
2020-11-19 16:50   ` Ori Kam
2020-11-19 17:29     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a9b2804d-c5f4-5a3c-114b-341edab99a4b@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=getelson@nvidia.com \
    --cc=matan@nvidia.com \
    --cc=orika@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).