Skip to content

Commit 061fe69

Browse files
Eric Dumazetksacilotto
authored andcommitted
net: napi: remove useless stack trace
BugLink: https://bugs.launchpad.net/bugs/1903596 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> (cherry picked from commit 427d583) Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com> Signed-off-by: Ian May <ian.may@canonical.com>
1 parent 1b33df6 commit 061fe69

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
@@ -6308,7 +6308,9 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll)
63086308
trace_napi_poll(n, work, weight);
63096309
}
63106310

6311-
WARN_ON_ONCE(work > weight);
6311+
if (unlikely(work > weight))
6312+
pr_err_once("NAPI poll function %pS returned %d, exceeding its budget of %d.\n",
6313+
n->poll, work, weight);
63126314

63136315
if (likely(work < weight))
63146316
goto out_unlock;

0 commit comments

Comments
 (0)