diff options
-rw-r--r-- | include/linux/netdevice.h | 3 | ||||
-rw-r--r-- | net/bridge/br_if.c | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index c0c2b46face1..50a4719512ed 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -320,6 +320,9 @@ struct net_device | |||
320 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) | 320 | #define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT) |
321 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) | 321 | #define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT) |
322 | 322 | ||
323 | /* List of features with software fallbacks. */ | ||
324 | #define NETIF_F_GSO_SOFTWARE (NETIF_F_TSO | NETIF_F_TSO_ECN | NETIF_F_TSO6) | ||
325 | |||
323 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) | 326 | #define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) |
324 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) | 327 | #define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) |
325 | 328 | ||
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 | } |