Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-09-07 Thread Juergen Gross
On 07/09/18 13:06, Jiri Slaby wrote: > On 08/24/2018, 04:26 PM, Boris Ostrovsky wrote: >> On 08/24/2018 07:26 AM, Juergen Gross wrote: >>> On 24/08/18 13:12, Jiri Slaby wrote: On 07/30/2018, 10:18 AM, Xiao Liang wrote: > On 07/29/2018 11:30 PM, David Miller wrote: >> From: Xiao Liang

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-09-07 Thread Jiri Slaby
On 08/24/2018, 04:26 PM, Boris Ostrovsky wrote: > On 08/24/2018 07:26 AM, Juergen Gross wrote: >> On 24/08/18 13:12, Jiri Slaby wrote: >>> On 07/30/2018, 10:18 AM, Xiao Liang wrote: On 07/29/2018 11:30 PM, David Miller wrote: > From: Xiao Liang > Date: Fri, 27 Jul 2018 17:56:08 +0800

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-08-24 Thread Boris Ostrovsky
On 08/24/2018 07:26 AM, Juergen Gross wrote: > On 24/08/18 13:12, Jiri Slaby wrote: >> On 07/30/2018, 10:18 AM, Xiao Liang wrote: >>> On 07/29/2018 11:30 PM, David Miller wrote: From: Xiao Liang Date: Fri, 27 Jul 2018 17:56:08 +0800 > @@ -1330,6 +1331,11 @@ static struct

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-08-24 Thread Juergen Gross
On 24/08/18 13:12, Jiri Slaby wrote: > On 07/30/2018, 10:18 AM, Xiao Liang wrote: >> On 07/29/2018 11:30 PM, David Miller wrote: >>> From: Xiao Liang >>> Date: Fri, 27 Jul 2018 17:56:08 +0800 >>> @@ -1330,6 +1331,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-08-24 Thread Jiri Slaby
On 07/30/2018, 10:18 AM, Xiao Liang wrote: > On 07/29/2018 11:30 PM, David Miller wrote: >> From: Xiao Liang >> Date: Fri, 27 Jul 2018 17:56:08 +0800 >> >>> @@ -1330,6 +1331,11 @@ static struct net_device >>> *xennet_create_dev(struct xenbus_device *dev) >>>   netif_carrier_off(netdev); >>>  

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-30 Thread David Miller
From: Xiao Liang Date: Fri, 27 Jul 2018 17:56:08 +0800 > When loading module manually, after call xenbus_switch_state to initializes > the state of the netfront device, the driver state did not change so fast > that may lead no dev created in latest kernel. This patch adds wait to make > sure

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-30 Thread Xiao Liang
Thanks, David On 07/29/2018 11:30 PM, David Miller wrote: From: Xiao Liang Date: Fri, 27 Jul 2018 17:56:08 +0800 @@ -1330,6 +1331,11 @@ static struct net_device *xennet_create_dev(struct xenbus_device *dev) netif_carrier_off(netdev); xenbus_switch_state(dev,

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-30 Thread Xiao Liang
Thanks, Boris Please see my reply inline. On 07/28/2018 02:40 AM, Boris Ostrovsky wrote: On 07/27/2018 05:56 AM, Xiao Liang wrote: When loading module manually, after call xenbus_switch_state to initializes the state of the netfront device, the driver state did not change so fast that may

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-29 Thread David Miller
From: Xiao Liang Date: Fri, 27 Jul 2018 17:56:08 +0800 > @@ -1330,6 +1331,11 @@ static struct net_device *xennet_create_dev(struct > xenbus_device *dev) > netif_carrier_off(netdev); > > xenbus_switch_state(dev, XenbusStateInitialising); > + wait_event(module_load_q, > +

Re: [Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-27 Thread Boris Ostrovsky
On 07/27/2018 05:56 AM, Xiao Liang wrote: > When loading module manually, after call xenbus_switch_state to initializes > the state of the netfront device, the driver state did not change so fast > that may lead no dev created in latest kernel. This patch adds wait to make > sure xenbus knows the

[Xen-devel] [PATCH] xen-netfront: wait xenbus state change when load module manually

2018-07-27 Thread Xiao Liang
When loading module manually, after call xenbus_switch_state to initializes the state of the netfront device, the driver state did not change so fast that may lead no dev created in latest kernel. This patch adds wait to make sure xenbus knows the driver is not in closed/unknown state. Current