diff options
author | Dor Laor <dor.laor@qumranet.com> | 2007-12-16 15:19:43 +0200 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 23:50:09 +1100 |
commit | 6c0cd7c000dc0851035c5003bf9d47733d0b257b (patch) | |
tree | 571e7456cfcb79d4819a77acb068b39df0caf908 /drivers/net/virtio_net.c | |
parent | 2cb9c6bafc58cf4066cb15f0ac6989a1015a02cc (diff) | |
download | op-kernel-dev-6c0cd7c000dc0851035c5003bf9d47733d0b257b.zip op-kernel-dev-6c0cd7c000dc0851035c5003bf9d47733d0b257b.tar.gz |
virtio_net: parametrize the napi_weight for virtio receive queue.
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>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a61c176..e66de0c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -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); @@ -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; |