mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Eduardo Otubo <otubo@redhat.com>, linux-kernel@vger.kernel.org
Cc: jgross@suse.com, netdev@vger.kernel.org,
	xen-devel@lists.xenproject.org, mgamal@redhat.com,
	cavery@redhat.com, vkuznets@redhat.com
Subject: Re: [Xen-devel] [PATCH] xen-netfront: enable device after manual module load
Date: Mon, 8 Jan 2018 10:03:55 -0500	[thread overview]
Message-ID: <471397aa-7070-b4fe-991a-f35fa5d3b1f7@oracle.com> (raw)
In-Reply-To: <20180105084216.21719-1-otubo@redhat.com>

On 01/05/2018 03:42 AM, Eduardo Otubo wrote:
> When loading the module after unloading it, the network interface would
> not be enabled and thus wouldn't have a backend counterpart and unable
> to be used by the guest.
>
> The guest would face errors like:
>
>   [root@guest ~]# ethtool -i eth0
>   Cannot get driver information: No such device
>
>   [root@guest ~]# ifconfig eth0
>   eth0: error fetching interface information: Device not found
>
> This patch initializes the state of the netfront device whenever it is
> loaded manually, this state would communicate the netback to create its
> device and establish the connection between them.
>
> Signed-off-by: Eduardo Otubo <otubo@redhat.com>

Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Should this go to stable trees as well?

-boris

> ---
>  drivers/net/xen-netfront.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
> index c5a34671abda..9bd7ddeeb6a5 100644
> --- a/drivers/net/xen-netfront.c
> +++ b/drivers/net/xen-netfront.c
> @@ -1326,6 +1326,7 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev)
>  
>  	netif_carrier_off(netdev);
>  
> +	xenbus_switch_state(dev, XenbusStateInitialising);
>  	return netdev;
>  
>   exit:

  reply	other threads:[~2018-01-08 15:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05  8:42 Eduardo Otubo
2018-01-08 15:03 ` Boris Ostrovsky [this message]
2018-01-08 19:17 ` David Miller

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=471397aa-7070-b4fe-991a-f35fa5d3b1f7@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=cavery@redhat.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgamal@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=otubo@redhat.com \
    --cc=vkuznets@redhat.com \
    --cc=xen-devel@lists.xenproject.org \
    /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

all inboxes | Powered by JetHome®