Thread (12 messages) flat view 12 messages, 6 authors, 2007-05-03

Re: netfront for review

From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2007-05-02 03:51:44
Also in: lkml

On Wed, May 02, 2007 at 01:37:13PM +1000, Rusty Russell wrote:
quoted
+static int xennet_change_mtu(struct net_device *dev, int mtu)
+{
+	int max = xennet_can_sg(dev) ? 65535 - ETH_HLEN : ETH_DATA_LEN;
+
+	if (mtu > max)
+		return -EINVAL;
+	dev->mtu = mtu;
+	return 0;
+}
This seems odd to me: just because a device does TSO should we really
allow huge mtu settings?  Herbert?
Actually this has nothing to do with TSO/GSO.  This driver inherently
supports arbitrary MTUs that's only limited by our network stack.  If
the physical network device can't handle it you'll just get an ICMP
error back or fragmentation.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} [off-list ref]
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help