netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, jhs@mojatatu.com,
	xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
	vladimir.oltean@nxp.com, po.liu@nxp.com
Subject: Re: [PATCH net v3 2/2] taprio: Fix still allowing changing the flags during runtime
Date: Fri, 31 Jan 2020 09:59:23 -0800	[thread overview]
Message-ID: <87v9orbj7o.fsf@linux.intel.com> (raw)
In-Reply-To: <20200131072656.0b899074@cakuba.hsd1.ca.comcast.net>

Jakub Kicinski <kuba@kernel.org> writes:

> On Wed, 29 Jan 2020 17:37:21 -0800, Vinicius Costa Gomes wrote:
>> +static int taprio_new_flags(const struct nlattr *attr, u32 old,
>> +			    struct netlink_ext_ack *extack)
>> +{
>> +	u32 new = 0;
>
> TCA_TAPRIO_ATTR_FLAGS doesn't seem to be in the netlink policy 😖

Will add it.

>
>> +	if (attr)
>> +		new = nla_get_u32(attr);
>> +
>> +	if (old != TAPRIO_FLAGS_INVALID && old != new) {
>> +		NL_SET_ERR_MSG_MOD(extack, "Changing 'flags' of a running schedule is not supported");
>> +		return -ENOTSUPP;
>
> -EOPNOTSUPP

Will fix.

>
>> +	}
>> +
>> +	if (!taprio_flags_valid(new)) {
>> +		NL_SET_ERR_MSG_MOD(extack, "Specified 'flags' are not valid");
>> +		return -EINVAL;
>> +	}
>> +
>> +	return new;
>> +}

      reply	other threads:[~2020-01-31 17:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30  1:37 [PATCH net v3 0/2] taprio: Some fixes Vinicius Costa Gomes
2020-01-30  1:37 ` [PATCH net v3 1/2] taprio: Fix enabling offload with wrong number of traffic classes Vinicius Costa Gomes
2020-01-31 15:24   ` Jakub Kicinski
2020-01-31 18:00     ` Vinicius Costa Gomes
2020-01-30  1:37 ` [PATCH net v3 2/2] taprio: Fix still allowing changing the flags during runtime Vinicius Costa Gomes
2020-01-31 15:26   ` Jakub Kicinski
2020-01-31 17:59     ` Vinicius Costa Gomes [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=87v9orbj7o.fsf@linux.intel.com \
    --to=vinicius.gomes@intel.com \
    --cc=davem@davemloft.net \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=po.liu@nxp.com \
    --cc=vladimir.oltean@nxp.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).