Received: from eggs.gnu.org ([2001:4830:134:3::10]:60241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1x9t-00019z-Tk for qemu-devel@nongnu.org; Mon, 08 Jun 2015 09:32:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z1x9p-0000xr-Q0 for qemu-devel@nongnu.org; Mon, 08 Jun 2015 09:32:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33712) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z1x9p-0000xj-Kh for qemu-devel@nongnu.org; Mon, 08 Jun 2015 09:32:05 -0400 Date: Mon, 8 Jun 2015 14:32:03 +0100 From: Stefan Hajnoczi Message-ID: <20150608133203.GM23825@stefanha-thinkpad.redhat.com> References: <55701BED.2090802@redhat.com> <1433510652-13866-1-git-send-email-thibaut.collet@6wind.com> <55752E3C.8070700@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lRF4gxo9Z9M++D0O" Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v2] net: Add support of VIRTIO_NET_F_GUEST_ANNOUNCE for vhost-net/vhost-user List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thibaut Collet Cc: Jason Wang , mst@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com --lRF4gxo9Z9M++D0O Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 08, 2015 at 10:21:38AM +0200, Thibaut Collet wrote: > Hi, >=20 > My understanding of gratuitous packet with virtio for any backend (vhost > user or other): > - When the VM is loaded (first start or migration) the virtio net > interfaces are loaded ( virtio_net_load_device function in > hw/net/virtio-net.c) > - If the guest has the VIRTIO_NET_F_GUEST_ANNOUNCE capability, request to > send gratuitous packet is done. >=20 > 1. To enable gratuitous packet through this mechanism I have added > VIRTIO_NET_F_GUEST_ANNOUNCE > capability to hw/net/vhost_net.c. So host and guest can negotiate this > feature when vhost-user is used. >=20 > 2. self announce occurs in case of live migration. During a live migration > a GARP is sent to all net backend through a queue dedicated to the net > backend. > But for vhost-user: > - this operation is not possible (vhost-user has no queue) > - it is already done with the previous mechanism. > Rather to define a queue to vhost user and notify twice the guest to > send gratuitous packet I have disable GARP from self announce and use only > the first mechanism for that. >=20 > I have tested my modifications with guest that supports > VIRTIO_NET_F_GUEST_ANNOUNCE and vhost-user on the host. After a live > migration I have the GARP from the guest. I think Jason is pointing out that your patch lacks support for guests that do not negotiate VIRTIO_NET_F_GUEST_ANNOUNCE. If the guest does not set the feature bit then packets might continue to get forwarded to the old host. Perhaps the correct place to implement this is in the virtio-net.c device instead of in vhost-user.c. The non-vhost-user case should also skip sending two ARP packets. BUT before we go any further: I've asked several times whether vhost-user support live migration? You didn't answer that question. Fixing this issue only makes sense if vhost-user live migration is supported. Stefan --lRF4gxo9Z9M++D0O Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVdZlTAAoJEJykq7OBq3PI4aAH/1Xg3kbFeczbYj8KvZQVoC38 hmi/2fJmvIxG/8aIUOOvNoURNRg56Hpy/qZiccmtMxXZ7qb2Ztr9UByXSXWwTPOC ZYgCm7+pCSTRCyAG+B2+sDYHSe+/ZiE1RpQwSapaK+l78FhgM8tYGTagUV/kDgXh LUlv3rT9y00j9FbADPvbFMN2kmv7r2h4FQxNn8+bx0sg2CJLi9BOXVEuLFo59Mgv fu3exHQC6KvDKzvQEwZeNS5/64bCwrYEQSio8UhTGg1PHMYw6T/yLXLMuDcxMGfX 1+XtkfshLp0pOl2y/ndst+OrXFVoiSRNXzjagj5TXsAJT44i6w6YlusMX1qniQc= =Tdl3 -----END PGP SIGNATURE----- --lRF4gxo9Z9M++D0O--