summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2014-04-14 20:34:48 +0000
committerrmacklem <rmacklem@FreeBSD.org>2014-04-14 20:34:48 +0000
commitff97df6be22e57bf2e09acf8efe0fc99e289ad3c (patch)
tree825bef0112d2e6ce29038e638b990fff1d518f1f /sys/net
parent5906c6773b959dc0603b2a0ecf5744a8c6dcf3d5 (diff)
downloadFreeBSD-src-ff97df6be22e57bf2e09acf8efe0fc99e289ad3c.zip
FreeBSD-src-ff97df6be22e57bf2e09acf8efe0fc99e289ad3c.tar.gz
Lagg did not set the value of if_hw_tsomax, so when lagg
was stacked on top of network interfaces that set if_hw_tsomax, tcp_output() would see the default value instead of the value set by the network interface(s). This patch modifies lagg so that it sets if_hw_tsomax to the minimum of the value(s) for the underlying network interfaces. Reviewed by: glebius MFC after: 2 weeks
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_lagg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
index c900064..2399da2 100644
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -448,6 +448,7 @@ lagg_capabilities(struct lagg_softc *sc)
struct lagg_port *lp;
int cap = ~0, ena = ~0;
u_long hwa = ~0UL;
+ u_int hw_tsomax = IP_MAXPACKET; /* Initialize to the maximum value. */
LAGG_WLOCK_ASSERT(sc);
@@ -456,6 +457,10 @@ lagg_capabilities(struct lagg_softc *sc)
cap &= lp->lp_ifp->if_capabilities;
ena &= lp->lp_ifp->if_capenable;
hwa &= lp->lp_ifp->if_hwassist;
+ /* Set to the minimum value of the lagg ports. */
+ if (lp->lp_ifp->if_hw_tsomax < hw_tsomax &&
+ lp->lp_ifp->if_hw_tsomax > 0)
+ hw_tsomax = lp->lp_ifp->if_hw_tsomax;
}
cap = (cap == ~0 ? 0 : cap);
ena = (ena == ~0 ? 0 : ena);
@@ -463,10 +468,12 @@ lagg_capabilities(struct lagg_softc *sc)
if (sc->sc_ifp->if_capabilities != cap ||
sc->sc_ifp->if_capenable != ena ||
- sc->sc_ifp->if_hwassist != hwa) {
+ sc->sc_ifp->if_hwassist != hwa ||
+ sc->sc_ifp->if_hw_tsomax != hw_tsomax) {
sc->sc_ifp->if_capabilities = cap;
sc->sc_ifp->if_capenable = ena;
sc->sc_ifp->if_hwassist = hwa;
+ sc->sc_ifp->if_hw_tsomax = hw_tsomax;
getmicrotime(&sc->sc_ifp->if_lastchange);
if (sc->sc_ifflags & IFF_DEBUG)
OpenPOWER on IntegriCloud