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);
> > + /
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
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)
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/
(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:
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
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