]> git.hungrycats.org Git - linux/commitdiff
[PATCH] netpoll: increase NAPI budget
authorJeff Moyer <jmoyer@redhat.com>
Tue, 31 Aug 2004 03:38:19 +0000 (20:38 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 31 Aug 2004 03:38:19 +0000 (20:38 -0700)
I've upped the poll budget to 16 and added a comment explaining why.  I
definitely ran into this problem when testing netdump.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
net/core/netpoll.c

index ac1295f74441f4a25432112d3ae47e4de05ceabf..25f14d15c3216a1e1c7838eecfcb3315e6804849 100644 (file)
@@ -63,7 +63,13 @@ static int checksum_udp(struct sk_buff *skb, struct udphdr *uh,
 
 void netpoll_poll(struct netpoll *np)
 {
-       int budget = 1;
+       /*
+        * In cases where there is bi-directional communications, reading
+        * only one message at a time can lead to packets being dropped by
+        * the network adapter, forcing superfluous retries and possibly
+        * timeouts.  Thus, we set our budget to a more reasonable value.
+        */
+       int budget = 16;
 
        if(!np->dev || !netif_running(np->dev) || !np->dev->poll_controller)
                return;