Skip to content

Commit 427d583

Browse files
edumazetdavem330
authored andcommitted
net: napi: remove useless stack trace
Whenever a buggy NAPI driver returns more than its budget, we emit a stack trace that is of no use, since it does not tell which driver is buggy. Instead, emit a message giving the function name, and a descriptive message. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4e63802 commit 427d583

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/core/dev.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6683,7 +6683,9 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll)
66836683
trace_napi_poll(n, work, weight);
66846684
}
66856685

6686-
WARN_ON_ONCE(work > weight);
6686+
if (unlikely(work > weight))
6687+
pr_err_once("NAPI poll function %pS returned %d, exceeding its budget of %d.\n",
6688+
n->poll, work, weight);
66876689

66886690
if (likely(work < weight))
66896691
goto out_unlock;

0 commit comments

Comments
 (0)