lkml.org 
[lkml]   [2022]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.4 08/15] net: sched: Clarify error message when qdisc kind is unknown
    Date
    From: Victor Nogueira <victor@mojatatu.com>

    [ Upstream commit 973bf8fdd12f0e70ea351c018e68edd377a836d1 ]

    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 <victor@mojatatu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/sched/sch_api.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
    index e70f990334083..6f36df85d23d8 100644
    --- a/net/sched/sch_api.c
    +++ b/net/sched/sch_api.c
    @@ -1195,7 +1195,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;
    }

    --
    2.34.1
    \
     
     \ /
      Last update: 2022-02-03 21:43    [W:4.502 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site