net/netvsc: handle Rx packets during multi-channel setup
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 31 Mar 2020 17:13:58 +0000 (10:13 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 21 Apr 2020 11:57:06 +0000 (13:57 +0200)
commit107f3cf31047e09a146e8ebc3d232f3de9d55466
tree487e429594fc7b816ed13e6a784f2936d03e3054
parent4bc7dc1110ac9284b07150a13436e2b0ca5a62d0
net/netvsc: handle Rx packets during multi-channel setup

It is possible for a packet to arrive during the configuration
process when setting up multiple queue mode. This would cause
configure to fail; fix by just ignoring receive packets while
waiting for control commands.

Use the receive ring lock to avoid possible races between
oddly behaved applications doing rx_burst and control operations
concurrently.

Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/netvsc/hn_nvs.c