From 5b9c63bc691c860d3116478f73bece0ae2fbf0d1 Mon Sep 17 00:00:00 2001 From: Jeff Moyer Date: Mon, 30 Aug 2004 20:38:19 -0700 Subject: [PATCH] [PATCH] netpoll: increase NAPI budget 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 Signed-off-by: Matt Mackall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- net/core/netpoll.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/core/netpoll.c b/net/core/netpoll.c index ac1295f74441f..25f14d15c3216 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -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; -- 2.53.0