History

net: nexthop: add NHA_DST_PORT for fdb nexthops

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.

Jack Ma committed 3 months ago

Commit 53531e61 parent 61a878b3 files · +24 −1Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/nexthop.h+3−0
@@ -83,6 +83,9 @@ enum { · 82 unmodified lines
83 /* u32; read-only; whether any driver collects HW stats */83 /* u32; read-only; whether any driver collects HW stats */
84 NHA_HW_STATS_USED,84 NHA_HW_STATS_USED,
85 85
86 /* be16; UDP destination port for an fdb nexthop (e.g. VXLAN) */
87 NHA_DST_PORT,
88
86 __NHA_MAX,89 __NHA_MAX,
87};90};
88 91

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t