netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] veth: Fix vlan_features so as to be able to use stacked vlan interfaces
@ 2014-02-18 12:20 Toshiaki Makita
  2014-02-18 12:20 ` [PATCH net] tun: remove bogus hardware vlan acceleration flags from vlan_features Toshiaki Makita
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Toshiaki Makita @ 2014-02-18 12:20 UTC (permalink / raw)
  To: David S . Miller; +Cc: Toshiaki Makita, Flavio Leitner, netdev

Even if we create a stacked vlan interface such as veth0.10.20, it sends
single tagged frames (tagged with only vid 10).
Because vlan_features of a veth interface has the
NETIF_F_HW_VLAN_[CTAG/STAG]_TX bits, veth0.10 also has that feature, so
dev_hard_start_xmit(veth0.10) doesn't call __vlan_put_tag() and
vlan_dev_hard_start_xmit(veth0.10) overwrites vlan_tci.
This prevents us from using a combination of 802.1ad and 802.1Q
in containers, etc.

Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
 drivers/net/veth.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 2ec2041..5b37437 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -285,7 +285,8 @@ static void veth_setup(struct net_device *dev)
 	dev->ethtool_ops = &veth_ethtool_ops;
 	dev->features |= NETIF_F_LLTX;
 	dev->features |= VETH_FEATURES;
-	dev->vlan_features = dev->features;
+	dev->vlan_features = dev->features &
+			     ~(NETIF_F_HW_VLAN_CTAG_TX | NETIF_F_HW_VLAN_STAG_TX);
 	dev->destructor = veth_dev_free;
 
 	dev->hw_features = VETH_FEATURES;
-- 
1.8.1.2

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

end of thread, other threads:[~2014-02-20  7:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-18 12:20 [PATCH net] veth: Fix vlan_features so as to be able to use stacked vlan interfaces Toshiaki Makita
2014-02-18 12:20 ` [PATCH net] tun: remove bogus hardware vlan acceleration flags from vlan_features Toshiaki Makita
2014-02-20  7:16   ` David Miller
2014-02-19  4:13 ` [PATCH net] veth: Fix vlan_features so as to be able to use stacked vlan interfaces Flavio Leitner
2014-02-19  5:22   ` Toshiaki Makita
2014-02-20  1:02     ` Flavio Leitner
2014-02-20  7:16 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).