From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Junfeng Guo <junfengg@nvidia.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>, <viacheslavo@nvidia.com>,
<bingz@nvidia.com>, <orika@nvidia.com>, <suanmingm@nvidia.com>,
<matan@nvidia.com>, <rasland@nvidia.com>
Subject: Re: [PATCH] net/mlx5: fix IP tunnel detection for IPIP and IPv6 ENCAP
Date: Wed, 19 Nov 2025 12:12:13 +0100 [thread overview]
Message-ID: <20251119111213.2uqimokwzvcaluls@ds-vm-debian.local> (raw)
In-Reply-To: <20251119103554.44203-1-junfengg@nvidia.com>
On Wed, Nov 19, 2025 at 12:35:54PM +0200, Junfeng Guo wrote:
> The HWS (Hardware Steering) IP tunnel detection implementation was not
> recognizing IPIP tunnel types based on the next protocol value in the
> outer IP header as specified by RFC 2003 (IP-in-IP) and RFC 2473
> (IPv6 Encapsulation).
>
> The issue was that the code treated all combinations of [IPv4|6] / [IPv4|6]
> as IPIP tunnels, setting MLX5_FLOW_LAYER_IPIP flag regardless of the actual
> protocol. While this happened to work for simple cases due to the fallback
> classification, it violated RFC compliance and could cause issues with
> protocol validation.
>
> The fix adds RFC-compliant tunnel detection by
> 1. Checking the protocol field (IPPROTO_IPIP=4 or IPPROTO_IPV6=41) in the
> outer IP header to determine tunnel type
> 2. Adding protocol mismatch validation to ensure outer protocol matches
> inner header type
> 3. Correctly setting MLX5_FLOW_LAYER_IPV6_ENCAP for IPv6 encapsulation
>
> The expected tunnel patterns are now:
> - [ipv4 | ipv6] proto is 4 / ipv4 -> MLX5_FLOW_LAYER_IPIP
> - [ipv4 | ipv6] proto is 41 / ipv6 -> MLX5_FLOW_LAYER_IPV6_ENCAP
>
> For cases without protocol specification, fallback classification based on
> inner header type is still supported.
>
> Fixes: f66c7c3ab983 ("net/mlx5/hws: recognize IP-in-IP tunnel in definer layer")
> Fixes: 4b7044562f59 ("net/mlx5: support IP-in-IP tunnel for all combinations")
> Cc: stable@dpdk.org
>
> Signed-off-by: Junfeng Guo <junfengg@nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Best regards,
Dariusz Sosnowski
next prev parent reply other threads:[~2025-11-19 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 10:35 Junfeng Guo
2025-11-19 11:12 ` Dariusz Sosnowski [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-11-19 10:28 Junfeng Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251119111213.2uqimokwzvcaluls@ds-vm-debian.local \
--to=dsosnowski@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=junfengg@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=stable@dpdk.org \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).