From: Jiri Pirko <jiri@resnulli.us>
To: Alexander Aring <aring@mojatatu.com>
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net,
netdev@vger.kernel.org, kernel@mojatatu.com,
David Ahern <dsahern@gmail.com>
Subject: Re: [PATCHv4 net-next 02/14] net: sched: sch_api: handle generic qdisc errors
Date: Tue, 26 Dec 2017 12:53:09 +0100 [thread overview]
Message-ID: <20171226115309.GC2173@nanopsycho> (raw)
In-Reply-To: <20171220173524.25874-3-aring@mojatatu.com>
Wed, Dec 20, 2017 at 06:35:12PM CET, aring@mojatatu.com wrote:
>This patch adds extack support for generic qdisc handling. The extack
>will be set deeper to each called function which is not part of netdev
>core api.
>
>Cc: David Ahern <dsahern@gmail.com>
>Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
>Signed-off-by: Alexander Aring <aring@mojatatu.com>
>---
[...]
>@@ -1349,21 +1387,33 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n,
>
> if (!q || !tcm->tcm_handle || q->handle != tcm->tcm_handle) {
> if (tcm->tcm_handle) {
>- if (q && !(n->nlmsg_flags & NLM_F_REPLACE))
>+ if (q && !(n->nlmsg_flags & NLM_F_REPLACE)) {
>+ NL_SET_ERR_MSG(extack, "NLM_F_REPLACE needed to override");
> return -EEXIST;
>- if (TC_H_MIN(tcm->tcm_handle))
>+ }
>+ if (TC_H_MIN(tcm->tcm_handle)) {
>+ NL_SET_ERR_MSG(extack, "Invalid minor handle");
> return -EINVAL;
>+ }
> q = qdisc_lookup(dev, tcm->tcm_handle);
>- if (!q)
>+ if (!q) {
>+ NL_SET_ERR_MSG(extack, "No qdisc found for specified handle");
This is incorrect. This is hit on successpath as well, confusing user
with the message. I will send fix shortly.
> goto create_n_graft;
>- if (n->nlmsg_flags & NLM_F_EXCL)
>+ }
next prev parent reply other threads:[~2017-12-26 11:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 17:35 [PATCHv4 net-next 00/14] net: sched: sch: introduce extack support Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 01/14] net: sched: fix coding style issues Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 02/14] net: sched: sch_api: handle generic qdisc errors Alexander Aring
2017-12-26 11:53 ` Jiri Pirko [this message]
2017-12-20 17:35 ` [PATCHv4 net-next 03/14] net: sched: sch: add extack for init callback Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 04/14] net: sched: sch: add extack for change qdisc ops Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 05/14] net: sched: sch: add extack to change class Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 06/14] net: sched: sch: add extack for block callback Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 07/14] net: sched: sch: add extack for graft callback Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 08/14] net: sch: api: add extack support in qdisc_get_rtab Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 09/14] net: sch: api: add extack support in tcf_block_get Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 10/14] net: sch: api: add extack support in qdisc_alloc Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 11/14] net: sch: api: add extack support in qdisc_create_dflt Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 12/14] net: sch: sch_cbq: add extack support Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 13/14] net: sch: sch_cbs: " Alexander Aring
2017-12-20 17:35 ` [PATCHv4 net-next 14/14] net: sch: sch_drr: " Alexander Aring
2017-12-21 17:42 ` [PATCHv4 net-next 00/14] net: sched: sch: introduce " David Miller
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=20171226115309.GC2173@nanopsycho \
--to=jiri@resnulli.us \
--cc=aring@mojatatu.com \
--cc=davem@davemloft.net \
--cc=dsahern@gmail.com \
--cc=jhs@mojatatu.com \
--cc=kernel@mojatatu.com \
--cc=netdev@vger.kernel.org \
--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).