]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: Share correct feature code between bridging and bonding
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 10 Aug 2007 22:47:58 +0000 (15:47 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 14 Aug 2007 05:52:14 +0000 (22:52 -0700)
commit40ff1233091e2436fd01499431c5feb1ddc1299c
tree8df6d6c66b69f18d521f76018ff98706e4e2a1b3
parent37f654838e0d80a631b7a7d52fd3dc128731e156
[NET]: Share correct feature code between bridging and bonding

http://bugzilla.kernel.org/show_bug.cgi?id=8797 shows that the
bonding driver may produce bogus combinations of the checksum
flags and SG/TSO.

For example, if you bond devices with NETIF_F_HW_CSUM and
NETIF_F_IP_CSUM you'll end up with a bonding device that
has neither flag set.  If both have TSO then this produces
an illegal combination.

The bridge device on the other hand has the correct code to
deal with this.

In fact, the same code can be used for both.  So this patch
moves that logic into net/core/dev.c and uses it for both
bonding and bridging.

In the process I've made small adjustments such as only
setting GSO_ROBUST if at least one constituent device
supports it.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
include/linux/netdevice.h
net/bridge/br_device.c
net/bridge/br_if.c
net/core/dev.c