Skip to content

Commit

Permalink
net: sched: Clarify error message when qdisc kind is unknown
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Victor Nogueira <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
vbnogueira authored and davem330 committed Jan 20, 2022
1 parent 47934e0 commit 973bf8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 973bf8f

Please sign in to comment.