netdev
[Top] [All Lists]

napi poll and dev->weight

To: mpm@xxxxxxxxxxx
Subject: napi poll and dev->weight
From: Jeff Moyer <jmoyer@xxxxxxxxxx>
Date: Fri, 22 Apr 2005 13:16:21 -0400
Cc: netdev@xxxxxxxxxxx
Reply-to: jmoyer@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Hi, Matt,

I recently debugged an issue we had with netdump, where a NAPI poll would
exhaust the network card's budget.  In this case, the budget was never
reset (since we are in a panicked state), and so the card's poll routine
would always return immediately without doing any work.

While other netpoll users may not have exactly the same problems, this
could become an issue in the places where you call netpoll_poll in a loop
(such as in find_skb and netpoll_send_skb).  You might consider a check
like the following in such cases:

  if (dev->quota <= 0)
        dev->quota += dev->weight;

This will at least make it possible for the poll routine to make progress.

If any of this is unclear, feel free to tell me so.  I'll gladly elaborate.

-Jeff

<Prev in Thread] Current Thread [Next in Thread>
  • napi poll and dev->weight, Jeff Moyer <=