Skip to contentSkip to conversation

virtio additions

PATCH RESEND In review Dor Laor 1 participant 1 message Dec 21, 2007

Subsystems (3)
lore
Share & tools
lore

Dor Laor

author
#0 lore raw

PATCH RESEND 11/13 virtio additions

From 867f898388bda2dccf6d0aba2a9c96abae1697ed Mon Sep 17 00:00:00 2001
From: Dor Laor <dor.laor-atKUWr5tajBWk0Htik3J/[email protected]>
Date: Sun, 16 Dec 2007 15:19:43 +0200
Subject: [PATCH] Parametrize the napi_weight for virtio receive queue. It is done in order to improve performance.

---
 drivers/net/virtio_net.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/virtio_net.c +4 -1
index 0403d65..d35dbe7 100644
@@ -25,6 +25,9 @@
 #include <linux/scatterlist.h>
 #include <linux/hrtimer.h>
 
+static int napi_weight = 128;
+module_param(napi_weight, int, 0);
+
 /* FIXME: MTU in config. */
 #define MAX_PACKET_LEN (ETH_HLEN+ETH_DATA_LEN)
 
@@ -508,7 +511,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;
     hrtimer_init(&vi->tx_timer, CLOCK_REALTIME, HRTIMER_MODE_REL);
Signature · 7 lines
1.5.3.3


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/