Skip to contentSkip to conversation

net: sched: Clarify error message when qdisc kind is unknown

PATCH Applied Victor Nogueira 2 participants 2 messages Jan 18, 2022 – Jan 20, 2022

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

PATCH 1/1 net: sched: Clarify error message when qdisc kind is unknown

When adding a tc rule with a qdisc kind that is not supported or not compiled into the kernel, the kernel emits the following error: "Error:
Specified qdisc not found.". Found via tdc testing when ETS qdisc was not compiled in and it was not obvious right away what the message meant without looking at the kernel code.

Change the error message to be more explicit and say the qdisc kind is unknown.

---
 net/sched/sch_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_api.c +1 -1
index c9c6f49f9c28..eedb2df7cc6e 100644
@@ -1204,7 +1204,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,
 
 	err = -ENOENT;
 	if (!ops) {
-		NL_SET_ERR_MSG(extack, "Specified qdisc not found");
+		NL_SET_ERR_MSG(extack, "Specified qdisc kind is unknown");
 		goto err_out;
 	}
 
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 10 lines · On Tue, 18 Jan 2022 14:19:09 -0300 you wrote:

When adding a tc rule with a qdisc kind that is not supported or not compiled into the kernel, the kernel emits the following error: "Error:
Specified qdisc not found.". Found via tdc testing when ETS qdisc was not compiled in and it was not obvious right away what the message meant without looking at the kernel code.

Change the error message to be more explicit and say the qdisc kind is unknown.

[...]

Here is the summary with links:
- [net-next] net: sched: Clarify error message when qdisc kind is unknown

    https://git.kernel.org/netdev/net/c/973bf8fdd12f

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html