* [PATCH v2] hv_netvsc: Fix a network regression after ifdown/ifup
@ 2018-06-06 21:32 Dexuan Cui
2018-06-07 20:24 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Dexuan Cui @ 2018-06-06 21:32 UTC (permalink / raw)
To: KY Srinivasan, Haiyang Zhang, Stephen Hemminger,
'David S. Miller', 'netdev@vger.kernel.org'
Cc: 'devel@linuxdriverproject.org',
'linux-kernel@vger.kernel.org', 'olaf@aepfle.de',
'apw@canonical.com', 'jasowang@redhat.com',
'vkuznets@redhat.com',
'marcelo.cerri@canonical.com',
Josh Poulson, Stephen Zarkos
Recently people reported the NIC stops working after
"ifdown eth0; ifup eth0". It turns out in this case the TX queues are not
enabled, after the refactoring of the common detach logic: when the NIC
has sub-channels, usually we enable all the TX queues after all
sub-channels are set up: see rndis_set_subchannel() ->
netif_device_attach(), but in the case of "ifdown eth0; ifup eth0" where
the number of channels doesn't change, we also must make sure the TX queues
are enabled. The patch fixes the regression.
Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Cc: stable@vger.kernel.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
---
Changes since v1:
Removed the check and the comment from the code [Stephen Hemminger]
drivers/net/hyperv/netvsc_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index da07ccd..eb8dccd 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -126,8 +126,10 @@ static int netvsc_open(struct net_device *net)
}
rdev = nvdev->extension;
- if (!rdev->link_state)
+ if (!rdev->link_state) {
netif_carrier_on(net);
+ netif_tx_wake_all_queues(net);
+ }
if (vf_netdev) {
/* Setting synthetic device up transparently sets
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] hv_netvsc: Fix a network regression after ifdown/ifup
2018-06-06 21:32 [PATCH v2] hv_netvsc: Fix a network regression after ifdown/ifup Dexuan Cui
@ 2018-06-07 20:24 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-06-07 20:24 UTC (permalink / raw)
To: decui
Cc: kys, haiyangz, sthemmin, netdev, devel, linux-kernel, olaf, apw,
jasowang, vkuznets, marcelo.cerri, jopoulso, Stephen.Zarkos
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 6 Jun 2018 21:32:51 +0000
>
> Recently people reported the NIC stops working after
> "ifdown eth0; ifup eth0". It turns out in this case the TX queues are not
> enabled, after the refactoring of the common detach logic: when the NIC
> has sub-channels, usually we enable all the TX queues after all
> sub-channels are set up: see rndis_set_subchannel() ->
> netif_device_attach(), but in the case of "ifdown eth0; ifup eth0" where
> the number of channels doesn't change, we also must make sure the TX queues
> are enabled. The patch fixes the regression.
>
> Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] hv_netvsc: Fix a network regression after ifdown/ifup
@ 2018-06-07 20:24 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2018-06-07 20:24 UTC (permalink / raw)
To: decui
Cc: jopoulso, olaf, sthemmin, netdev, haiyangz, linux-kernel,
marcelo.cerri, apw, devel, vkuznets, jasowang, Stephen.Zarkos
From: Dexuan Cui <decui@microsoft.com>
Date: Wed, 6 Jun 2018 21:32:51 +0000
>
> Recently people reported the NIC stops working after
> "ifdown eth0; ifup eth0". It turns out in this case the TX queues are not
> enabled, after the refactoring of the common detach logic: when the NIC
> has sub-channels, usually we enable all the TX queues after all
> sub-channels are set up: see rndis_set_subchannel() ->
> netif_device_attach(), but in the case of "ifdown eth0; ifup eth0" where
> the number of channels doesn't change, we also must make sure the TX queues
> are enabled. The patch fixes the regression.
>
> Fixes: 7b2ee50c0cd5 ("hv_netvsc: common detach logic")
> Signed-off-by: Dexuan Cui <decui@microsoft.com>
Applied and queued up for -stable.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-06-07 20:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-06 21:32 [PATCH v2] hv_netvsc: Fix a network regression after ifdown/ifup Dexuan Cui
2018-06-07 20:24 ` David Miller
2018-06-07 20:24 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.