-----Original Message----- From: Paolo Abeni pabeni@redhat.com Sent: Tuesday, July 8, 2025 12:29 PM To: Chia-Yu Chang (Nokia) chia-yu.chang@nokia-bell-labs.com; alok.a.tiwari@oracle.com; pctammela@mojatatu.com; horms@kernel.org; donald.hunter@gmail.com; xandfury@gmail.com; netdev@vger.kernel.org; dave.taht@gmail.com; jhs@mojatatu.com; kuba@kernel.org; stephen@networkplumber.org; xiyou.wangcong@gmail.com; jiri@resnulli.us; davem@davemloft.net; edumazet@google.com; andrew+netdev@lunn.ch; ast@fiberby.net; liuhangbin@gmail.com; shuah@kernel.org; linux-kselftest@vger.kernel.org; ij@kernel.org; ncardwell@google.com; Koen De Schepper (Nokia) koen.de_schepper@nokia-bell-labs.com; g.white@cablelabs.com; ingemar.s.johansson@ericsson.com; mirja.kuehlewind@ericsson.com; cheshire@apple.com; rs.ietf@gmx.at; Jason_Livingood@comcast.com; vidhi_goel@apple.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@nokia-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