Skip to content

Commit

Permalink
virtio_net: parametrize the napi_weight for virtio receive queue.
Browse files Browse the repository at this point in the history
It is done in order to improve performance.

Signed-off-by: Dor Laor <dor.laor@qumranet.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
  • Loading branch information
Dor Laor authored and Rusty Russell committed Feb 4, 2008
1 parent 2cb9c6b commit 6c0cd7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/net/virtio_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
#include <linux/virtio_net.h>
#include <linux/scatterlist.h>

static int napi_weight = 128;
module_param(napi_weight, int, 0444);

static int csum = 1, gso = 1;
module_param(csum, bool, 0444);
module_param(gso, bool, 0444);
Expand Down Expand Up @@ -353,7 +356,7 @@ static int virtnet_probe(struct virtio_device *vdev)

/* Set up our device-specific information */
vi = netdev_priv(dev);
netif_napi_add(dev, &vi->napi, virtnet_poll, 16);
netif_napi_add(dev, &vi->napi, virtnet_poll, napi_weight);
vi->dev = dev;
vi->vdev = vdev;

Expand Down

0 comments on commit 6c0cd7c

Please sign in to comment.