]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: Fix unwanted rx_table reset
authorHaiyang Zhang <haiyangz@microsoft.com>
Fri, 20 Dec 2019 02:28:10 +0000 (18:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Dec 2019 05:50:38 +0000 (21:50 -0800)
commitdf148798157aba1f8f105935c1987467c46ebdd8
tree883fa0ec5263f9d899e9c702be14abd67256c7a7
parent31d3b2b134259f67defab98c93444d896308fa15
hv_netvsc: Fix unwanted rx_table reset

In existing code, the receive indirection table, rx_table, is in
struct rndis_device, which will be reset when changing MTU, ringparam,
etc. User configured receive indirection table values will be lost.

To fix this, move rx_table to struct net_device_context, and check
netif_is_rxfh_configured(), so rx_table will be set to default only
if no user configured value.

Fixes: 3807eedf7471 ("netvsc: allow get/set of RSS indirection table")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc_drv.c
drivers/net/hyperv/rndis_filter.c