From: Ian Campbell Date: Fri, 10 Nov 2006 12:34:28 +0000 (+0000) Subject: PV-on-HVM: TSO support prior to 2.6.9 appears to be unreliable, X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15567^2~6^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1622d92410f46a9238d1b639e127cbb5043e8a9b;p=xen.git PV-on-HVM: TSO support prior to 2.6.9 appears to be unreliable, especially when firewalling is enabled. Signed-off-by: Ian Campbell --- diff --git a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c index e379f5f314..da22d45bf6 100644 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c @@ -1623,8 +1623,16 @@ static void xennet_set_features(struct net_device *dev) if (!(dev->features & NETIF_F_IP_CSUM)) return; - if (!xennet_set_sg(dev, 1)) - xennet_set_tso(dev, 1); + if (xennet_set_sg(dev, 1)) + return; + + /* Before 2.6.9 TSO seems to be unreliable so do not enable it + * on older kernels. + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + xennet_set_tso(dev, 1); +#endif + } static int network_connect(struct net_device *dev)