Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-16 Thread Rusty Russell
On Friday 10 October 2008 06:26:25 Anthony Liguori wrote: > Mark McLoughlin wrote: > > Also, including virtio_net_hdr in the data buffer would need another > > feature flag. Rightly or wrongly, KVM's implementation requires > > virtio_net_hdr to be the first buffer: > > > > if (elem.in_num < 1

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-15 Thread Rusty Russell
On Friday 10 October 2008 02:30:35 Herbert Xu wrote: > On Thu, Oct 09, 2008 at 11:55:59AM +1100, Rusty Russell wrote: > > Secondly, we can put the virtio_net_hdr at the head of the skb data (this > > is also worth considering for xmit I think if we have headroom) and drop > > MAX_SKB_FRAGS which co

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-10 Thread Mark McLoughlin
On Thu, 2008-10-09 at 23:30 +0800, Herbert Xu wrote: > On Thu, Oct 09, 2008 at 11:55:59AM +1100, Rusty Russell wrote: > > > The size of the logical buffer is > > > returned to the guest rather than the size of the individual smaller > > > buffers. > > > > That's a virtio transport breakage: can y

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-10 Thread Mark McLoughlin
On Thu, 2008-10-09 at 14:26 -0500, Anthony Liguori wrote: > Mark McLoughlin wrote: > > > > Also, including virtio_net_hdr in the data buffer would need another > > feature flag. Rightly or wrongly, KVM's implementation requires > > virtio_net_hdr to be the first buffer: > > > > if (elem.in_nu

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-09 Thread Anthony Liguori
Mark McLoughlin wrote: > > Also, including virtio_net_hdr in the data buffer would need another > feature flag. Rightly or wrongly, KVM's implementation requires > virtio_net_hdr to be the first buffer: > > if (elem.in_num < 1 || elem.in_sg[0].iov_len != sizeof(*hdr)) { > fprintf(stde

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-09 Thread Mark McLoughlin
On Thu, 2008-10-09 at 23:30 +0800, Herbert Xu wrote: > On Thu, Oct 09, 2008 at 11:55:59AM +1100, Rusty Russell wrote: > > > > There are three approaches we should investigate before adding YA feature. > > Obviously, we can simply increase the number of ring entries. > > That's not going to work

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-09 Thread Herbert Xu
On Thu, Oct 09, 2008 at 11:55:59AM +1100, Rusty Russell wrote: > > There are three approaches we should investigate before adding YA feature. > Obviously, we can simply increase the number of ring entries. That's not going to work so well as you need to increase the ring size by MAX_SKB_FRAGS ti

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-09 Thread Chris Wright
* Rusty Russell ([EMAIL PROTECTED]) wrote: > On Thursday 09 October 2008 06:34:59 Mark McLoughlin wrote: > > From: Herbert Xu <[EMAIL PROTECTED]> > > > > If segmentation offload is enabled by the host, we currently allocate > > maximum sized packet buffers and pass them to the host. This uses up >

Re: [PATCH 2/2] virtio_net: Improve the recv buffer allocation scheme

2008-10-08 Thread Rusty Russell
On Thursday 09 October 2008 06:34:59 Mark McLoughlin wrote: > From: Herbert Xu <[EMAIL PROTECTED]> > > If segmentation offload is enabled by the host, we currently allocate > maximum sized packet buffers and pass them to the host. This uses up > 20 ring entries, allowing us to supply only 20 packet