[dpdk-dev] [PATCH] net/mlx5: prohibit wildcard match for GRE protocol
Matan Azrad
matan at mellanox.com
Sun Aug 5 08:24:39 CEST 2018
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 at dpdk.org
>
> Signed-off-by: Yongseok Koh <yskoh at 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
More information about the dev
mailing list