qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Stefano Garzarella <sgarzare@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
	qemu-devel@nongnu.org, Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error
Date: Wed, 22 Jan 2025 08:59:22 -0500	[thread overview]
Message-ID: <20250122085828-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <3mcx7u456pawkgz4dgf6tvk7izczuy55guipqacqkl66jhtltq@fofd5u3el4nj>

On Wed, Jan 22, 2025 at 02:42:14PM +0100, Stefano Garzarella wrote:
> On Tue, Jan 21, 2025 at 11:00:29AM +0100, Laurent Vivier wrote:
> > In vhost_user_receive() if vhost_net_notify_migration_done() reports
> > an error we display on the console:
> > 
> >  Vhost user backend fails to broadcast fake RARP
> > 
> > This message can be useful if there is a problem to execute
> > VHOST_USER_SEND_RARP but it is useless if the backend doesn't
> > support VHOST_USER_PROTOCOL_F_RARP.
> > 
> > Don't report the error if vhost_net_notify_migration_done()
> > returns -ENOTSUP (from vhost_user_migration_done())
> > 
> > Update vhost_net-stub.c to return -ENOTSUP too.
> > 
> > Signed-off-by: Laurent Vivier <lvivier@redhat.com>
> > ---
> > hw/net/vhost_net-stub.c | 2 +-
> > net/vhost-user.c        | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/hw/net/vhost_net-stub.c b/hw/net/vhost_net-stub.c
> > index 72df6d757e4d..875cd6c2b9c8 100644
> > --- a/hw/net/vhost_net-stub.c
> > +++ b/hw/net/vhost_net-stub.c
> > @@ -93,7 +93,7 @@ void vhost_net_config_mask(VHostNetState *net, VirtIODevice *dev, bool mask)
> > 
> > int vhost_net_notify_migration_done(struct vhost_net *net, char* mac_addr)
> > {
> > -    return -1;
> > +    return -ENOTSUP;
> > }
> > 
> > VHostNetState *get_vhost_net(NetClientState *nc)
> > diff --git a/net/vhost-user.c b/net/vhost-user.c
> > index 12555518e838..636fff8a84a2 100644
> > --- a/net/vhost-user.c
> > +++ b/net/vhost-user.c
> > @@ -146,7 +146,7 @@ static ssize_t vhost_user_receive(NetClientState *nc, const uint8_t *buf,
> > 
> >         r = vhost_net_notify_migration_done(s->vhost_net, mac_addr);
> > 
> > -        if ((r != 0) && (display_rarp_failure)) {
> > +        if ((r != 0) && (r != -ENOTSUP) && (display_rarp_failure)) {
> >             fprintf(stderr,
> >                     "Vhost user backend fails to broadcast fake RARP\n");
> >             fflush(stderr);
> > -- 
> > 2.47.1
> > 
> 
> IIUC the message was there since the introduction about 10 years ago
> from commit 3e866365e1 ("vhost user: add rarp sending after live
> migration for legacy guest"). IIUC -ENOTSUP is returned when both F_RARP
> and F_GUEST_ANNOUNCE are not negotiated.
> 
> That said, I honestly don't know what F_RARP or F_GUEST_ANNOUNCE is for,

rarp is to have destination host broadcast a message with VM address
to update the network. Guest announce is when it will instead
ask the guest to do this.


> but my understanding is that the message was to notify that the
> migration was finished (reading that commit).
> 
> If neither feature is supported, could this be a problem for the user
> and that's why we were printing the message?
> 
> Thanks,
> Stefano



  reply	other threads:[~2025-01-22 14:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 10:00 [PATCH] vhost-user: Silence unsupported VHOST_USER_PROTOCOL_F_RARP error Laurent Vivier
2025-01-22 13:42 ` Stefano Garzarella
2025-01-22 13:59   ` Michael S. Tsirkin [this message]
2025-01-22 16:20     ` Stefano Garzarella
2025-01-22 16:29       ` Michael S. Tsirkin
2025-01-22 16:41       ` Laurent Vivier
2025-01-22 16:51         ` Stefano Garzarella
2025-01-22 17:22           ` Laurent Vivier
2025-01-22 17:30             ` Daniel P. Berrangé
2025-01-24 16:03           ` Stefano Brivio
2025-02-20 15:28             ` Michael S. Tsirkin
2025-02-20 16:59               ` Stefano Brivio
2025-02-20 18:21                 ` Michael S. Tsirkin
2025-02-20 20:00                   ` Stefano Brivio
2025-02-20 20:45                     ` Michael S. Tsirkin
2025-02-21  1:18                       ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250122085828-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).