qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 2/4] net/virtio: return early when failover primary alread


From: Michael S. Tsirkin
Subject: Re: [PATCH v3 2/4] net/virtio: return early when failover primary alread added
Date: Wed, 20 Nov 2019 10:55:55 -0500

in case you repost:

>Subject: Re: [PATCH v3 2/4] net/virtio: return early when failover primary 
>alread added

s/alread/already/


On Wed, Nov 20, 2019 at 04:49:49PM +0100, Jens Freimann wrote:
> Bail out when primary device was already added before.
> This avoids printing a wrong warning message during reboot.
> 
> Fixes: 9711cd0dfc3f ("net/virtio: add failover support")
> Signed-off-by: Jens Freimann <address@hidden>
> Reviewed-by: Michael S. Tsirkin <address@hidden>
> ---
>  hw/net/virtio-net.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
> index 946039c0dc..ac4d19109e 100644
> --- a/hw/net/virtio-net.c
> +++ b/hw/net/virtio-net.c
> @@ -759,6 +759,10 @@ static void failover_add_primary(VirtIONet *n, Error 
> **errp)
>  {
>      Error *err = NULL;
>  
> +    if (n->primary_dev) {
> +        return;
> +    }
> +
>      n->primary_device_opts = qemu_opts_find(qemu_find_opts("device"),
>              n->primary_device_id);
>      if (n->primary_device_opts) {
> -- 
> 2.21.0




reply via email to

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