On Wed, Dec 16, 2015 at 10:38:03AM +0800, Peter Xu wrote: > On Tue, Dec 15, 2015 at 04:07:57PM +0100, Thibaut Collet wrote: > > After a migration, to avoid netwotk outage, all interfaces of the guest > > must send a packet to update switches mapping (ideally a GARP). > > As some interfaces do not do it QEMU does it in behalf of the guest by > > sending a RARP (his RARP is not forged by the guest but by QEMU). This is > > the qemu_self_announce purpose that "spoofs" a RARP to all backend of guest > > ethernet interfaces. For vhost-user backend, QEMU can not do it directly > > and asks to the vhost-user backend to do it with the VHOST_USER_SEND_RARP > > request that contains the MAC address of the guest interface. > > > > Thibaut. > > Hi, Thibaut, > > Thanks for the explaination. > > Two more questions: > > 1. if vhost-user backend (or say, DPDK) supports GUEST_ANNOUNCE, and > send another RARP (or say, GARP, I will use RARP as example), > then there will be two RARP later on the line, right? (since the > QEMU one is sent unconditionally from qemu_announce_self).
The one send by qemu_announce_self() will be caught by vhost_user_receive(), which ends up invoking vhost_user_migration_done(). And it will be dropped when VIRTIO_NET_F_GUEST_ANNOUNCE is negotiated there. > 2. if the only thing vhost-user backend is to send another same RARP > when got SEND_RARP request, why would it bother if QEMU will > unconditionally send one? (or say, I still do not know why we > need this SEND_RARP request, if the vhost-user backend is going > to do the same thing again as QEMU already does) Because that one is caught by vhost-user, and vhost-user just relays it to the backend when necessary (say when GUEST_ANNOUNCE is not supported)? --yliu