diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2006-08-17 21:22:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-08-17 21:22:32 -0400 |
commit | 78eb887733ec8ff5d6e6c69e3c32a187a9303622 (patch) | |
tree | 1028d082b0240f04f1b0d8f91b9e2813e329710c /net/bridge/br_if.c | |
parent | 8311731afc439f508ab4d759edadedae75afb73e (diff) |
[BRIDGE]: Disable SG/GSO if TX checksum is off
When the bridge recomputes features, it does not maintain the
constraint that SG/GSO must be off if TX checksum is off.
This patch adds that constraint.
On a completely unrelated note, I've also added TSO6 and TSO_ECN
feature bits if GSO is enabled on the underlying device through
the new NETIF_F_GSO_SOFTWARE macro.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index f55ef682ef84..b1211d5342f6 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -386,12 +386,17 @@ void br_features_recompute(struct net_bridge *br) | |||
386 | checksum = 0; | 386 | checksum = 0; |
387 | 387 | ||
388 | if (feature & NETIF_F_GSO) | 388 | if (feature & NETIF_F_GSO) |
389 | feature |= NETIF_F_TSO; | 389 | feature |= NETIF_F_GSO_SOFTWARE; |
390 | feature |= NETIF_F_GSO; | 390 | feature |= NETIF_F_GSO; |
391 | 391 | ||
392 | features &= feature; | 392 | features &= feature; |
393 | } | 393 | } |
394 | 394 | ||
395 | if (!(checksum & NETIF_F_ALL_CSUM)) | ||
396 | features &= ~NETIF_F_SG; | ||
397 | if (!(features & NETIF_F_SG)) | ||
398 | features &= ~NETIF_F_GSO_MASK; | ||
399 | |||
395 | br->dev->features = features | checksum | NETIF_F_LLTX | | 400 | br->dev->features = features | checksum | NETIF_F_LLTX | |
396 | NETIF_F_GSO_ROBUST; | 401 | NETIF_F_GSO_ROBUST; |
397 | } | 402 | } |