Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2992694AbXEBDvo (ORCPT ); Tue, 1 May 2007 23:51:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S2992689AbXEBDvo (ORCPT ); Tue, 1 May 2007 23:51:44 -0400 Received: from rhun.apana.org.au ([64.62.148.172]:3946 "EHLO arnor.apana.org.au" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2992669AbXEBDvn (ORCPT ); Tue, 1 May 2007 23:51:43 -0400 Date: Wed, 2 May 2007 13:51:27 +1000 From: Herbert Xu To: Rusty Russell Cc: Jeremy Fitzhardinge , lkml - Kernel Mailing List , netdev Subject: Re: netfront for review Message-ID: <20070502035127.GA28090@gondor.apana.org.au> References: <4637D672.5030706@goop.org> <1178077033.28659.173.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1178077033.28659.173.camel@localhost.localdomain> User-Agent: Mutt/1.5.9i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1117 Lines: 31 On Wed, May 02, 2007 at 01:37:13PM +1000, Rusty Russell wrote: > > > +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~} Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/