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 <[email protected]> > --- > 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

