Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-14 Thread Michael S. Tsirkin
On Mon, Sep 13, 2010 at 12:40:11PM -0500, Anthony Liguori wrote: > On 09/13/2010 11:30 AM, Michael S. Tsirkin wrote: > >On Mon, Sep 13, 2010 at 10:59:34AM -0500, Anthony Liguori wrote: > >>On 09/13/2010 04:04 AM, Michael S. Tsirkin wrote: > >>>On Mon, Sep 13, 2010 at 09:50:42AM +0530, Krishna Kumar

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-14 Thread Michael S. Tsirkin
On Mon, Sep 13, 2010 at 07:00:51PM +0200, Avi Kivity wrote: > On 09/13/2010 06:30 PM, Michael S. Tsirkin wrote: > >Trouble is, each vhost-net device is associated with 1 tun/tap > >device which means that each vhost-net device is associated with a > >transmit and receive queue. > > > >I don't know

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-13 Thread Anthony Liguori
On 09/13/2010 11:30 AM, Michael S. Tsirkin wrote: On Mon, Sep 13, 2010 at 10:59:34AM -0500, Anthony Liguori wrote: On 09/13/2010 04:04 AM, Michael S. Tsirkin wrote: On Mon, Sep 13, 2010 at 09:50:42AM +0530, Krishna Kumar2 wrote: "Michael S. Tsirkin" wrote on 09/12/2010 05:1

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-13 Thread Avi Kivity
On 09/13/2010 06:30 PM, Michael S. Tsirkin wrote: Trouble is, each vhost-net device is associated with 1 tun/tap device which means that each vhost-net device is associated with a transmit and receive queue. I don't know if you'll always have an equal number of transmit and receive queues but t

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2010 at 10:59:34AM -0500, Anthony Liguori wrote: > On 09/13/2010 04:04 AM, Michael S. Tsirkin wrote: > >On Mon, Sep 13, 2010 at 09:50:42AM +0530, Krishna Kumar2 wrote: > >>"Michael S. Tsirkin" wrote on 09/12/2010 05:16:37 PM: > >> > >>>"Michael S. Tsirkin" > >>>09/12/2010 05:16 PM

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-13 Thread Anthony Liguori
On 09/13/2010 04:04 AM, Michael S. Tsirkin wrote: On Mon, Sep 13, 2010 at 09:50:42AM +0530, Krishna Kumar2 wrote: "Michael S. Tsirkin" wrote on 09/12/2010 05:16:37 PM: "Michael S. Tsirkin" 09/12/2010 05:16 PM On Thu, Sep 09, 2010 at 07:19:33PM +0530, Krishna Kumar2 wrote:

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-13 Thread Michael S. Tsirkin
On Mon, Sep 13, 2010 at 09:50:42AM +0530, Krishna Kumar2 wrote: > "Michael S. Tsirkin" wrote on 09/12/2010 05:16:37 PM: > > > "Michael S. Tsirkin" > > 09/12/2010 05:16 PM > > > > On Thu, Sep 09, 2010 at 07:19:33PM +0530, Krishna Kumar2 wrote: > > > Unfortunately I need a > > > constant in vhost

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-12 Thread Krishna Kumar2
"Michael S. Tsirkin" wrote on 09/12/2010 05:16:37 PM: > "Michael S. Tsirkin" > 09/12/2010 05:16 PM > > On Thu, Sep 09, 2010 at 07:19:33PM +0530, Krishna Kumar2 wrote: > > Unfortunately I need a > > constant in vhost for now. > > Maybe not even that: you create multiple vhost-net > devices so vho

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-12 Thread Michael S. Tsirkin
On Thu, Sep 09, 2010 at 07:19:33PM +0530, Krishna Kumar2 wrote: > Unfortunately I need a > constant in vhost for now. Maybe not even that: you create multiple vhost-net devices so vhost-net in kernel does not care about these either, right? So this can be just part of vhost_net.h in qemu. -- To un

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-09 Thread Rusty Russell
On Thu, 9 Sep 2010 11:19:33 pm Krishna Kumar2 wrote: > Rusty Russell wrote on 09/09/2010 05:44:25 PM: > > Ah, good point. Move the queue index into the struct virtqueue? > > Is it OK to move the queue_index from virtio_pci_vq_info > to virtqueue? I didn't want to change any data structures > in

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-09 Thread Krishna Kumar2
Rusty Russell wrote on 09/09/2010 05:44:25 PM: > > > > This seems a bit weird. I mean, the driver used vdev->config-> find_vqs > > > to find the queues, which returns them (in order). So, can't you put > > this > > > into your struct send_queue? > > > > I am saving the vqs in the send_queue, but

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-09 Thread Rusty Russell
On Thu, 9 Sep 2010 02:53:52 pm Krishna Kumar2 wrote: > Rusty Russell wrote on 09/09/2010 09:19:39 AM: > > > On Wed, 8 Sep 2010 04:59:05 pm Krishna Kumar wrote: > > > Add virtio_get_queue_index() to get the queue index of a > > > vq. This is needed by the cb handler to locate the queue > > > that

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-08 Thread Krishna Kumar2
Rusty Russell wrote on 09/09/2010 09:19:39 AM: > On Wed, 8 Sep 2010 04:59:05 pm Krishna Kumar wrote: > > Add virtio_get_queue_index() to get the queue index of a > > vq. This is needed by the cb handler to locate the queue > > that should be processed. > > This seems a bit weird. I mean, the dr

Re: [RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-08 Thread Rusty Russell
On Wed, 8 Sep 2010 04:59:05 pm Krishna Kumar wrote: > Add virtio_get_queue_index() to get the queue index of a > vq. This is needed by the cb handler to locate the queue > that should be processed. This seems a bit weird. I mean, the driver used vdev->config->find_vqs to find the queues, which r

[RFC PATCH 1/4] Add a new API to virtio-pci

2010-09-08 Thread Krishna Kumar
Add virtio_get_queue_index() to get the queue index of a vq. This is needed by the cb handler to locate the queue that should be processed. Signed-off-by: Krishna Kumar --- drivers/virtio/virtio_pci.c |9 + include/linux/virtio.h |3 +++ 2 files changed, 12 insertions(+) d