[dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE
Shahaf Shuler
shahafs at mellanox.com
Sun Aug 5 13:17:21 CEST 2018
Sunday, August 5, 2018 9:41 AM, Matan Azrad:
> Subject: RE: [dpdk-dev] [PATCH] net/mlx5: fix sanity check for MPLS-in-GRE
>
> Hi Koh
>
> From: Yongseok Koh
> > Multiple tunnel isn't allowed but MPLS over GRE should be accepted.
> >
> > Fixes: a4a5cd21d20a ("net/mlx5: add flow MPLS item")
> >
> > Signed-off-by: Yongseok Koh <yskoh at mellanox.com>
> > ---
> > drivers/net/mlx5/mlx5_flow.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.c
> > b/drivers/net/mlx5/mlx5_flow.c index
> > b7500ec9d6..ca4625b699 100644
> > --- a/drivers/net/mlx5/mlx5_flow.c
> > +++ b/drivers/net/mlx5/mlx5_flow.c
> > @@ -1778,7 +1778,9 @@ mlx5_flow_item_mpls(const struct
> rte_flow_item
> > *item __rte_unused,
> > item,
> > "protocol filtering not compatible"
> > " with MPLS layer");
> > - if (flow->layers & MLX5_FLOW_LAYER_TUNNEL)
> > + /* Multi-tunnel isn't allowed but MPLS over GRE is an exception. */
> > + if (flow->layers & MLX5_FLOW_LAYER_TUNNEL &&
> > + (flow->layers & MLX5_FLOW_LAYER_GRE) !=
>
> This check is not fully correct because the GRE item must be the last valid
> item before the mpls, so the next flow
>
> eth / ipv4 / gre / ipv4 / mpls
>
> is not valid.
>
> But the next flows are valid:
> eth / ipv4 / gre / mpls
> eth / ipv4 / gre / void / mpls
> eth / ipv4 / gre / void / void / void / mpls
Spoke w/ Matan on it.
It is correct this patch is not complete, however considering the release schedule it is better to have it in than giveup the MPLS-in-GRE support for 18.08.
Hence applying this patch and keep track on subsequent one to fully detect all cases.
Applied to next-net-mlx, thanks.
>
>
>
> > MLX5_FLOW_LAYER_GRE)
> > return rte_flow_error_set(error, ENOTSUP,
> > RTE_FLOW_ERROR_TYPE_ITEM,
> > item,
> > --
> > 2.11.0
More information about the dev
mailing list