Re: [PATCH net-next v4 2/3] vxlan: honor per-nexthop fdb destination port
From: Ido Schimmel
Date: Thu Jul 23 2026 - 04:02:11 EST
On Thu, Jul 23, 2026 at 01:17:54AM +0000, Jack Ma wrote:
> When an fdb entry points at a nexthop group, vxlan_fdb_nh_path_select()
> resolves the selected leg's remote IP but leaves the UDP destination port
> at the device default (vxlan->cfg.dst_port).
>
> Extend nexthop_path_fdb_result() to also return the selected nexthop's
> NHA_DST_PORT (0 when unset) and have vxlan_fdb_nh_path_select() store it
> in rdst->remote_port. vxlan_xmit_one() already prefers rdst->remote_port
> when non-zero and falls back to the device port otherwise, so nexthops
> without a port are unaffected.
>
> This lets one fdb nexthop group load-balance a flow across legs that
> share an underlay IP but differ in UDP destination port.
>
> Signed-off-by: Jack Ma <jack4it@xxxxxxxxx>
Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>