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>
This commit is contained in:
parent
fbd4c7e768
commit
a5ecd43992
@ -1158,11 +1158,22 @@ netvsc_get_rxnfc(struct net_device *dev, struct ethtool_rxnfc *info,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_NET_POLL_CONTROLLER
|
#ifdef CONFIG_NET_POLL_CONTROLLER
|
||||||
static void netvsc_poll_controller(struct net_device *net)
|
static void netvsc_poll_controller(struct net_device *dev)
|
||||||
{
|
{
|
||||||
/* As netvsc_start_xmit() works synchronous we don't have to
|
struct net_device_context *ndc = netdev_priv(dev);
|
||||||
* trigger anything here.
|
struct netvsc_device *ndev;
|
||||||
*/
|
int i;
|
||||||
|
|
||||||
|
rcu_read_lock();
|
||||||
|
ndev = rcu_dereference(ndc->nvdev);
|
||||||
|
if (ndev) {
|
||||||
|
for (i = 0; i < ndev->num_chn; i++) {
|
||||||
|
struct netvsc_channel *nvchan = &ndev->chan_table[i];
|
||||||
|
|
||||||
|
napi_schedule(&nvchan->napi);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
rcu_read_unlock();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user