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)) == > > 0) { > > + fprintf(stderr, > > + "Warning: Guest with no VIRTIO_NET_F_GUEST_ANNOUNCE > > support. RARP must be sent by vhost-user backend\n"); > > + fflush(stderr); > > 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 *buf, > > + size_t size) > > +{ > > + if (size == 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 = 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.
pgpHfRKMFY8Xc.pgp
Description: PGP signature