From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYja-0000ZN-CM for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:45:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCYjT-0003lO-9X for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:45:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCYjT-0003lF-3x for qemu-devel@nongnu.org; Mon, 13 Jun 2016 16:45:15 -0400 Date: Mon, 13 Jun 2016 23:45:10 +0300 From: "Michael S. Tsirkin" Message-ID: <20160613234114-mutt-send-email-mst@redhat.com> References: <1465231508-30183-1-git-send-email-marcandre.lureau@redhat.com> <1465231508-30183-4-git-send-email-marcandre.lureau@redhat.com> <20160609130242-mutt-send-email-victork@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 03/10] tests/vhost-user-bridge: workaround stale vring base List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Marc-Andr=E9?= Lureau Cc: Victor Kaplansky , Yuanhan Liu , QEMU , Ilya Maximets , jonshin@cisco.com, Tetsuya Mukawa On Thu, Jun 09, 2016 at 12:25:54PM +0200, Marc-Andr=E9 Lureau wrote: > Hi >=20 > On Thu, Jun 9, 2016 at 12:07 PM, Victor Kaplansky = wrote: > > What if set_vring_base is called after set_vring_addr? > > Maybe it is worth to add the fixup to the set_vring_base as well? >=20 > It would need to handle conditions like set_vring_base() being called > while set_vring_addr() is not yet, and thus vq->used isn't set. >=20 > Imho it's not necessary, since order is currently fixed in > vhost_virtqueue_start(), but we could specify this in the protocol to > avoid too much possible states. I personally think it's better to just get the used idx from memory before reconnecting. Will fix old clients automatically. Whoever wants to support old QEMU, can do this by a work-around similar to the supplied one. Maybe add code here to make sure everything is setup - if not it's a new QEMU so it does not need the work-around. I think there was a patch like this suggested at some point - mind digging it up? > --=20 > Marc-Andr=E9 Lureau