Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

veth: add vlan features

The veth device doesn't provide the vlan features,
so TSO for example is disabled and that causes
performance issues when using tagged traffic.

The test topology looks like this:

br0 br1
/ \ / \
vnet veth0.10 ----- veth1.10 vnet
VM VM

The netperf results with current veth driver:
MIGRATED TCP STREAM TEST from 192.168.1.1 ()
port 0 AF_INET to 192.168.1.2 () port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec

87380 16384 16384 10.01 2210.22

Now after applying the proposed patch:
MIGRATED TCP STREAM TEST from 192.168.1.1 ()
port 0 AF_INET to 192.168.1.2 () port 0 AF_INET
Recv Send Send
Socket Socket Message Elapsed
Size Size Size Time Throughput
bytes bytes bytes secs. 10^6bits/sec

87380 16384 16384 10.00 13067.47

Signed-off-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Flavio Leitner and committed by
David S. Miller
b69bbddf 2f0a9afa

+1
+1
drivers/net/veth.c
··· 269 269 dev->ethtool_ops = &veth_ethtool_ops; 270 270 dev->features |= NETIF_F_LLTX; 271 271 dev->features |= VETH_FEATURES; 272 + dev->vlan_features = dev->features; 272 273 dev->destructor = veth_dev_free; 273 274 274 275 dev->hw_features = VETH_FEATURES;