Received: from eggs.gnu.org ([2001:4830:134:3::10]:37105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2i1Y-0001oq-Il for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:34:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z2i1U-00066I-Rd for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:34:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52155) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z2i1U-00066A-Kh for qemu-devel@nongnu.org; Wed, 10 Jun 2015 11:34:36 -0400 Date: Wed, 10 Jun 2015 16:34:34 +0100 From: Stefan Hajnoczi Message-ID: <20150610153434.GB17294@stefanha-thinkpad.redhat.com> References: <1433943783-20125-1-git-send-email-thibaut.collet@6wind.com> <1433943783-20125-2-git-send-email-thibaut.collet@6wind.com> <20150610154748-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wzJLGUyc3ArbnUjN" Content-Disposition: inline In-Reply-To: <20150610154748-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Thibaut Collet , jasowang@redhat.com, qemu-devel@nongnu.org --wzJLGUyc3ArbnUjN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jun 10, 2015 at 03:52:43PM +0200, Michael S. Tsirkin wrote: > > +void vhost_net_inject_rarp(struct vhost_net *net, const uint8_t *buf, = size_t size) > > +{ > > + if ((net->dev.acked_features & (1 << VIRTIO_NET_F_GUEST_ANNOUNCE))= =3D=3D 0) { > > + fprintf(stderr, > > + "Warning: Guest with no VIRTIO_NET_F_GUEST_ANNOUNCE su= pport. RARP must be sent by vhost-user backend\n"); > > + fflush(stderr); >=20 > And maybe it does, then you are just filling log up with useless > warnings. Pls add some ifdef so this isn't normally compiled in. Hmm...I guess vhost-user backends can implement RARP without QEMU or the guest driver knowing. Let's just drop the warning completely. I requested it but now it seems spurious. > > +static ssize_t vhost_user_receive(NetClientState *nc, const uint8_t *b= uf, > > + size_t size) > > +{ > > + if (size =3D=3D 60) { > > + /* Assume it is a RARP request sent automatically after a > > + * live migration */ > > + /* The RARP must be sent if guest does not support > > + * VIRTIO_NET_F_GUEST_ANNOUNCE */ > > + VhostUserState *s =3D DO_UPCAST(VhostUserState, nc, nc); > > + > > + vhost_net_inject_rarp(s->vhost_net, buf, size); > > + } else { > > + fprintf(stderr,"Vhost user receives unexpected packets\n"); > > + fflush(stderr); Please use a static bool flag to only print this once. There's a risk of flooding logs if we don't limit it. --wzJLGUyc3ArbnUjN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVeFkKAAoJEJykq7OBq3PIuskIALChVa1FvTJLlzpWTwxixIhZ 2ApjCGfHkNL3GFQ4IYTXIF6MnvD2vuF9Pw6TLWDwO4Xh/CTvBM0WJEGXINwTaAS6 r/AQf38w+7GOwIGQ1qX/hVilTcUQS1379KVxq6IP09s2F92w8OM7xdBXr/Gd93AL c4EIMrXkhpA5ldtqhVLNarEW4jBntjtINs4P4LXoo+PzD5ieXbqwfLvsE9WhLqyk CNLPO938W3yDlp38kV7qwPWYrBBvcRzB4nOyYU+PmGGeZ/iaaARv1D/h7JZLXAJ3 uLooZRvx4bjGXvg78MTLzG+2PoGUzEOCsuehlJshkDSK5Zow+71xhvM3a0Vv+80= =Y6JW -----END PGP SIGNATURE----- --wzJLGUyc3ArbnUjN--