From: Dor Laor Date: Sun, 16 Dec 2007 13:19:43 +0000 (+0200) Subject: virtio_net: parametrize the napi_weight for virtio receive queue. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6c0cd7c000dc0851035c5003bf9d47733d0b257b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git virtio_net: parametrize the napi_weight for virtio receive queue. It is done in order to improve performance. Signed-off-by: Dor Laor Signed-off-by: Rusty Russell --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a61c176607f4..e66de0c12fc1 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -24,6 +24,9 @@ #include #include +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;