qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migratio


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v3 1/2] vhost user: add support of live migration
Date: Wed, 10 Jun 2015 16:34:34 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

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.

Attachment: pgpOJdSj00nnu.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]