DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Nélio Laranjeiro" <nelio.laranjeiro@6wind.com>
To: Matan Azrad <matan@mellanox.com>
Cc: Shahaf Shuler <shahafs@mellanox.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: support MPLS-in-GRE and MPLS-in-UDP
Date: Tue, 15 May 2018 11:37:47 +0200	[thread overview]
Message-ID: <20180515093747.33pcjpl25y5klibk@laranjeiro-vm.dev.6wind.com> (raw)
In-Reply-To: <1526305280-23078-1-git-send-email-matan@mellanox.com>

Hi Matan, 

I have a single comment, please see bellow,

On Mon, May 14, 2018 at 01:41:20PM +0000, Matan Azrad wrote:
> Add support for MPLS over GRE and MPLS over UDP tunnel types as
> described in the next RFCs:
> 1. https://tools.ietf.org/html/rfc4023
> 2. https://tools.ietf.org/html/rfc7510
> 3. https://tools.ietf.org/html/rfc4385
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  doc/guides/nics/mlx5.rst     |   4 +-
>  drivers/net/mlx5/Makefile    |   5 ++
>  drivers/net/mlx5/mlx5.c      |  13 ++++
>  drivers/net/mlx5/mlx5.h      |   1 +
>  drivers/net/mlx5/mlx5_flow.c | 154 +++++++++++++++++++++++++++++++++++++++++--
>  5 files changed, 170 insertions(+), 7 deletions(-)
>[...]
> @@ -896,7 +928,9 @@ struct ibv_spec_header {
>  		if (ret)
>  			goto exit_item_not_supported;
>  		if (IS_TUNNEL(items->type)) {
> -			if (parser->tunnel) {
> +			if (parser->tunnel &&
> +			   !((items - 1)->type == RTE_FLOW_ITEM_TYPE_GRE &&
> +			     items->type == RTE_FLOW_ITEM_TYPE_MPLS)) {
>  				rte_flow_error_set(error, ENOTSUP,
>  						   RTE_FLOW_ERROR_TYPE_ITEM,
>  						   items,
> @@ -904,6 +938,16 @@ struct ibv_spec_header {
>  						   " tunnel encapsulations.");
>  				return -rte_errno;
>  			}
> +			if (items->type == RTE_FLOW_ITEM_TYPE_MPLS &&
> +			    !priv->config.mpls_en) {
> +				rte_flow_error_set(error, ENOTSUP,
> +						   RTE_FLOW_ERROR_TYPE_ITEM,
> +						   items,
> +						   "MPLS not supported or"
> +						   " disabled in firmware"
> +						   " configuration.");
> +				return -rte_errno;
> +			}
>  			if (!priv->config.tunnel_en &&
>  			    parser->rss_conf.level > 1) {
>  				rte_flow_error_set(error, ENOTSUP,

Doing such comparison will not work in all cases like

 GRE / VOID / MPLS

which is totally valid from rte_flow perspective.

Regards,

-- 
Nélio Laranjeiro
6WIND

  reply	other threads:[~2018-05-15  9:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 13:41 Matan Azrad
2018-05-15  9:37 ` Nélio Laranjeiro [this message]
2018-05-15 11:01   ` Matan Azrad
2018-05-15 11:07 ` [dpdk-dev] [PATCH v2] " Matan Azrad
2018-05-15 12:04   ` Nélio Laranjeiro
2018-05-15 12:27     ` Shahaf Shuler

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=20180515093747.33pcjpl25y5klibk@laranjeiro-vm.dev.6wind.com \
    --to=nelio.laranjeiro@6wind.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.com \
    --cc=shahafs@mellanox.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).