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: <20221109233008.bsu2zl4bixsz44mi@skbuf>
Date:   Thu, 10 Nov 2022 01:30:08 +0200
From:   Vladimir Oltean <olteanv@...il.com>
To:     Colin Foster <colin.foster@...advantage.com>
Cc:     linux-mediatek@...ts.infradead.org,
        linux-arm-kernel@...ts.infradead.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
        Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Claudiu Manoil <claudiu.manoil@....com>,
        John Crispin <john@...ozen.org>,
        Sean Wang <sean.wang@...iatek.com>,
        DENG Qingfang <dqfext@...il.com>,
        Landen Chao <Landen.Chao@...iatek.com>,
        nç ÜNAL <arinc.unal@...nc9.com>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Paolo Abeni <pabeni@...hat.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        "David S. Miller" <davem@...emloft.net>,
        Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v2 net-next 4/6] dt-bindings: net: add generic
 ethernet-switch

On Thu, Nov 03, 2022 at 09:52:02PM -0700, Colin Foster wrote:
> diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> new file mode 100644
> index 000000000000..fbaac536673d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml
> @@ -0,0 +1,49 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/ethernet-switch.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Ethernet Switch Device Tree Bindings

I vaguely remember Krzysztof saying during other reviews that "Device
Tree Bindings" in the title is superfluous. Suggest: "Generic Ethernet
Switch".

> +
> +maintainers:
> +  - Andrew Lunn <andrew@...n.ch>
> +  - Florian Fainelli <f.fainelli@...il.com>
> +  - Vivien Didelot <vivien.didelot@...il.com>
> +
> +description:
> +  This binding represents Ethernet Switches which have a dedicated CPU
> +  port. That port is usually connected to an Ethernet Controller of the
> +  SoC. Such setups are typical for embedded devices.

This description was taken from the DSA switch schema and not adapted
for the generic Ethernet switch schema.

Suggest instead:

  Ethernet switches are multi-port Ethernet controllers. Each port has
  its own number and is represented as its own Ethernet controller.
  The minimum required functionality is to pass packets to software.
  They may or may not be able to forward packets autonomously between
  ports.

(this should also clarify if it's okay to reference ethernet-switch.yaml
from drivers which don't speak switchdev, which I believe it is).

(my suggestion is open to further comments for improvement)

> +
> +select: false
> +
> +properties:
> +  $nodename:
> +    pattern: "^(ethernet-)?switch(@.*)?$"
> +
> +patternProperties:
> +  "^(ethernet-)?ports$":
> +    type: object
> +    properties:
> +      '#address-cells':
> +        const: 1
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +      "^(ethernet-)?port@[0-9]+$":
> +        type: object
> +        description: Ethernet switch ports
> +
> +        $ref: /schemas/net/dsa/dsa-port.yaml#

I wonder if you actually meant dsa-port.yaml and not ethernet-controller.yaml?

> +
> +oneOf:
> +  - required:
> +      - ports
> +  - required:
> +      - ethernet-ports
> +
> +additionalProperties: true
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 3106a9f0567a..3b6c3989c419 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -14326,6 +14326,7 @@ M:	Florian Fainelli <f.fainelli@...il.com>
>  M:	Vladimir Oltean <olteanv@...il.com>
>  S:	Maintained
>  F:	Documentation/devicetree/bindings/net/dsa/
> +F:	Documentation/devicetree/bindings/net/ethernet-switch.yaml
>  F:	drivers/net/dsa/
>  F:	include/linux/dsa/
>  F:	include/linux/platform_data/dsa.h
> -- 
> 2.25.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ