New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
4 participants
@szarkos

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

This comment has been minimized.

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-

This comment has been minimized.

Member

dm0- commented Jun 8, 2018

I'll reopen this until updates are released.

@dm0- dm0- reopened this Jun 8, 2018

@szarkos

This comment has been minimized.

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-

This comment has been minimized.

Member

dm0- commented Jun 8, 2018

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

@szarkos

This comment has been minimized.

szarkos commented Jun 8, 2018

You're awesome, thanks.

@bgilbert

This comment has been minimized.

Member

bgilbert commented Jun 11, 2018

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

@bgilbert bgilbert closed this Jun 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment