[2/2] net/mlx5: fix INET IPIP protocol type
Checks
Commit Message
Fix typo in INET IPIP protocol macro.
Cc: stable@dpdk.org
Fixes: f3f1f576f438 ("net/mlx5: fix RSS expansion with explicit next protocol")
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
drivers/net/mlx5/mlx5_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 3/1/2022 3:18 PM, Gregory Etelson wrote:
> Fix typo in INET IPIP protocol macro.
>
> Cc: stable@dpdk.org
>
> Fixes: f3f1f576f438 ("net/mlx5: fix RSS expansion with explicit next protocol")
> Signed-off-by: Gregory Etelson <getelson@nvidia.com>
> Acked-by: Matan Azrad <matan@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.
[1]
https://developers.redhat.com/blog/2019/05/17/an-introduction-to-linux-virtual-interfaces-tunnels#ipip_tunnel
Hello Ferruh,
::snip::
> > Fixes: f3f1f576f438 ("net/mlx5: fix RSS
> expansion with explicit next protocol")
> > Signed-off-by: Gregory Etelson
> <getelson@nvidia.com>
> > Acked-by: Matan Azrad <matan@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
@@ -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:
type = RTE_FLOW_ITEM_TYPE_IPV4;
break;
case IPPROTO_IPV6: