Re: [PATCH 4/4] lguest: Use GSO/IFF_VNET_HDR extensions on tun/tap

2008-06-25 Thread Rusty Russell
On Thursday 26 June 2008 05:07:18 Anthony Liguori wrote: > Rusty Russell wrote: > > @@ -1563,6 +1561,16 @@ static void setup_tun_net(char *arg) > > /* Tell Guest what MAC address to use. */ > > add_feature(dev, VIRTIO_NET_F_MAC); > > add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); > > + /

Re: [PATCH 4/4] lguest: Use GSO/IFF_VNET_HDR extensions on tun/tap

2008-06-25 Thread Anthony Liguori
Rusty Russell wrote: > @@ -1563,6 +1561,16 @@ static void setup_tun_net(char *arg) > /* Tell Guest what MAC address to use. */ > add_feature(dev, VIRTIO_NET_F_MAC); > add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY); > + /* Expect Guest to handle everything except UFO */ > + add

Re: [PATCH 4/4] lguest: Use GSO/IFF_VNET_HDR extensions on tun/tap

2008-06-25 Thread Rusty Russell
On Thursday 26 June 2008 00:32:12 Rusty Russell wrote: > (Might not apply cleanly to current Linus, there are other lguest things > going on, but this gives you the idea at least). ... > + if (ioctl(netfd, TUNSETFEATURES, > + TUN_F_CSUM|TUN_F_TSO4|TUN_F_TSO6|TUN_F_TSO_ECN) != 0)

[PATCH 3/4] tun: Allow GSO using virtio_net_hdr

2008-06-25 Thread Rusty Russell
Add a IFF_VNET_HDR flag. This uses the same ABI as virtio_net (ie. prepending struct virtio_net_hdr to packets) to indicate GSO and checksum information. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/net/tun.c | 90 - include/

[PATCH 4/4] lguest: Use GSO/IFF_VNET_HDR extensions on tun/tap

2008-06-25 Thread Rusty Russell
(Might not apply cleanly to current Linus, there are other lguest things going on, but this gives you the idea at least). Guest -> Host 1GB TCP: Before: Seconds 16.6282 xmit 250498 recv 3 timeout 248355 After: Seconds 9.86102 xmit 241989 recv 192014 timeout 231224 Host -> Guest 1GB TCP: Before:

[PATCH 1/4] tun: Interface to query tun/tap features.

2008-06-25 Thread Rusty Russell
The problem with introducing checksum offload and gso to tun is they need to set dev->features to enable GSO and/or checksumming, which is supposed to be done before register_netdevice(), ie. as part of TUNSETIFF. Unfortunately, TUNSETIFF has always just ignored flags it doesn't understand, so the

[PATCH 2/4] tun: TUNSETFEATURES to set gso features.

2008-06-25 Thread Rusty Russell
ethtool is useful for setting (some) device fields, but it's root-only. Finer feature control is available through a tun-specific ioctl. (Includes Mark McLoughlin <[EMAIL PROTECTED]>'s fix to hold rtnl sem). Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/net/tun.c | 43