[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200131072656.0b899074@cakuba.hsd1.ca.comcast.net>
Date: Fri, 31 Jan 2020 07:26:56 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Vinicius Costa Gomes <vinicius.gomes@...el.com>
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
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 😖
> + 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
> + }
> +
> + 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