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

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

@szarkos

Description

@szarkos

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions