DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] DPDK's vhost-user logging capability
@ 2016-03-23 15:34 shesha Sreenivasamurthy (shesha)
  2016-03-25  2:49 ` Yuanhan Liu
  0 siblings, 1 reply; 3+ messages in thread
From: shesha Sreenivasamurthy (shesha) @ 2016-03-23 15:34 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu

Hi All,

I was going over vhost-user migration capability in DPDK in lieu of a Cisco's multi-q DPDK vhost-user application. I see that log_base address is implemented as per virtio_net device. However, desc, addr and used is per vhost_virtqueue. Additionally, QEMU sends one VHOST_USER_SET_LOG_BASE per queue-pair (QEMU - hw/virtio/vhost.c::vhost_dev_set_log).

Does it mean we need to log dirty pages of all rings to same location ? If that is the case then why does QEMU sends separate VHOST_USER_SET_LOG_BASE per queue pair ?

--
- Thanks
char * (*shesha) (uint64_t cache, uint8_t F00D)
{ return 0x0000C0DE; }

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] DPDK's vhost-user logging capability
  2016-03-23 15:34 [dpdk-dev] DPDK's vhost-user logging capability shesha Sreenivasamurthy (shesha)
@ 2016-03-25  2:49 ` Yuanhan Liu
  2016-03-25 11:08   ` Marc-André Lureau
  0 siblings, 1 reply; 3+ messages in thread
From: Yuanhan Liu @ 2016-03-25  2:49 UTC (permalink / raw)
  To: shesha Sreenivasamurthy (shesha); +Cc: dev, Marc-André Lureau

On Wed, Mar 23, 2016 at 03:34:09PM +0000, shesha Sreenivasamurthy (shesha) wrote:
> Hi All,
> 
> I was going over vhost-user migration capability in DPDK in lieu of a Cisco's
> multi-q DPDK vhost-user application. I see that log_base address is implemented
> as per virtio_net device. However, desc, addr and used is per vhost_virtqueue.
> Additionally, QEMU sends one VHOST_USER_SET_LOG_BASE per queue-pair (QEMU - hw/
> virtio/vhost.c::vhost_dev_set_log).
> 
> Does it mean we need to log dirty pages of all rings to same location ?

Hi,

Yes, and QEMU allocates only one block of memory (see vhost_log_alloc())
after all.

> If that
> is the case then why does QEMU sends separate VHOST_USER_SET_LOG_BASE per queue
> pair ?

That's kind of like a design. One queue pair is associated with one
vhost_dev struct in QEMU, hence, all those requests will go through
vhost_dev structs (aka, all qeueu pairs), including those that one
time request is needed only, such as VHOST_USER_SET_MEM_TABLE. Thus,
we introduced vhost_user_one_time_request() to avoid such case.

So, good question, and we may need add it to the "one time request"
group, Marc?

And FYI, for queue-pair (or vring) request, there should be an index
in the payload, to point to the right vring. If not, it normally
means a global request, that _may_ need be sent once only.

	--yliu

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] DPDK's vhost-user logging capability
  2016-03-25  2:49 ` Yuanhan Liu
@ 2016-03-25 11:08   ` Marc-André Lureau
  0 siblings, 0 replies; 3+ messages in thread
From: Marc-André Lureau @ 2016-03-25 11:08 UTC (permalink / raw)
  To: Yuanhan Liu; +Cc: shesha Sreenivasamurthy (shesha), dev, Marc-André Lureau

Hi

----- Original Message -----
> On Wed, Mar 23, 2016 at 03:34:09PM +0000, shesha Sreenivasamurthy (shesha)
> wrote:
> > Hi All,
> > 
> > I was going over vhost-user migration capability in DPDK in lieu of a
> > Cisco's
> > multi-q DPDK vhost-user application. I see that log_base address is
> > implemented
> > as per virtio_net device. However, desc, addr and used is per
> > vhost_virtqueue.
> > Additionally, QEMU sends one VHOST_USER_SET_LOG_BASE per queue-pair (QEMU -
> > hw/
> > virtio/vhost.c::vhost_dev_set_log).
> > 
> > Does it mean we need to log dirty pages of all rings to same location ?
> 
> Hi,
> 
> Yes, and QEMU allocates only one block of memory (see vhost_log_alloc())
> after all.

> > If that
> > is the case then why does QEMU sends separate VHOST_USER_SET_LOG_BASE per
> > queue
> > pair ?
> 
> That's kind of like a design. One queue pair is associated with one
> vhost_dev struct in QEMU, hence, all those requests will go through
> vhost_dev structs (aka, all qeueu pairs), including those that one
> time request is needed only, such as VHOST_USER_SET_MEM_TABLE. Thus,
> we introduced vhost_user_one_time_request() to avoid such case.

I am not familiar with multi-queue, but I can see that in vhost_net_start.

> So, good question, and we may need add it to the "one time request"
> group, Marc?

That would probably prevent vhost_dev_log_resize(), so it would need some kind of "force" flag. I am not sure it's worth it at this point.

> 
> And FYI, for queue-pair (or vring) request, there should be an index
> in the payload, to point to the right vring. If not, it normally
> means a global request, that _may_ need be sent once only.
> 
> 	--yliu
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-25 11:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 15:34 [dpdk-dev] DPDK's vhost-user logging capability shesha Sreenivasamurthy (shesha)
2016-03-25  2:49 ` Yuanhan Liu
2016-03-25 11:08   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).