Re: netfront for review

2007-05-03 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > Drawback is that the guest kernel wouldn't work with older xen > versions (dom0 netback driver to be exact) any more. Probably > wouldn't be a showstopper though, given that xen 3.0.3 probably is > almost one year out by the time 2.6.22 will be released ... I don't think we

Re: netfront for review

2007-05-03 Thread Gerd Hoffmann
Christoph Hellwig wrote: On Thu, May 03, 2007 at 09:33:43AM +0200, Gerd Hoffmann wrote: Guess so. It defaults to flip. I simplified the rx_copy/flip module parameter to a simple rx_mode=0/1, but this is preserved from the original. My guess is that originally there was only flip, and copy was

Re: netfront for review

2007-05-03 Thread Christoph Hellwig
On Thu, May 03, 2007 at 09:33:43AM +0200, Gerd Hoffmann wrote: > >Guess so. It defaults to flip. I simplified the rx_copy/flip module > >parameter to a simple rx_mode=0/1, but this is preserved from the > >original. My guess is that originally there was only flip, and copy was > >added later. >

Re: netfront for review

2007-05-03 Thread Gerd Hoffmann
Jeremy Fitzhardinge wrote: Gerd Hoffmann wrote: Gerd, in change 11196:b85da7cd9ea5 "front: Fix rx buffer leak when tearing down an interface." you added a call to "add_id_to_freelist(np->rx_skbs, id);". However, rx_skbs doesn't have an extra entry for the list head, and there's never any corres

Re: netfront for review

2007-05-03 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: >> Gerd, in change 11196:b85da7cd9ea5 "front: Fix rx buffer leak when >> tearing down an interface." you added a call to >> "add_id_to_freelist(np->rx_skbs, id);". However, rx_skbs doesn't have >> an extra entry for the list head, and there's never any corresponding >> get_id_

Re: netfront for review

2007-05-03 Thread Gerd Hoffmann
Hi, Gerd, in change 11196:b85da7cd9ea5 "front: Fix rx buffer leak when tearing down an interface." you added a call to "add_id_to_freelist(np->rx_skbs, id);". However, rx_skbs doesn't have an extra entry for the list head, and there's never any corresponding get_id_from_freelist(np->rx_skbs).

Re: netfront for review

2007-05-02 Thread Jeremy Fitzhardinge
(Gerd, Herbert: there's some questions directed to you down there.) Rusty Russell wrote: >> /* >> * {tx,rx}_skbs store outstanding skbuffs. The first entry in tx_skbs >> * is an index into a chain of free entries. >> */ >> struct sk_buff *tx_skbs[NET_TX_RING_SIZE+1]; >>

Re: netfront for review

2007-05-01 Thread Rusty Russell
On Wed, 2007-05-02 at 13:51 +1000, Herbert Xu wrote: > 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; > > > > This seems odd to m

Re: netfront for review

2007-05-01 Thread Jeremy Fitzhardinge
Rusty Russell wrote: > On Tue, 2007-05-01 at 17:08 -0700, Jeremy Fitzhardinge wrote: > >> Add the Xen virtual network device driver. >> > > (Herbert: there's a question for you: grep for Herbert) > > OK, this is a remarkably non-trivial driver. If the v0.1 of the driver > had been in the k

Re: netfront for review

2007-05-01 Thread Herbert Xu
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; > >

Re: netfront for review

2007-05-01 Thread Rusty Russell
On Tue, 2007-05-01 at 17:08 -0700, Jeremy Fitzhardinge wrote: > Add the Xen virtual network device driver. (Herbert: there's a question for you: grep for Herbert) OK, this is a remarkably non-trivial driver. If the v0.1 of the driver had been in the kernel, I'm sure it would have been about 1/4