Skip to contentSkip to conversation

net: napi: remove useless stack trace

PATCH Applied Eric Dumazet 2 participants 2 messages Jun 17, 2020 – Jun 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 net/core/dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
net/core/dev.c +3 -1
index 6bc2388141f6fd7c66c0e8349514a326e5106db2..cea7fc1716caf9dbe8fcfcb5c5eec0ed21e20775 100644
@@ -6683,7 +6683,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;
Signature · 1 line
2.27.0.290.gba653c62da-goog
maintainer Applied
#1 lore raw

From: Eric Dumazet <[email protected]>
Date: Wed, 17 Jun 2020 09:40:51 -0700

Quoted 8 lines

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.

Applied, thanks Eric.