Commit 6c0cd7c0 authored by Dor Laor's avatar Dor Laor Committed by Rusty Russell

virtio_net: parametrize the napi_weight for virtio receive queue.

It is done in order to improve performance.
Signed-off-by: default avatarDor Laor <dor.laor@qumranet.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 2cb9c6ba
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
#include <linux/virtio_net.h> #include <linux/virtio_net.h>
#include <linux/scatterlist.h> #include <linux/scatterlist.h>
static int napi_weight = 128;
module_param(napi_weight, int, 0444);
static int csum = 1, gso = 1; static int csum = 1, gso = 1;
module_param(csum, bool, 0444); module_param(csum, bool, 0444);
module_param(gso, bool, 0444); module_param(gso, bool, 0444);
...@@ -353,7 +356,7 @@ static int virtnet_probe(struct virtio_device *vdev) ...@@ -353,7 +356,7 @@ static int virtnet_probe(struct virtio_device *vdev)
/* Set up our device-specific information */ /* Set up our device-specific information */
vi = netdev_priv(dev); 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->dev = dev;
vi->vdev = vdev; vi->vdev = vdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment