diff options
author | Andrew Thompson <thompsa@FreeBSD.org> | 2008-08-16 23:59:17 +0000 |
---|---|---|
committer | Andrew Thompson <thompsa@FreeBSD.org> | 2008-08-16 23:59:17 +0000 |
commit | ef57ba98a7b29ba8b24ddc9f09e69eb88692303f (patch) | |
tree | 3e1429445dc41db750d1011165ecaafcaa063638 /sys/net/if_bridge.c | |
parent | e4e130244ded83669937e8c896ce1424b1f2aa50 (diff) | |
download | src-ef57ba98a7b29ba8b24ddc9f09e69eb88692303f.tar.gz src-ef57ba98a7b29ba8b24ddc9f09e69eb88692303f.zip |
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
Notes
Notes:
svn path=/head/; revision=181795
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index be90803cc975..35e019abad62 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); } |