[PATCH 1/2] virtio: Add a can_add_buf helper

2009-08-18 Thread Amit Shah
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah

[PATCH 2/2] virtio_net: Use can_add_buf to test for enough room to add

2009-08-18 Thread Amit Shah
Use the can_add_buf virtqueue operation to test if there's room to add another buf to the queue. Saves us one cycle of alloc-add-free if the queue was full. Signed-off-by: Amit Shah amit.s...@redhat.com --- drivers/net/virtio_net.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

Re: [PATCHv3 0/4] qemu-kvm: vhost net support

2009-08-18 Thread Alex Williamson
On Mon, Aug 17, 2009 at 6:37 AM, Michael S. Tsirkinm...@redhat.com wrote: This adds support for vhost-net virtio kernel backend. This is RFC, but works without issues for me. I got this to build by syncing up some headers in kvm/include/linux, but it doesn't seem to be working quite right. I

Re: [PATCHv3 0/4] qemu-kvm: vhost net support

2009-08-18 Thread Michael S. Tsirkin
On Tue, Aug 18, 2009 at 02:54:23PM -0600, Alex Williamson wrote: On Mon, Aug 17, 2009 at 6:37 AM, Michael S. Tsirkinm...@redhat.com wrote: This adds support for vhost-net virtio kernel backend. This is RFC, but works without issues for me. I got this to build by syncing up some headers

Re: [PATCHv3 0/4] qemu-kvm: vhost net support

2009-08-18 Thread Alex Williamson
On Tue, Aug 18, 2009 at 3:04 PM, Michael S. Tsirkinm...@redhat.com wrote: Did you assign ip address in host by any chance? You don't want that. Nope, just up on the host, no IP: eth10 Link encap:Ethernet HWaddr 00:17:a4:77:a4:08 inet6 addr: fe80::217:a4ff:fe77:a408/64 Scope:Link

Re: [PATCHv3 0/4] qemu-kvm: vhost net support

2009-08-18 Thread Alex Williamson
On Tue, Aug 18, 2009 at 3:11 PM, Alex Williamsonalex.william...@hp.com wrote: On Tue, Aug 18, 2009 at 3:04 PM, Michael S. Tsirkinm...@redhat.com wrote: Did you assign ip address in host by any chance? You don't want that. Nope, just up on the host, no IP: eth10     Link encap:Ethernet  

Re: [PATCH 1/4] net: skb_orphan on dev_hard_start_xmit

2009-08-18 Thread David Miller
From: Herbert Xu herb...@gondor.apana.org.au Date: Wed, 19 Aug 2009 13:19:26 +1000 I'm in the process of repeating the same experiment with cxgb3 which hopefully should let me turn interrupts off on descriptors while still reporting completion status. Ok, I look forward to seeing your work