aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-06-07 18:53:48 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-08 11:45:48 -0400
commita5ecd43992a7cd9f91d5f98b0082ae44df5e543c (patch)
treeeaf5c83dec01b34bc96c9739ce59538c11b74cb3
parentfbd4c7e768f1719bea340e40148800279d230922 (diff)
netvsc: fix net poll mode
The ndo_poll_controller function needs to schedule NAPI to pick up arriving packets and send completions. Otherwise no data will ever be received. For simple case of netconsole, it also will allow send completions to happen. Without this netpoll will eventually get stuck. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/hyperv/netvsc_drv.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index d93e4da25fd2..252e5d52d17e 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -1158,11 +1158,22 @@ netvsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
1158} 1158}
1159 1159
1160#ifdef CONFIG_NET_POLL_CONTROLLER 1160#ifdef CONFIG_NET_POLL_CONTROLLER
1161static void netvsc_poll_controller(struct net_device *net) 1161static void netvsc_poll_controller(struct net_device *dev)
1162{ 1162{
1163 /* As netvsc_start_xmit() works synchronous we don't have to 1163 struct net_device_context *ndc = netdev_priv(dev);
1164 * trigger anything here. 1164 struct netvsc_device *ndev;
1165 */ 1165 int i;
1166
1167 rcu_read_lock();
1168 ndev = rcu_dereference(ndc->nvdev);
1169 if (ndev) {
1170 for (i = 0; i < ndev->num_chn; i++) {
1171 struct netvsc_channel *nvchan = &ndev->chan_table[i];
1172
1173 napi_schedule(&nvchan->napi);
1174 }
1175 }
1176 rcu_read_unlock();
1166} 1177}
1167#endif 1178#endif
1168 1179