lagg: re-check port caps after bringing up a port

Some nic drivers (including iflib) do not initialize if_hwassist
until after the interface is brought up.  If a lagg member is included
in a lagg when its not yet been brought up, that will cause lagg to see
if_hwassist=0 and will disable all checksum offload, etc, on the interface.
This is almost impossible to debug without kgdb or dtrace, as ifconfig does
not surface if_hwassist.

Fix this by re-calculating lagg caps (including if_hwassist) after adding a port.

I encountered this problem when I had a commented-out if_foo1=up entry in
my rc.conf that i neglected to uncomment when I was re-configuring a lagg.

Sponsored by: Netflix
Reviewed by: markj, zlei
Differential Revision: https://reviews.freebsd.org/D58062
This commit is contained in:
Andrew Gallatin committed 2026-07-08 08:27:58 -04:00
1 parent 8a14fcd23a
commit 1cce5ef05d
1 file changed
+2
+2
View File
@@ -1309,6 +1309,8 @@ lagg_init_locked(struct lagg_softc *sc)
lagg_if_updown(sc, true);
/* Recheck port caps; bringing them up may have changed if_hwassist. */
lagg_capabilities(sc);
lagg_proto_init(sc);
if (ifp->if_type == IFT_INFINIBAND) {