[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87v9orbj7o.fsf@linux.intel.com>
Date: Fri, 31 Jan 2020 09:59:23 -0800
From: Vinicius Costa Gomes <vinicius.gomes@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net, vladimir.oltean@....com,
po.liu@....com
Subject: Re: [PATCH net v3 2/2] taprio: Fix still allowing changing the flags during runtime
Jakub Kicinski <kuba@...nel.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;
>> +}
Powered by blists - more mailing lists