summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2008-08-16 23:59:17 +0000
committerthompsa <thompsa@FreeBSD.org>2008-08-16 23:59:17 +0000
commitacfcaf8c4d48b4271dcf14445782b96366ec6f7e (patch)
tree3e1429445dc41db750d1011165ecaafcaa063638 /sys
parent716d0b6a6c2a023eec7be98da99391bba035735a (diff)
downloadFreeBSD-src-acfcaf8c4d48b4271dcf14445782b96366ec6f7e.zip
FreeBSD-src-acfcaf8c4d48b4271dcf14445782b96366ec6f7e.tar.gz
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
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_bridge.c11
1 files changed, 6 insertions, 5 deletions
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);
}
OpenPOWER on IntegriCloud