From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by dpdk.org (Postfix) with ESMTP id B09895587 for ; Fri, 25 Mar 2016 12:08:54 +0100 (CET) Received: from zmail17.collab.prod.int.phx2.redhat.com (zmail17.collab.prod.int.phx2.redhat.com [10.5.83.19]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2PB8qGd059678; Fri, 25 Mar 2016 07:08:52 -0400 Date: Fri, 25 Mar 2016 07:08:52 -0400 (EDT) From: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau To: Yuanhan Liu Cc: "shesha Sreenivasamurthy (shesha)" , dev@dpdk.org, =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Message-ID: <609417283.14385576.1458904132070.JavaMail.zimbra@redhat.com> In-Reply-To: <20160325024959.GZ979@yliu-dev.sh.intel.com> References: <20160325024959.GZ979@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.3.113.11] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF45 (Linux)/8.0.6_GA_5922) Thread-Topic: DPDK's vhost-user logging capability Thread-Index: w4ei8YHzrnIPL6zmKjvjK1cSD9M30Q== Subject: Re: [dpdk-dev] DPDK's vhost-user logging capability X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2016 11:08:55 -0000 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 >