[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PAXPR07MB798488E0305080CE891E8286A34EA@PAXPR07MB7984.eurprd07.prod.outlook.com>
Date: Tue, 8 Jul 2025 20:22:23 +0000
From: "Chia-Yu Chang (Nokia)" <chia-yu.chang@...ia-bell-labs.com>
To: Paolo Abeni <pabeni@...hat.com>, "alok.a.tiwari@...cle.com"
<alok.a.tiwari@...cle.com>, "pctammela@...atatu.com"
<pctammela@...atatu.com>, "horms@...nel.org" <horms@...nel.org>,
"donald.hunter@...il.com" <donald.hunter@...il.com>, "xandfury@...il.com"
<xandfury@...il.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"dave.taht@...il.com" <dave.taht@...il.com>, "jhs@...atatu.com"
<jhs@...atatu.com>, "kuba@...nel.org" <kuba@...nel.org>,
"stephen@...workplumber.org" <stephen@...workplumber.org>,
"xiyou.wangcong@...il.com" <xiyou.wangcong@...il.com>, "jiri@...nulli.us"
<jiri@...nulli.us>, "davem@...emloft.net" <davem@...emloft.net>,
"edumazet@...gle.com" <edumazet@...gle.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "ast@...erby.net" <ast@...erby.net>,
"liuhangbin@...il.com" <liuhangbin@...il.com>, "shuah@...nel.org"
<shuah@...nel.org>, "linux-kselftest@...r.kernel.org"
<linux-kselftest@...r.kernel.org>, "ij@...nel.org" <ij@...nel.org>,
"ncardwell@...gle.com" <ncardwell@...gle.com>, "Koen De Schepper (Nokia)"
<koen.de_schepper@...ia-bell-labs.com>, "g.white@...lelabs.com"
<g.white@...lelabs.com>, "ingemar.s.johansson@...csson.com"
<ingemar.s.johansson@...csson.com>, "mirja.kuehlewind@...csson.com"
<mirja.kuehlewind@...csson.com>, "cheshire@...le.com" <cheshire@...le.com>,
"rs.ietf@....at" <rs.ietf@....at>, "Jason_Livingood@...cast.com"
<Jason_Livingood@...cast.com>, "vidhi_goel@...le.com" <vidhi_goel@...le.com>
Subject: RE: [PATCH v21 net-next 1/6] sched: Struct definition and parsing of
dualpi2 qdisc
> -----Original Message-----
> From: Paolo Abeni <pabeni@...hat.com>
> Sent: Tuesday, July 8, 2025 12:29 PM
> To: Chia-Yu Chang (Nokia) <chia-yu.chang@...ia-bell-labs.com>; alok.a.tiwari@...cle.com; pctammela@...atatu.com; horms@...nel.org; donald.hunter@...il.com; xandfury@...il.com; netdev@...r.kernel.org; dave.taht@...il.com; jhs@...atatu.com; kuba@...nel.org; stephen@...workplumber.org; xiyou.wangcong@...il.com; jiri@...nulli.us; davem@...emloft.net; edumazet@...gle.com; andrew+netdev@...n.ch; ast@...erby.net; liuhangbin@...il.com; shuah@...nel.org; linux-kselftest@...r.kernel.org; ij@...nel.org; ncardwell@...gle.com; Koen De Schepper (Nokia) <koen.de_schepper@...ia-bell-labs.com>; g.white@...lelabs.com; ingemar.s.johansson@...csson.com; mirja.kuehlewind@...csson.com; cheshire@...le.com; rs.ietf@....at; Jason_Livingood@...cast.com; vidhi_goel@...le.com
> Subject: Re: [PATCH v21 net-next 1/6] sched: Struct definition and parsing of dualpi2 qdisc
>
>
> CAUTION: This is an external email. Please be very careful when clicking links or opening attachments. See the URL nok.it/ext for additional information.
>
>
>
> On 7/2/25 5:28 AM, chia-yu.chang@...ia-bell-labs.com wrote:
> > +static int dualpi2_change(struct Qdisc *sch, struct nlattr *opt,
> > + struct netlink_ext_ack *extack) {
> > + struct nlattr *tb[TCA_DUALPI2_MAX + 1];
> > + struct dualpi2_sched_data *q;
> > + int old_backlog;
> > + int old_qlen;
> > + int err;
> > +
> > + if (!opt) {
> > + NL_SET_ERR_MSG_MOD(extack, "Dualpi2 options are
> > + reuqired");
>
> Minor note: typo above ("reuqired" -> "required")
>
> More importantly: the above is inconsistent with the below code, where AFAICS it's not enforced/mandated the presence of any Dualpi2 option.
>
> i.e. User space could successfully provide a TCA_OPTIONS with no nested attributes.
>
> Am I missing something?
>
> Thanks,
>
> Paolo
Hi Paolo,
The original patch looks like below, and I see the option is mandatory otherwise it will return -EINVAL.
Is this what you mean in your comments or you mean other things?
+ if (!opt) {
+ NL_SET_ERR_MSG_MOD(extack, "Dualpi2 options are reuqired");
+ return -EINVAL;
+ }
Best regards,
Chia-Yu
Powered by blists - more mailing lists