[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a56cc76f-7278-49d5-a9ca-5d04d61cb8f8@gmail.com>
Date: Tue, 18 Nov 2025 09:05:20 -0500
From: Daniel Zahka <daniel.zahka@...il.com>
To: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>,
Jiri Pirko <jiri@...nulli.us>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Jonathan Corbet <corbet@....net>, Srujana Challa <schalla@...vell.com>,
Bharat Bhushan <bbhushan2@...vell.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Brett Creeley <brett.creeley@....com>, Andrew Lunn <andrew+netdev@...n.ch>,
Michael Chan <michael.chan@...adcom.com>,
Pavan Chebbi <pavan.chebbi@...adcom.com>,
"Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>,
"Goutham, Sunil Kovvuri" <sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>, Geetha sowjanya <gakula@...vell.com>,
Jerin Jacob <jerinj@...vell.com>, hariprasad <hkelam@...vell.com>,
Subbaraya Sundeep <sbhatta@...vell.com>, Tariq Toukan <tariqt@...dia.com>,
Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>,
Mark Bloch <mbloch@...dia.com>, Ido Schimmel <idosch@...dia.com>,
Petr Machata <petrm@...dia.com>, Manish Chopra <manishc@...vell.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Siddharth Vadapalli <s-vadapalli@...com>, Roger Quadros <rogerq@...nel.org>,
Loic Poulain <loic.poulain@....qualcomm.com>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
Johannes Berg <johannes@...solutions.net>,
Vladimir Oltean <olteanv@...il.com>,
Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
"Ertman, David M" <david.m.ertman@...el.com>,
Vlad Dumitrescu <vdumitrescu@...dia.com>,
"Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Alexander Sverdlin <alexander.sverdlin@...il.com>,
Lorenzo Bianconi <lorenzo@...nel.org>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH net-next v4 3/6] devlink: support default values for
param-get and param-set
On 11/18/25 2:27 AM, Loktionov, Aleksandr wrote:
>> diff --git a/include/uapi/linux/devlink.h
>> b/include/uapi/linux/devlink.h index 157f11d3fb72..e7d6b6d13470 100644
>> --- a/include/uapi/linux/devlink.h
>> +++ b/include/uapi/linux/devlink.h
>> @@ -639,6 +639,9 @@ enum devlink_attr {
>>
>> DEVLINK_ATTR_HEALTH_REPORTER_BURST_PERIOD, /* u64 */
>>
>> + DEVLINK_ATTR_PARAM_VALUE_DEFAULT, /* dynamic */
>> + DEVLINK_ATTR_PARAM_RESET_DEFAULT, /* flag */
>> +
> The patch introduces a new UAPI attribute DEVLINK_ATTR_PARAM_VALUE_DEFAULT but Documentation/netlink/specs/devlink.yaml only documents param-reset-default.
> The spec should also describe the output attribute that appears in the nested param-value dump ("default" value), otherwise the generated tooling/specs are out of sync with UAPI and the committed generated C (netlink_gen.c).
>
> I'm afraid you forgot to add a YAML entry for the nested attribute (e.g. under the param-value attribute set, typically alongside param-value-data and param-value-cmode), describing its type per param and the bool/u8 encoding rule covered in the commit message.
> Am I right?
Hello. Thank you for the review.
As I understand it, devlink.yaml omits entries of enum devlink_attr that
are annotated as "dynamic". This is what creates two of the holes in the
devlink attribute set in devlink.yaml where the "TODO: fill in the
attributes in between" comments appear. Dynamic types are basically
tagged unions, where the tag is held by a different attribute:
DEVLINK_ATTR_PARAM_TYPE. The netlink yaml schema doesn't have a good way
to encode this. That is why param-value-data, and now
param-value-default cannot be in devlink.yaml. The best that could be
done for now would probably be to add them with 'type: binary'.
Powered by blists - more mailing lists