diff options
author | Pedro Tammela <pctammela@mojatatu.com> | 2023-04-22 17:56:10 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-04-23 19:47:09 +0200 |
commit | c69a9b023f65b73068a17f2f4eb6a1b6e257f5bf (patch) | |
tree | 8e0a5123e4a20e42eed79a98e40b14df5bf7ed54 /net/sched/sch_qfq.c | |
parent | net/sched: sch_htb: use extack on errors messages (diff) | |
download | linux-c69a9b023f65b73068a17f2f4eb6a1b6e257f5bf.tar.xz linux-c69a9b023f65b73068a17f2f4eb6a1b6e257f5bf.zip |
net/sched: sch_qfq: use extack on errors messages
Some error messages are still being printed to dmesg.
Since extack is available, provide error messages there.
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_qfq.c')
-rw-r--r-- | net/sched/sch_qfq.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c index 02098a02943e..abcc48087831 100644 --- a/net/sched/sch_qfq.c +++ b/net/sched/sch_qfq.c @@ -402,8 +402,8 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, int err; int delta_w; - if (tca[TCA_OPTIONS] == NULL) { - pr_notice("qfq: no options\n"); + if (NL_REQ_ATTR_CHECK(extack, NULL, tca, TCA_OPTIONS)) { + NL_SET_ERR_MSG_MOD(extack, "missing options"); return -EINVAL; } @@ -442,8 +442,9 @@ static int qfq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, delta_w = weight - (cl ? cl->agg->class_weight : 0); if (q->wsum + delta_w > QFQ_MAX_WSUM) { - pr_notice("qfq: total weight out of range (%d + %u)\n", - delta_w, q->wsum); + NL_SET_ERR_MSG_FMT_MOD(extack, + "total weight out of range (%d + %u)\n", + delta_w, q->wsum); return -EINVAL; } |