From: Jakub Kicinski <kuba@kernel.org>
To: Pedro Tammela <pctammela@mojatatu.com>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next 1/2] net/sched: sch_htb: use extack on errors messages
Date: Fri, 14 Apr 2023 18:13:45 -0700 [thread overview]
Message-ID: <20230414181345.34114441@kernel.org> (raw)
In-Reply-To: <20230414185309.220286-2-pctammela@mojatatu.com>
On Fri, 14 Apr 2023 15:53:09 -0300 Pedro Tammela wrote:
> @@ -1917,8 +1917,9 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
> };
> err = htb_offload(dev, &offload_opt);
> if (err) {
> - pr_err("htb: TC_HTB_LEAF_ALLOC_QUEUE failed with err = %d\n",
> - err);
> + NL_SET_ERR_MSG_FMT_MOD(extack,
What's the ruling on using _MOD() in qdiscs ?
There are some extacks already in this file without _MOD().
> + "TC_HTB_LEAF_ALLOC_QUEUE failed with err = %d\n",
> + err);
The formatting of an error into the message is unnecessary duplication.
The error value does not make it to dmesg so we need to print it there,
but it's already present at the netlink level.
next prev parent reply other threads:[~2023-04-15 1:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 18:53 [PATCH net-next 0/2] net/sched: cleanup parsing prints in htb and qfq Pedro Tammela
2023-04-14 18:53 ` [PATCH net-next 1/2] net/sched: sch_htb: use extack on errors messages Pedro Tammela
2023-04-15 1:13 ` Jakub Kicinski [this message]
2023-04-15 14:06 ` Jamal Hadi Salim
2023-04-17 15:52 ` Jakub Kicinski
2023-04-17 16:35 ` Pedro Tammela
2023-04-14 18:53 ` [PATCH net-next 2/2] net/sched: sch_qfq: " Pedro Tammela
2023-04-15 1:15 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230414181345.34114441@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pctammela@mojatatu.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).