Re: vlan disable TSO of virtio in KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I read some kernel source. My basic understanding is that, in
net/8021q/vlan_dev.c, vlan_dev_init, the dev->features of vconfig
created interface is defined to be
dev->features |= real_dev->features & real_dev->vlan_features;

However, in drivers/net/virtio_net.c, vlan_features are never set (I
will assume it would be 0). So, dev->features will be 0 for the
ethX.vid interface.

I verify it  using ethtool -k on each KVM.
# ethtool -k eth0
shows that rx/tx csum, sg, tso, gso are on
# ethtool -k eth0.3003
all offloading features are off.

I think that is why TSO is never enabled when running large package
traffic between two vlan interfaces of different KVMs.

I also took a look at VMware's pv implementation, which is
drivers/net/vmxnet3/vmxnet3_drv.c, they have enable dev->vlan_features
when probing, by
	netdev->vlan_features = netdev->features;


I was wondering why vlan_features was not defined in virtio_net. Is it
a BUG? Or, it is due to some constraints?
Could any explain that?

Thanks,
-D



On Thu, Feb 25, 2010 at 6:30 PM, David V. Cloud <david.v.cloud@xxxxxxxxx> wrote:
> Hi all,
> I have been deploying two KVMs on my Debian testing box. Two KVMs each
> use one tap device connecting to the host.
>
> When I
> doing netperf with large package size from KVM2 (tap1) to KVM1 (tap0)
> using ethX on them, I could verify that TSO did happened by
>      # tcpdump -nt -i tap1
> I can see messages like,
> IP 192.168.101.2.39994 > 192.168.101.1.41316: Flags [P.], seq
> 7912865:7918657, ack 0, win 92, options [nop,nop,TS val 874151 ecr
> 874803], length 5792
>
> So, according the 'length', skb didn't get segmented.
>
> However, When I
> (1) setup VLAN using vconfig on KVM2, KVM1, and got two new interface
> eth1.3003, eth0.3003 on both machines.
> (2) netperf between two new interface, TSO no longer showed up,
>      # tcpdump -nt -i tap1
> I only got,
> vlan 3003, p 0, IP 10.214.10.2.42324 > 10.214.10.1.56460: Flags [P.],
> seq 2127976:2129424, ack 1, win 92, options [nop,nop,TS val 926034 ecr
> 926686], length 1448
>
> So, all the large packages get segmented in virtio (is that right?)
>
> My KVM command line options are,
> kvm -hda $IMG -m 768 -net nic,model=virtio,macaddr=52:54:00:12:34:56
> -net tap,ifname=$TAP,script=no
>
>
>
> My question is whether it is the expected behavior? Can VLAN tagging
> coexist with TSO in virtio_net driver?
> If this is not desired result. Any hint for fixing the problem?
>
> Thanks
> -D
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux