From acfcaf8c4d48b4271dcf14445782b96366ec6f7e Mon Sep 17 00:00:00 2001 From: thompsa Date: Sat, 16 Aug 2008 23:59:17 +0000 Subject: LRO combined packets can actually be bridged as long as all the interfaces also support TSO, this can always be disabled manually if undesirable. Pointed out by: gallatin --- sys/net/if_bridge.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sys/net/if_bridge.c') diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index be90803..35e019a 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -166,10 +166,6 @@ __FBSDID("$FreeBSD$"); * List of capabilities to possibly mask on the member interface. */ #define BRIDGE_IFCAPS_MASK (IFCAP_TOE|IFCAP_TSO|IFCAP_TXCSUM) -/* - * List of capabilities to disable on the member interface. - */ -#define BRIDGE_IFCAPS_STRIP IFCAP_LRO /* * Bridge interface list entry. @@ -798,10 +794,15 @@ bridge_mutecaps(struct bridge_softc *sc) LIST_FOREACH(bif, &sc->sc_iflist, bif_next) { enabled = bif->bif_ifp->if_capenable; - enabled &= ~BRIDGE_IFCAPS_STRIP; /* strip off mask bits and enable them again if allowed */ enabled &= ~BRIDGE_IFCAPS_MASK; enabled |= mask; + /* + * Receive offload can only be enabled if all members also + * support send offload. + */ + if ((enabled & IFCAP_TSO) == 0) + enabled &= ~IFCAP_LRO; bridge_set_ifcap(sc, bif, enabled); } -- cgit v1.1