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] [day] [month] [year] [list]
Date:   Tue, 14 Jul 2020 08:18:57 +0200
From:   Kurt Kanzenbach <kurt@...utronix.de>
To:     Rob Herring <robh@...nel.org>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        netdev <netdev@...r.kernel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v1 1/1] dt-bindings: net: dsa: Add DSA yaml binding

Hi Rob,

On Mon Jul 13 2020, Rob Herring wrote:
> On Sat, Jul 11, 2020 at 5:59 AM Kurt Kanzenbach <kurt@...utronix.de> wrote:
>> How?
>
> I don't know, just call it 'ethernet switch' binding or something.

OK.

>> Yes, it's a conversion of the dsa.txt. I should have stated that more
>> clearly. I didn't remove the .txt file, because it's referenced in all
>> the different switch bindings such as b53.txt, ksz.txt and so on. How to
>> handle that?
>
> Either update them if not many, or make dsa.txt just point to dsa.yaml
> as Andrew mentioned. I haven't looked, but seems like this would be a
> small number.

OK.

>
> Updating all the users to schema is also welcome. :)
>
>> Just to be sure. Instead of
>>
>>   ports {
>>     port@1 {
>>       ...
>>     }
>>   }
>>
>> The following should be possible as well?
>>
>>   ethernet-ports {
>>     port@1 {
>
> Yes, but probably 'ethernet-port@1' here. Or both can be allowed.

I think both should be allowed. No binding is using
ethernet-port. They're all using ethernet-ports and port within
(example: ti,cpsw-switch.yaml).

But, if the binding does allow for ethernet-ports, then the DSA core has
to be adjusted, or? The current code searches only for "ports" (in
dsa_switch_parse_ports_of()).

>
>>       ...
>>     }
>>   }
>>
>> Is there an easy way to add that alternative to the schema? Or does the
>> ethernet-ports property has to be defined as well?
>
> You need a pattern like:
>
> patternProperties:
>   "^(ethernet-)?ports$":
>     ...

I see. Thanks!

>
> You could also make one property a $ref to another, but I prefer the
> above.

That's what I wanted to avoid.

Thanks,
Kurt

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ