From: David Miller <davem@davemloft.net>
To: ivan.khoronzhuk@linaro.org
Cc: netdev@vger.kernel.org, vinicius.gomes@intel.com,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
linux-kernel@vger.kernel.org
Subject: Re: [net-next PATCH] taprio: don't reject same mqprio settings
Date: Sat, 16 Nov 2019 12:42:33 -0800 (PST) [thread overview]
Message-ID: <20191116.124233.2034551092704813586.davem@davemloft.net> (raw)
In-Reply-To: <20191115015607.11291-1-ivan.khoronzhuk@linaro.org>
From: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date: Fri, 15 Nov 2019 03:56:07 +0200
> @@ -1347,6 +1347,26 @@ static int taprio_parse_clockid(struct Qdisc *sch, struct nlattr **tb,
> return err;
> }
>
> +static int taprio_mqprio_cmp(struct net_device *dev,
> + struct tc_mqprio_qopt *mqprio)
> +{
...
> static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
> struct netlink_ext_ack *extack)
> {
> @@ -1398,6 +1418,10 @@ static int taprio_change(struct Qdisc *sch, struct nlattr *opt,
> admin = rcu_dereference(q->admin_sched);
> rcu_read_unlock();
>
> + /* no changes - no new mqprio settings */
> + if (mqprio && !taprio_mqprio_cmp(dev, mqprio))
> + mqprio = NULL;
> +
I like Vinicius's feedback, please make the new helper function have
the signature:
static int taprio_mqprio_cmp(const struct net_device *dev,
const struct tc_mqprio_qopt *mqprio)
And make the NULL check in there instead of at the caller.
Please also remember to add the Fixes: tag.
Thanks.
prev parent reply other threads:[~2019-11-16 20:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-15 1:56 Ivan Khoronzhuk
2019-11-15 20:38 ` Vladimir Oltean
2019-11-15 21:21 ` Vinicius Costa Gomes
2019-11-16 20:42 ` David Miller [this message]
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=20191116.124233.2034551092704813586.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ivan.khoronzhuk@linaro.org \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vinicius.gomes@intel.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
all inboxes | Powered by JetHome®