[PATCH 2/2] net/mlx5: fix INET IPIP protocol type

Gregory Etelson getelson at nvidia.com
Mon Mar 7 07:04:13 CET 2022


Hello Ferruh,

::snip::

> > Fixes: f3f1f576f438 ("net/mlx5: fix RSS
> expansion with explicit next protocol")
> > Signed-off-by: Gregory Etelson
> <getelson at nvidia.com>
> > Acked-by: Matan Azrad <matan at nvidia.com>
> > ---
> >   drivers/net/mlx5/mlx5_flow.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/mlx5/mlx5_flow.c
> b/drivers/net/mlx5/mlx5_flow.c
> > index 0d774cfd19..efb988a9bb 100644
> > --- a/drivers/net/mlx5/mlx5_flow.c
> > +++ b/drivers/net/mlx5/mlx5_flow.c
> > @@ -208,7 +208,7 @@
> mlx5_inet_proto_to_item_type(uint8_t
> proto_spec, uint8_t proto_mask)
> >       case IPPROTO_TCP:
> >               type = RTE_FLOW_ITEM_TYPE_TCP;
> >               break;
> > -     case IPPROTO_IP:
> > +     case IPPROTO_IPIP:
> 
> Hi Gregory, Matan,
> 
> Are you sure about this change?
> 
> In linux header (include/uapi/linux/in.h) it is
> defined as:
> IPPROTO_IPIP = 4,               /* IPIP tunnels (older
> KA9Q tunnels use 94) */
> 
> And IPIP tunnels as far as I can found [1]:
> IPIP tunnel, just as the name suggests, is an IP
> over IP tunnel, defined in RFC 2003.
> 
> 
> Since type set to 'RTE_FLOW_ITEM_TYPE_IPV4'
> in this case
> statement, I would like to double check if this is
> correct.
> 

That code is part of MLX5 PMD RSS expansion model.
The code returns RTE flow pattern type of the next network header.
In case of IPv4 in IPv4 tunnel, next header for the outer IPv4 is also IPv4.
Therefore, the code returns 'RTE_FLOW_ITEM_TYPE_IPV4'.

Regards,
Gregory




More information about the stable mailing list