aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2026-07-08 12:24:35 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2026-07-08 12:27:58 +0000
commit1cce5ef05d7ba077b0cb29d30b59f3a862e7e5ae (patch)
treef8ad6ef26f06e154beab385143fd4a5a7db5af0c
parent8a14fcd23a201944f3eb5086403d10cfe1fc128f (diff)
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
-rw-r--r--sys/net/if_lagg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index da08e02d50be..e8e0306b0d1f 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -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) {