All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] vlan: Add ability to always enable TSO/UFO
@ 2014-12-10  2:43 Toshiaki Makita
  2014-12-10  2:43   ` Toshiaki Makita
  2014-12-12 16:01 ` [PATCH net-next] vlan: " David Miller
  0 siblings, 2 replies; 12+ messages in thread
From: Toshiaki Makita @ 2014-12-10  2:43 UTC (permalink / raw)
  To: David S . Miller, Patrick McHardy; +Cc: Toshiaki Makita, netdev

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>
---
 net/8021q/vlan_dev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 3768050..1189564 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)
 		      (1<<__LINK_STATE_PRESENT);
 
 	dev->hw_features = NETIF_F_ALL_CSUM | NETIF_F_SG |
-			   NETIF_F_FRAGLIST | NETIF_F_ALL_TSO |
+			   NETIF_F_FRAGLIST | NETIF_F_GSO_SOFTWARE |
 			   NETIF_F_HIGHDMA | NETIF_F_SCTP_CSUM |
 			   NETIF_F_ALL_FCOE;
 
-	dev->features |= real_dev->vlan_features | NETIF_F_LLTX;
+	dev->features |= real_dev->vlan_features | NETIF_F_LLTX |
+			 NETIF_F_GSO_SOFTWARE;
 	dev->gso_max_size = real_dev->gso_max_size;
 	if (dev->features & NETIF_F_VLAN_FEATURES)
 		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,
 	features |= NETIF_F_RXCSUM;
 	features = netdev_intersect_features(features, real_dev->features);
 
-	features |= old_features & NETIF_F_SOFT_FEATURES;
+	features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE);
 	features |= NETIF_F_LLTX;
 
 	return features;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-12-12 16:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-10  2:43 [PATCH net-next] vlan: Add ability to always enable TSO/UFO Toshiaki Makita
2014-12-10  2:43 ` [Bridge] [PATCH net-next] bridge: " Toshiaki Makita
2014-12-10  2:43   ` Toshiaki Makita
2014-12-10 19:50   ` [Bridge] " David Miller
2014-12-10 19:50     ` David Miller
2014-12-11  2:04     ` [Bridge] " Toshiaki Makita
2014-12-11  2:04       ` Toshiaki Makita
2014-12-11  2:13       ` [Bridge] " David Miller
2014-12-11  2:13         ` David Miller
2014-12-11  2:20         ` [Bridge] " Toshiaki Makita
2014-12-11  2:20           ` Toshiaki Makita
2014-12-12 16:01 ` [PATCH net-next] vlan: " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.