Re: [PATCH net-next v4 1/3] net: nexthop: add NHA_DST_PORT for fdb nexthops
From: Ido Schimmel
Date: Thu Jul 23 2026 - 03:50:30 EST
On Thu, Jul 23, 2026 at 01:17:53AM +0000, Jack Ma wrote:
> Commit 1274e1cc4226 ("vxlan: ecmp support for mac fdb entries") lets a
> single inner MAC be reached through a group of remote VTEPs, with the
> kernel flow-hashing across the group members. Each member carries its
> own remote IP, but the UDP destination port is always taken from the
> VXLAN device (vxlan->cfg.dst_port) and cannot be set per member.
>
> Some deployments pack several receivers behind one underlay IP and tell
> them apart by UDP port, so they need a per-nexthop destination port to
> spread flows across (IP, port) tuples rather than IP alone.
>
> Add a netlink attribute NHA_DST_PORT (__be16, mirroring NDA_PORT) that
> carries an optional UDP destination port on an fdb nexthop. It is only
> accepted together with NHA_FDB and NHA_GATEWAY; it is stored in struct
> nh_info and echoed back on dump. The attribute is named generically
> rather than fdb-specific so it can be reused should another nexthop type
> ever need a destination port. This patch is control-plane plumbing
> only; the VXLAN datapath is wired up in a follow-up patch, so behaviour
> is unchanged for now.
>
> Signed-off-by: Jack Ma <jack4it@xxxxxxxxx>
Reviewed-by: Ido Schimmel <idosch@xxxxxxxxxx>