Re: [PATCH v2 net-next 01/12] net/sched: taprio: allow user input of per-tc max SDU

From: Jakub Kicinski
Date: Mon Sep 26 2022 - 16:39:12 EST


On Fri, 23 Sep 2022 19:32:59 +0300 Vladimir Oltean wrote:
> + if (!tb[TCA_TAPRIO_TC_ENTRY_INDEX]) {
> + NL_SET_ERR_MSG_MOD(extack, "TC entry index missing");

NL_SET_ERR_ATTR_MISS() ?

> + return -EINVAL;
> + }
> +
> + tc = nla_get_u32(tb[TCA_TAPRIO_TC_ENTRY_INDEX]);
> + if (tc >= TC_QOPT_MAX_QUEUE) {
> + NL_SET_ERR_MSG_MOD(extack, "TC entry index out of range");

NLA_POLICY_MAX()

Are you not using those on purpose? :(