Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

hv_netvsc: Fix a network regression after ifdown/ifup #2454

Closed
szarkos opened this issue Jun 7, 2018 · 6 comments
Closed

hv_netvsc: Fix a network regression after ifdown/ifup #2454

szarkos opened this issue Jun 7, 2018 · 6 comments

Comments

@szarkos
Copy link

szarkos commented Jun 7, 2018

Issue Report

There is a regression in the hv_netvsc driver used on Azure and Hyper-V:

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 following patch fixes the regression: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git/commit/?id=52acf73b6e9a6962045feb2ba5a8921da2201915

FYI, the regression was introduced in commit be9c798d: hv_netvsc: common detach logic. Upstream kernel 4.14.44 is the first kernel in this series to have that commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/drivers/net/hyperv?h=v4.14.44&id=be9c798d0d13ae609a91177323ac816545c39d28

Container Linux Version

1745.5.0, kernel version 4.14.44

Environment

Microsoft Azure

Expected Behavior

After running something like 'ifdown eth0' you will not be able to bring back networking by running 'ifup eth0' or equivalent.

Actual Behavior

Network can be brought up as normal via "ifup eth0" or similar.

@ajeddeloh
Copy link

ajeddeloh commented Jun 7, 2018

Since the fix is not in the 4.14.x series yet, I assume Beta is also affected. Do you know if alpha 1800.0.0 (released today, 4.16.x kernel) is affected?

@dm0-
Copy link

dm0- commented Jun 8, 2018

I'll reopen this until updates are released.

@dm0- dm0- reopened this Jun 8, 2018
@szarkos
Copy link
Author

szarkos commented Jun 8, 2018

Hi,

Yes, 4.16.14 is also impacted as it has the broken commit: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/drivers/net/hyperv?h=v4.16.14&id=7b2ee50c0cd513a176a26a71f2989facdd75bfea

Dave Miller said that this is queued up for -stable, but I don't have an ETA. Is there a way you can pull this patch from Dave's tree?

@dm0-
Copy link

dm0- commented Jun 8, 2018

We've backported the commit to 4.14 and 4.16 for all channels.

@szarkos
Copy link
Author

szarkos commented Jun 8, 2018

You're awesome, thanks.

@bgilbert
Copy link
Contributor

Should be fixed in alpha 1800.1.0, beta 1772.3.0, and stable 1745.6.0, due shortly. Thanks for the report.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants