All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: dev@dpdk.org, Adrien Mazarguil <adrien.mazarguil@6wind.com>
Subject: Re: [PATCH v3 3/4] net/mlx5: add rte_flow rule creation
Date: Mon, 26 Dec 2016 13:20:34 +0100	[thread overview]
Message-ID: <20161226122034.GK27385@autoinstall.dev.6wind.com> (raw)
In-Reply-To: <1f1d914a-143b-94cd-9ade-f09e84c05df3@intel.com>

On Fri, Dec 23, 2016 at 12:21:10PM +0000, Ferruh Yigit wrote:
> On 12/21/2016 3:19 PM, Nelio Laranjeiro wrote:
> > Convert Ethernet, IPv4, IPv6, TCP, UDP layers into ibv_flow and create
> > those rules when after validation (i.e. NIC supports the rule).
> > 
> > VLAN is still not supported in this commit.
> > 
> > Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
> 
> <...>
> 
> > +static struct rte_flow *
> > +priv_flow_create(struct priv *priv,
> > +		 const struct rte_flow_attr *attr,
> > +		 const struct rte_flow_item items[],
> > +		 const struct rte_flow_action actions[],
> > +		 struct rte_flow_error *error)
> > +{
> > +	struct rte_flow *rte_flow = NULL;
> 
> Unnecessary assignment.
> 
> <...>
> 
> > +	action = (struct action) {
> > +		.queue = -1,
> > +		.drop = 0,
> > +	};
> > +	for (; actions->type != RTE_FLOW_ACTION_TYPE_END; ++actions) {
> > +		if (actions->type == RTE_FLOW_ACTION_TYPE_VOID) {
> > +			continue;
> > +		} else if (actions->type == RTE_FLOW_ACTION_TYPE_QUEUE) {
> > +			action.queue = ((const struct rte_flow_action_queue *)
> > +					actions->conf)->index;
> > +		} else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) {
> > +			action.drop = 1;
> > +		} else {
> > +			rte_flow_error_set(error, ENOTSUP,
> > +					   RTE_FLOW_ERROR_TYPE_ACTION,
> > +					   actions, "unsupported action");
> > +			goto exit;
> > +		}
> > +	}
> > +	if (action.queue >= 0) {
> > +		queue = action.queue;
> > +	} else if (action.drop) {
> > +		queue = MLX5_FLOW_DROP_QUEUE;
> > +	} else {
> 
> Not really so important, but as a note, ACTION_TYPE_VOID hits here. It
> pass from validation, but gives error in creation.
> 
> > +		rte_flow_error_set(error, ENOTSUP,
> > +				   RTE_FLOW_ERROR_TYPE_ACTION,
> > +				   actions,
> > +				   "no possible action found");
> > +		goto exit;
> > +	}
> 
> <...>

Hi Ferruh,

I will send (very soon) a v4 to handle this situation.

Regards,

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2016-12-26 12:20 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-25 18:14 [PATCH 0/3] net/mlx5: support flow_rte Nelio Laranjeiro
2016-11-25 18:14 ` [PATCH 1/3] net/mlx5: add preliminary support for rte_flow Nelio Laranjeiro
2016-11-25 18:14 ` [PATCH 2/3] net/mlx5: add software " Nelio Laranjeiro
2016-11-25 18:14 ` [PATCH 3/3] net/mlx5: add rte_flow rule creation Nelio Laranjeiro
2016-12-21 10:01 ` [PATCH v2 0/4] net/mlx5: support flow_rte Nelio Laranjeiro
2016-12-21 10:01   ` [PATCH v2 1/4] net/mlx5: add preliminary support for rte_flow Nelio Laranjeiro
2016-12-21 10:01   ` [PATCH v2 2/4] net/mlx5: add software " Nelio Laranjeiro
2016-12-21 10:01   ` [PATCH v2 3/4] net/mlx5: add rte_flow rule creation Nelio Laranjeiro
2016-12-21 10:01   ` [PATCH v2 4/4] net/mlx5: add VLAN filter support in rte_flow Nelio Laranjeiro
2016-12-21 15:19   ` [PATCH v3 0/4] net/mlx5: support flow_rte Nelio Laranjeiro
2016-12-21 15:19     ` [PATCH v3 1/4] net/mlx5: add preliminary support for rte_flow Nelio Laranjeiro
2016-12-21 15:19     ` [PATCH v3 2/4] net/mlx5: add software " Nelio Laranjeiro
2016-12-23 12:19       ` Ferruh Yigit
2016-12-23 13:24         ` Adrien Mazarguil
2016-12-21 15:19     ` [PATCH v3 3/4] net/mlx5: add rte_flow rule creation Nelio Laranjeiro
2016-12-23 12:21       ` Ferruh Yigit
2016-12-26 12:20         ` Nélio Laranjeiro [this message]
2016-12-21 15:19     ` [PATCH v3 4/4] net/mlx5: add VLAN filter support in rte_flow Nelio Laranjeiro
2016-12-28 10:37     ` [PATCH v4 0/6] net/mlx5: support flow API Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 1/6] net/mlx5: add preliminary flow API support Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 2/6] net/mlx5: support basic flow items and actions Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 3/6] net/mlx5: support VLAN flow item Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 4/6] net/mlx5: support VXLAN " Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 5/6] net/mlx5: support mark flow action Nelio Laranjeiro
2016-12-28 10:37       ` [PATCH v4 6/6] net/mlx5: extend IPv4 flow item Nelio Laranjeiro
2016-12-29 15:15       ` [PATCH v5 0/6] net/mlx5: support flow API Nelio Laranjeiro
2016-12-29 15:15         ` [PATCH v5 1/6] net/mlx5: add preliminary flow API support Nelio Laranjeiro
2016-12-29 15:15         ` [PATCH v5 2/6] net/mlx5: support basic flow items and actions Nelio Laranjeiro
2017-01-04 17:49           ` Ferruh Yigit
2017-01-04 18:42             ` Adrien Mazarguil
2017-01-06 13:52               ` Ferruh Yigit
2017-01-09 15:29                 ` Adrien Mazarguil
2016-12-29 15:15         ` [PATCH v5 3/6] net/mlx5: support VLAN flow item Nelio Laranjeiro
2016-12-29 15:15         ` [PATCH v5 4/6] net/mlx5: support VXLAN " Nelio Laranjeiro
2016-12-29 15:15         ` [PATCH v5 5/6] net/mlx5: support mark flow action Nelio Laranjeiro
2016-12-29 15:15         ` [PATCH v5 6/6] net/mlx5: extend IPv4 flow item Nelio Laranjeiro
2017-01-03 16:19         ` [PATCH v5 0/6] net/mlx5: support flow API Ferruh Yigit
2017-01-04 14:48         ` 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=20161226122034.GK27385@autoinstall.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.