Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Thu, 12 Jul 2007 12:21:33 +1000 > Dave, I think you're the only one (so far?) with multiple irqs. Luckily there are known hw implementations with that issue so I won't be weird for long :) > It's not clear that guest-controlled interrupt mitigation i

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 13:46 +0200, Christian Borntraeger wrote: > Am Mittwoch, 11. Juli 2007 schrieb Rusty Russell: > > There will be some internal limit on how many buffers the virtio > > implementation supports, but depends on that implementation. It could > > be a number of buffers or a total n

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 13:44 -0700, David Miller wrote: > From: Christian Borntraeger <[EMAIL PROTECTED]> > Date: Wed, 11 Jul 2007 12:45:40 +0200 > > > Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > > > +static void receive_skb(struct net_device *dev, struct sk_buff *skb, > > [...] > > > + neti

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread David Miller
From: Christian Borntraeger <[EMAIL PROTECTED]> Date: Wed, 11 Jul 2007 12:45:40 +0200 > Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > > +static void receive_skb(struct net_device *dev, struct sk_buff *skb, > [...] > > + netif_rx(skb); > > In the NAPI case, we should use netif_receive_skb,

RE: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Caitlin Bestler
[EMAIL PROTECTED] wrote: > On Wed, 2007-07-11 at 12:28 +0200, Christian Borntraeger wrote: >> Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: >>> +static void try_fill_recv(struct virtnet_info *vi) > >> Hmm, so it allocates skbs until oom or until add_buf fails, right? > > Yep. > >> Do you expe

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 11. Juli 2007 schrieb Rusty Russell: > There will be some internal limit on how many buffers the virtio > implementation supports, but depends on that implementation. It could > be a number of buffers or a total number of descriptors. I would suggest to implement a limit in the devic

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 12:45 +0200, Christian Borntraeger wrote: > Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > > +static void receive_skb(struct net_device *dev, struct sk_buff *skb, > [...] > > + netif_rx(skb); > > In the NAPI case, we should use netif_receive_skb, no? Oops, well spotted

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Rusty Russell
On Wed, 2007-07-11 at 12:28 +0200, Christian Borntraeger wrote: > Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > > +static void try_fill_recv(struct virtnet_info *vi) > Hmm, so it allocates skbs until oom or until add_buf fails, right? Yep. > Do you expect the add_buf call to fail if we have

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > +static void receive_skb(struct net_device *dev, struct sk_buff *skb, [...] > + netif_rx(skb); In the NAPI case, we should use netif_receive_skb, no? Christian ___ Virtualization mailing list Virtua

Re: [PATCH 3/3] Virtio draft IV: the net driver

2007-07-11 Thread Christian Borntraeger
Am Mittwoch, 4. Juli 2007 schrieb Rusty Russell: > +static void try_fill_recv(struct virtnet_info *vi) > +{ > + struct sk_buff *skb; > + struct scatterlist sg[MAX_SKB_FRAGS]; > + int num, err; > + > + for (;;) { > + skb = netdev_alloc_skb(vi->ndev, MAX_PACKET_LEN); > +

[PATCH 3/3] Virtio draft IV: the net driver

2007-07-03 Thread Rusty Russell
The network driver uses *two* virtqueues: one for input packets and one for output packets. This has nice locking properties (ie. we don't do any for recv vs send). TODO: 1) GSO. 2) Checksum options. 3) Big packets. 4) Multi-client devices (maybe separate driver?).