lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241008161919.026488d9@kernel.org>
Date: Tue, 8 Oct 2024 16:19:19 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Joe Damato <jdamato@...tly.com>
Cc: netdev@...r.kernel.org, mkarsten@...terloo.ca, skhawaja@...gle.com,
 sdf@...ichev.me, bjorn@...osinc.com, amritha.nambiar@...el.com,
 sridhar.samudrala@...el.com, willemdebruijn.kernel@...il.com, "David S.
 Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Paolo
 Abeni <pabeni@...hat.com>, Donald Hunter <donald.hunter@...il.com>, Jesper
 Dangaard Brouer <hawk@...nel.org>, Mina Almasry <almasrymina@...gle.com>,
 Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, Daniel Jurgens
 <danielj@...dia.com>, open list <linux-kernel@...r.kernel.org>
Subject: Re: [RFC net-next v4 6/9] netdev-genl: Support setting per-NAPI
 config values

On Tue, 8 Oct 2024 16:00:41 -0700 Joe Damato wrote:
> > Make sure you edit the spec, not the output. Looks like there may be 
> > a problem here (napi-id vs id in the attributes).  
> 
> I'm not sure I follow this part, sorry if I'm just missing something
> here.
> 
> I was referring to NETDEV_A_NAPI_DEFER_HARD_IRQS which in RFCv4 is
> listed as NLA_S32 (in this patch):
> 
> static const struct nla_policy netdev_napi_set_nl_policy[NETDEV_A_NAPI_GRO_FLUSH_TIMEOUT + 1] = {
>      [NETDEV_A_NAPI_ID] = { .type = NLA_U32, },
>      [NETDEV_A_NAPI_DEFER_HARD_IRQS] = { .type = NLA_S32 },
> 
> However, in the yaml spec (patch 2/9):
> 
> +      -
> +        name: defer-hard-irqs
> +        doc: The number of consecutive empty polls before IRQ deferral ends
> +             and hardware IRQs are re-enabled.
> +        type: u32
> +        checks:
> +          max: s32-max
> 
> So the type is u32 but with a "checks" to match what happens now in
> sysfs.
> 
> That's why I mentioned changing NLA_S32 to NLA_U32.
> 
> Am I missing something?

YNL will generate the correct code for your - the right type
and the right range validation. Run the command below to see.

> Not sure what you meant by "napi-id vs id" ?

I can't apply the series now, but when it was posted the YNL code
generation failed here complaining about napi-id not existing in
the attribute set in which it is used. In the napi attribute set
the NAPI ID is called just "id", not "napi-id".

> > Make sure you run: ./tools/net/ynl/ynl-regen.sh -f
> > and the tree is clean afterwards  
> 
> OK, will do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ