Skip to content

Commit

Permalink
net: napi: remove useless stack trace
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
(cherry picked from commit 427d583)
Signed-off-by: Po-Hsu Lin <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Acked-by: Kleber Sacilotto de Souza <[email protected]>
Signed-off-by: Ian May <[email protected]>
  • Loading branch information
Eric Dumazet authored and ksacilotto committed Jan 20, 2021
1 parent 1b33df6 commit 061fe69
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -6308,7 +6308,9 @@ static int napi_poll(struct napi_struct *n, struct list_head *repoll)
trace_napi_poll(n, work, weight);
}

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

if (likely(work < weight))
goto out_unlock;
Expand Down

0 comments on commit 061fe69

Please sign in to comment.