diff options
author | Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp> | 2014-12-09 21:43:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-12 10:58:53 -0500 |
commit | 53f6b708f89668cfb5eb9e49384b64b237bae0b2 (patch) | |
tree | 1189164adb4f6654cd99bfe4cafa38bfd8a9296b /net/8021q | |
parent | 5fbea33740aeb948422d7b7e8aafbeac362264b2 (diff) |
vlan: Add ability to always enable TSO/UFO
Since the real device can segment packets by software, a vlan device
can set TSO/UFO even when the real device doesn't have those features.
Unlike GSO, this allows packets to be segmented after Qdisc.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan_dev.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c index 376805005cc7..118956448cf6 100644 --- a/net/8021q/vlan_dev.c +++ b/net/8021q/vlan_dev.c | |||
@@ -579,11 +579,12 @@ static int vlan_dev_init(struct net_device *dev) | |||
579 | (1<<__LINK_STATE_PRESENT); | 579 | (1<<__LINK_STATE_PRESENT); |
580 | 580 | ||
581 | dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | | 581 | dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG | |
582 | NETIF_F_FRAGLIST | NETIF_F_ALL_TSO | | 582 | NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE | |
583 | NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | | 583 | NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM | |
584 | NETIF_F_ALL_FCOE; | 584 | NETIF_F_ALL_FCOE; |
585 | 585 | ||
586 | dev->features |= real_dev->vlan_features | NETIF_F_LLTX; | 586 | dev->features |= real_dev->vlan_features | NETIF_F_LLTX | |
587 | NETIF_F_GSO_SOFTWARE; | ||
587 | dev->gso_max_size = real_dev->gso_max_size; | 588 | dev->gso_max_size = real_dev->gso_max_size; |
588 | if (dev->features & NETIF_F_VLAN_FEATURES) | 589 | if (dev->features & NETIF_F_VLAN_FEATURES) |
589 | netdev_warn(real_dev, "VLAN features are set incorrectly. Q-in-Q configurations may not work correctly.\n"); | 590 | netdev_warn(real_dev, "VLAN features are set incorrectly. Q-in-Q configurations may not work correctly.\n"); |
@@ -648,7 +649,7 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev, | |||
648 | features |= NETIF_F_RXCSUM; | 649 | features |= NETIF_F_RXCSUM; |
649 | features = netdev_intersect_features(features, real_dev->features); | 650 | features = netdev_intersect_features(features, real_dev->features); |
650 | 651 | ||
651 | features |= old_features & NETIF_F_SOFT_FEATURES; | 652 | features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE); |
652 | features |= NETIF_F_LLTX; | 653 | features |= NETIF_F_LLTX; |
653 | 654 | ||
654 | return features; | 655 | return features; |