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
This commit is contained in:
Andrew Thompson 2008-08-16 23:59:17 +00:00
parent e4e130244d
commit ef57ba98a7

View File

@ -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);
}