patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: Yongseok Koh <yskoh@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Yongseok Koh <yskoh@mellanox.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/mlx5: prohibit wildcard match for GRE	protocol
Date: Sun, 5 Aug 2018 06:24:39 +0000	[thread overview]
Message-ID: <AM0PR0502MB4019E730E9E0F5DA7E0333AAD2210@AM0PR0502MB4019.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <20180802205400.10316-1-yskoh@mellanox.com>

Hi Koh

From: Yongseok Koh
> Currently, driver sets full mask (0xffff) for GRE protocol to device. Until it is
> changed, PMD can't support wildcard match.
> 
> Fixes: f4b901a46aec ("net/mlx5: add flow GRE item")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> ---
>  drivers/net/mlx5/mlx5_flow.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index
> b7500ec9d6..83ac6cbb85 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -1690,8 +1690,12 @@ mlx5_flow_item_gre(const struct rte_flow_item
> *item,
>  					  RTE_FLOW_ERROR_TYPE_ITEM,
>  					  item,
>  					  "L3 Layer is missing");
> -	if (!mask)
> -		mask = &rte_flow_item_gre_mask;
> +	if (!mask || mask->protocol != 0xffff)

Why do you check !mask again, I think it's redundant.. no?

I think we can support also mask->protocol = 0:
In this case we just need to not specify a spec.

> +		return rte_flow_error_set(error, ENOTSUP,
> +					  RTE_FLOW_ERROR_TYPE_ITEM,
> +					  item,
> +					  "wildcard match is not supported"
> +					  " for protocol field of GRE");
>  	ret = mlx5_flow_item_acceptable
>  		(item, (const uint8_t *)mask,
>  		 (const uint8_t *)&rte_flow_item_gre_mask,
> --
> 2.11.0

  reply	other threads:[~2018-08-05  6:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-02 20:54 [dpdk-stable] " Yongseok Koh
2018-08-05  6:24 ` Matan Azrad [this message]
2018-08-05  7:01   ` [dpdk-stable] [dpdk-dev] " Matan Azrad
2018-08-06 20:01     ` Yongseok Koh

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=AM0PR0502MB4019E730E9E0F5DA7E0333AAD2210@AM0PR0502MB4019.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=stable@dpdk.org \
    --cc=yskoh@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).