Re: [PATCH net-next v4 3/3] selftests: net: add coverage for fdb nexthop dst_port
From: David Ahern
Date: Thu Jul 23 2026 - 10:55:52 EST
On 7/22/26 7:17 PM, Jack Ma wrote:
> Add coverage for the new per-nexthop VXLAN destination port
> (NHA_DST_PORT).
>
> In fib_nexthops.sh, new ipv4_fdb_port_fcnal() and ipv6_fdb_port_fcnal()
> tests check that a dst_port is accepted on an fdb nexthop that has a
> gateway and echoed back on dump, that it is rejected without a gateway
> and rejected when zero, that a group may hold legs that differ only in
> UDP port, and that a portless fdb nexthop omits the attribute. The
> tests SKIP when iproute2 lacks the "dst_port" keyword.
>
> In test_vxlan_nh.sh, basic_tx_common() gains a second fdb nexthop group
> whose nexthop carries a destination port that differs from the VXLAN
> device default, plus a flower filter keyed on that port, to confirm the
> per-nexthop port is used on the wire. The test now requires an iproute2
> with dst_port support.
>
> Signed-off-by: Jack Ma <jack4it@xxxxxxxxx>
> ---
> tools/testing/selftests/net/fib_nexthops.sh | 81 ++++++++++++++++++++++++++++
> tools/testing/selftests/net/test_vxlan_nh.sh | 34 +++++++++++-
> 2 files changed, 113 insertions(+), 2 deletions(-)
>
Reviewed-by: David Ahern <dsahern@xxxxxxxxxx>