From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <adrien.mazarguil@6wind.com>
Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com
 [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id C86B51B040
 for <dev@dpdk.org>; Thu, 19 Apr 2018 15:03:40 +0200 (CEST)
Received: by mail-wr0-f193.google.com with SMTP id d19-v6so13863427wre.1
 for <dev@dpdk.org>; Thu, 19 Apr 2018 06:03:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:in-reply-to;
 bh=nPclYxeTF98kCow9UD7IPpjVfoYDAaFvi8js+zSWsqE=;
 b=Om/emoHnBsGGgUHH7MrMmBmVtNUideS3r4V5GAt7IWIsgmM1eLU5XxIiLGprF9sZcD
 uAO8nZPtCzyqBcgawtreOxNBWBQMHQokOuN3uJeeMYlz3Mg7FRcGE1kuizqgMC6ZrJyB
 iEiZ3KPtfizz+gZptunbVaOCsuWrHgzEUTxNqATx17EoHRZNG5h0I8JgBKpf3MODyLYZ
 tSwdgtxealT+70LS+OgiQj4faAcEgrlEuE8NSkkaO66UcfEWcDwGoNGI5T/kJD/Qk7Am
 mvmkQqPg9HA4TLYHDrsMcvyaUIzFt9UtllQT09+aboqslkigpu8wowfcE4MLGz+n31bs
 D0SQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:in-reply-to;
 bh=nPclYxeTF98kCow9UD7IPpjVfoYDAaFvi8js+zSWsqE=;
 b=ovh5chq2wHEKVqv94R8G823t9FeKRCUhPFjXwMbF2Pr5ovds8IU/HnQ3EcNswE9wHm
 Td7lqYmxf9PteN1sTHsphwHJPtwNgoBKTqP4sfrSkus2B+2/bNfu6f7Kgrl2qSnFcvDP
 vYU/7Uj0bVV9KojxsjPJakxjMgv1vbHygqI6KJeqGrm47LdcSTdEFXf2VBXh1QIEzUPH
 jJqE3mSiBJs043PCS3RkcP6tAjljKa3ar2YK1yP6UD1OB0jUmYwEj03Jgfh7sk+IUK/k
 9CRFOMkXYsFGsWdUbWnkEwFxfRYAZoWk+Mwaft9Bm1YDCffllnT2g/nTMnsiF5RwJ8cM
 GMGA==
X-Gm-Message-State: ALQs6tDs7dBFl9q1cuE9zAu74WaFFbzlB4WNu/kWGYfkZyRqyVtOeBN5
 JkK9Q6yi692dQCPBDyR+bTDvPw==
X-Google-Smtp-Source: AIpwx486K2TeobE/3H1v7hlvQh1RFtJ+eOU7FOj/CAHaDdmqRPR/b2cZILTQokKF3RXsJlJnRjkrmA==
X-Received: by 10.28.207.201 with SMTP id f192mr4466224wmg.148.1524143020553; 
 Thu, 19 Apr 2018 06:03:40 -0700 (PDT)
Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id k89sm4367389wmc.15.2018.04.19.06.03.39
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 19 Apr 2018 06:03:39 -0700 (PDT)
Date: Thu, 19 Apr 2018 15:03:26 +0200
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Declan Doherty <declan.doherty@intel.com>
Cc: dev@dpdk.org, Alex Rosenbaum <alexr@mellanox.com>,
 Ferruh Yigit <ferruh.yigit@intel.com>,
 Thomas Monjalon <thomas@monjalon.net>,
 Shahaf Shuler <shahafs@mellanox.com>, Qi Zhang <qi.z.zhang@intel.com>,
 Alejandro Lucero <alejandro.lucero@netronome.com>,
 Andrew Rybchenko <arybchenko@solarflare.com>,
 Mohammad Abdul Awal <mohammad.abdul.awal@intel.com>,
 Remy Horton <remy.horton@intel.com>,
 John McNamara <john.mcnamara@intel.com>, Rony Efraim <ronye@mellanox.com>,
 Jingjing Wu <jingjing.wu@intel.com>, Wenzhuo Lu <wenzhuo.lu@intel.com>,
 Vincent Jardin <vincent.jardin@6wind.com>,
 Yuanhan Liu <yliu@fridaylinux.org>,
 Bruce Richardson <bruce.richardson@intel.com>,
 Konstantin Ananyev <konstantin.ananyev@intel.com>,
 Zhihong Wang <zhihong.wang@intel.com>
Message-ID: <20180419130326.GA4957@6wind.com>
References: <1523017443-12414-1-git-send-email-declan.doherty@intel.com>
 <20180418210423.13847-1-declan.doherty@intel.com>
 <20180418210423.13847-4-declan.doherty@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180418210423.13847-4-declan.doherty@intel.com>
Subject: Re: [dpdk-dev] [PATCH v4 3/6] testpmd: add jump action
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 19 Apr 2018 13:03:40 -0000

On Wed, Apr 18, 2018 at 10:04:20PM +0100, Declan Doherty wrote:
> Add support for specificaiton of new JUMP action to testpmd's flow

Typo on "specificaiton".

> cli, and update the testpmd documentation to describe this new
> action.
> 
> Signed-off-by: Declan Doherty <declan.doherty@intel.com>

Beside minor nits below, this patch is OK. I suggest to merge it in the
previous one ("Add jump action type to rte_flow").

> ---
>  app/test-pmd/cmdline_flow.c                 | 23 +++++++++++++++++++++++
>  doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 ++++
>  2 files changed, 27 insertions(+)
> 
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 59f3b3b57..93e9a240d 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -157,6 +157,8 @@ enum index {
>  	ACTION_END,
>  	ACTION_VOID,
>  	ACTION_PASSTHRU,
> +	ACTION_JUMP,
> +	ACTION_JUMP_GROUP,
>  	ACTION_MARK,
>  	ACTION_MARK_ID,
>  	ACTION_FLAG,
> @@ -590,6 +592,7 @@ static const enum index next_action[] = {
>  	ACTION_END,
>  	ACTION_VOID,
>  	ACTION_PASSTHRU,
> +	ACTION_JUMP,
>  	ACTION_MARK,
>  	ACTION_FLAG,
>  	ACTION_QUEUE,
> @@ -640,6 +643,12 @@ static const enum index action_meter[] = {
>  	ZERO,
>  };
>  
> +static const enum index action_jump[] = {
> +	ACTION_JUMP_GROUP,
> +	ACTION_NEXT,
> +	ZERO,
> +};
> +
>  static int parse_init(struct context *, const struct token *,
>  		      const char *, unsigned int,
>  		      void *, unsigned int);
> @@ -1506,6 +1515,20 @@ static const struct token token_list[] = {
>  		.next = NEXT(NEXT_ENTRY(ACTION_NEXT)),
>  		.call = parse_vc,
>  	},
> +	[ACTION_JUMP] = {
> +		.name = "jump",
> +		.help = "redirect packets to a given group",

How about: packets => traffic

> +		.priv = PRIV_ACTION(JUMP, sizeof(struct rte_flow_action_jump)),
> +		.next = NEXT(action_jump),
> +		.call = parse_vc,
> +	},
> +	[ACTION_JUMP_GROUP] = {
> +		.name = "group",
> +		.help = "group to redirect packets to",
> +		.next = NEXT(action_jump, NEXT_ENTRY(UNSIGNED)),
> +		.args = ARGS(ARGS_ENTRY(struct rte_flow_action_jump, group)),
> +		.call = parse_vc_conf,
> +	},
>  	[ACTION_MARK] = {
>  		.name = "mark",
>  		.help = "attach 32 bit value to packets",
> diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> index a766ac795..7ecd602da 100644
> --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
> @@ -3386,6 +3386,10 @@ This section lists supported actions and their attributes, if any.
>  
>  - ``passthru``: let subsequent rule process matched packets.
>  
> +- ``jump``: redirect packet to group on device

Missing "."

> +
> +  - ``group {unsigned}``: group to redirect to

Ditto.

> +
>  - ``mark``: attach 32 bit value to packets.
>  
>    - ``id {unsigned}``: 32 bit value to return with packets.
> -- 
> 2.14.3
> 

-- 
Adrien Mazarguil
6WIND