debuggers.hg
changeset 10667:addde2d2d97a
[NET] front: Zero negotiated bits in xen_set_features
When we reconnect to the backend we need to first zero all negotiated
bits as the functions xen_set_sg and xen_set_tso do not (and are not
supposed to) zero bits when they fail to set them.
This patch also permanently enables the NETIF_F_GSO_ROBUST bit as we
never parse any GSO fields ourselves (even if we did the backend could
not trust us so it's wasted effort).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
When we reconnect to the backend we need to first zero all negotiated
bits as the functions xen_set_sg and xen_set_tso do not (and are not
supposed to) zero bits when they fail to set them.
This patch also permanently enables the NETIF_F_GSO_ROBUST bit as we
never parse any GSO fields ourselves (even if we did the backend could
not trust us so it's wasted effort).
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Mon Jul 03 09:06:59 2006 +0100 (2006-07-03) |
parents | 4b9876fe2f1f |
children | be3e07723b73 |
files | linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c |
line diff
1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Mon Jul 03 09:05:18 2006 +0100 1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Mon Jul 03 09:06:59 2006 +0100 1.3 @@ -1112,6 +1112,11 @@ static int xennet_set_tso(struct net_dev 1.4 1.5 static void xennet_set_features(struct net_device *dev) 1.6 { 1.7 + /* Turn off all GSO bits except ROBUST. */ 1.8 + dev->features &= (1 << NETIF_F_GSO_SHIFT) - 1; 1.9 + dev->features |= NETIF_F_GSO_ROBUST; 1.10 + xennet_set_sg(dev, 0); 1.11 + 1.12 if (!xennet_set_sg(dev, 1)) 1.13 xennet_set_tso(dev, 1); 1.14 }