Skip to contentSkip to conversation

netpoll: increase NAPI budget

PATCH New Matt Mackall 1 participant 1 message Aug 26, 2004 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 netpoll: increase NAPI budget

From: Jeff Moyer <[email protected]>

Hi, Matt,

I've upped the poll budget to 16 and added a comment explaining why. I definitely ran into this problem when testing netdump.

net/core/netpoll.c renamed from net/core/netpoll.c.budget +7 -1
@@ -61,7 +61,13 @@ static int checksum_udp(struct sk_buff *
 
 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;
Signature · 1 line
Mathematics is the supreme nostalgia of our time.