Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87417
b: refs/heads/master
c: da74e89
h: refs/heads/master
i:
  87415: 78b9df2
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Mar 17, 2008
1 parent ba81b21 commit 1487acc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bdc1681cdf1ab6a65fa935a2b3f8fc63b20c54ea
refs/heads/master: da74e89d40995600b3b07ac500084920247687ce
12 changes: 12 additions & 0 deletions trunk/drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ static int start_xmit(struct sk_buff *skb, struct net_device *dev)
return 0;
}

#ifdef CONFIG_NET_POLL_CONTROLLER
static void virtnet_netpoll(struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);

napi_schedule(&vi->napi);
}
#endif

static int virtnet_open(struct net_device *dev)
{
struct virtnet_info *vi = netdev_priv(dev);
Expand Down Expand Up @@ -336,6 +345,9 @@ static int virtnet_probe(struct virtio_device *vdev)
dev->stop = virtnet_close;
dev->hard_start_xmit = start_xmit;
dev->features = NETIF_F_HIGHDMA;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = virtnet_netpoll;
#endif
SET_NETDEV_DEV(dev, &vdev->dev);

/* Do we support "hardware" checksums? */
Expand Down

0 comments on commit 1487acc

Please sign in to comment.