From: Jiri Pirko <jiri@resnulli.us>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, davem@davemloft.net,
edumazet@google.com
Subject: Re: [patch net-next] tools: ynl-gen: lift type requirement for attribute subsets
Date: Fri, 29 Sep 2023 13:18:25 +0200 [thread overview]
Message-ID: <ZRaygRMJTnQ1H8+1@nanopsycho> (raw)
In-Reply-To: <ffeeac4ea45e5a087aab44ac137a945111d941e7.camel@redhat.com>
Thu, Sep 28, 2023 at 12:15:22PM CEST, pabeni@redhat.com wrote:
>On Tue, 2023-09-19 at 16:21 +0200, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>>
>> In case an attribute is used in a subset, the type has to be currently
>> specified. As the attribute is already defined in the original set, this
>> is a redundant information in yaml file, moreover, may lead to
>> inconsistencies.
>>
>> Example:
>> attribute-sets:
>> ...
>> name: pin
>> enum-name: dpll_a_pin
>> attributes:
>> ...
>> -
>> name: parent-id
>> type: u32
>> ...
>> -
>> name: pin-parent-device
>> subset-of: pin
>> attributes:
>> -
>> name: parent-id
>> type: u32 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>> Remove the requirement from schema files to specify the "type" and add
>> check and bail out if "type" is not set.
>>
>> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>
>What about updating accordingly the existing specs? They are used as
>references, I think it would be better if the info there would be
>consistent.
Okay, will check that out. I will try to update some.
>
>I think the tool still allows writing something alike:
>
> attributes:
> ...
> -
> name: parent-id
> type: u32
> ...
> -
> name: pin-parent-device
> subset-of: pin
> attributes:
> -
> name: parent-id
> type: string
>
>(mismatching types). What about adding an explicit test to prevent
>specifying again the types for already defined attributes?
Good point. Will check.
>
>Cheers,
>
>Paolo
>
prev parent reply other threads:[~2023-09-29 11:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-19 14:21 [patch net-next] tools: ynl-gen: lift type requirement for attribute subsets Jiri Pirko
2023-09-28 10:15 ` Paolo Abeni
2023-09-29 11:18 ` Jiri Pirko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZRaygRMJTnQ1H8+1@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox