Re: [PATCH 0/3] net: ioam6: makes IOAM insertion transparent to IPv6 ECMP

From: Hangbin Liu

Date: Fri Oct 30 2026 - 04:12:49 EST


On Wed, Oct 28, 2026 at 01:45:28PM +0800, Hangbin Liu wrote:
> This series makes IOAM insertion transparent to IPv6 ECMP, as required
> by RFC 9486 (C2): a packet carrying IOAM options must be forwarded
> along the same path as the identical packet without them.
>
> Patch 1 fixes the transit side: hash policy 0 hashed the raw IPv6
> nexthdr, which becomes NEXTHDR_HOP once an IOAM Hop-by-Hop header is
> inserted. The policy-0 key (and the ICMPv6-error flow selection) now
> uses the nexthdr the packet would have had if the Hop-by-Hop header
> carried only IOAM options and padding.
>
> Patch 2 fixes the injecting node: the ioam6 output re-lookup on a
> destination-cache miss hashed the transformed packet's NEXTHDR_HOP
> instead of the original nexthdr (inline) or IPPROTO_IPV6 (encap), and
> rebuilt the flow keys from the outer header only.
>
> Patch 3 adds selftests/net/ioam6_ecmp.sh, covering both places: a
> transit forwarder with a multipath route, and an encapsulating node
> compared against a plain ip6ip6 baseline.
>
> The issue was found while reviewing RFC9486. It can be reproduced and
> verified by the newly added ioam6_ecmp.sh test.
>
> Tested with:
> ecmp_rehash.sh
> fib_nexthops.sh
> ioam6_ecmp.sh
> tcp_ecmp_failover.sh
> forwarding/gre_inner_v4_multipath.sh
> forwarding/gre_inner_v6_multipath.sh
> forwarding/gre_multipath_nh_res.sh
> forwarding/gre_multipath_nh.sh
> forwarding/gre_multipath.sh
> forwarding/ip6gre_inner_v4_multipath.sh
> forwarding/ip6gre_inner_v6_multipath.sh
> forwarding/router_mpath_nh_res.sh
> forwarding/router_mpath_nh.sh
> forwarding/router_multipath.sh
>
> Signed-off-by: Hangbin Liu <liuhangbin@xxxxxxxxxx>
> ---
> Hangbin Liu (3):
> ipv6: route: consider IOAM options in ECMP hash policy 0
> ipv6: ioam6: use transformed packet nexthdr for ECMP re-lookup
> selftests: net: add ioam6 ECMP test (RFC 9486 C2)
>
> include/uapi/linux/in6.h | 1 +
> net/ipv6/ioam6_iptunnel.c | 4 +-
> net/ipv6/route.c | 67 +++++-
> tools/testing/selftests/net/Makefile | 1 +
> tools/testing/selftests/net/ioam6_ecmp.sh | 349 ++++++++++++++++++++++++++++++
> 5 files changed, 419 insertions(+), 3 deletions(-)
> ---
> base-commit: 5d7f3375cd574fc83f0cd30839b21455c0e79ae2
> change-id: 20261020-ipv6_ioam_ecmp-ae4ef0a4bdae
>
> Best regards,
> --
> Hangbin Liu <liuhangbin@xxxxxxxxxx>
>

Sashiko found some issues. I will fix them and post new version.

pw-bot: cr