]> err.no Git - linux-2.6/commitdiff
virtio_net: parametrize the napi_weight for virtio receive queue.
authorDor Laor <dor.laor@qumranet.com>
Sun, 16 Dec 2007 13:19:43 +0000 (15:19 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 4 Feb 2008 12:50:09 +0000 (23:50 +1100)
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>
drivers/net/virtio_net.c

index a61c176607f4585b53a7514c90b89a9de0ce30ef..e66de0c12fc10e1455e4137f8f68271ca44505b5 100644 (file)
@@ -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;