All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wei Fang" <wei.fang@nxp.com>
Cc: imx@lists.linux.dev, conor+dt@kernel.org, Frank.Li@kernel.org,
	krzk+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v6 net-next 02/15] dt-bindings: net: dsa: add NETC switch
Date: Sun, 10 May 2026 10:48:31 +0000	[thread overview]
Message-ID: <20260510104832.7061EC2BCB8@smtp.kernel.org> (raw)
In-Reply-To: <20260509102954.4116624-3-wei.fang@nxp.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Low] The `dsa,member` property lacks validation constraints for the switch index.
- [Low] The `patternProperties` regex for ethernet ports is overly restrictive and diverges from standard DSA bindings.
--

commit 8c698895982ff77d4bd027af7fa3d21f57f09eba
Author: Wei Fang <wei.fang@nxp.com>

dt-bindings: net: dsa: add NETC switch

This commit adds the device tree bindings for the NETC switch. It is a PCIe
function of the NETC IP that supports advanced QoS and TSN capabilities. The
switch connects to an internal ENETC port via a light-weight pseudo MAC.

> diff --git a/Documentation/devicetree/bindings/net/dsa/nxp,netc-switch.yaml b/Documentation/devicetree/bindings/net/dsa/nxp,netc-switch.yaml
> new file mode 100644
> index 0000000000000..988688bf4467d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/dsa/nxp,netc-switch.yaml

[ ... ]

> +  reg:
> +    maxItems: 1
> +
> +  dsa,member:
> +    description: >
> +      The property indicates DSA cluster and switch index. For NETC switch,
> +      the valid range of the switch index is 1 ~ 7, the index is reflected
> +      in the switch tag as an indication of the switch ID where the frame
> +      originated. The value 0 is reserved for ENETC VEPA switch, whose ID
> +      is hardwired to zero.

The description mentions that the valid range of the switch index is 1 to 7
and that 0 is reserved, but there do not appear to be any constraints
enforcing this restriction in the schema definition.

Should an items array constraint be added here with a minimum of 1 and
maximum of 7 for the second element to ensure invalid configurations like
<0 0> are caught during schema validation?

> +
> +  ethernet-ports:
> +    type: object
> +    patternProperties:
> +      "^ethernet-port@[0-9a-f]$":

Is this regex intentionally more restrictive than the standard DSA bindings?

The standard DSA schema in dsa.yaml allows ^(ethernet-)?port@[0-9a-f]+$.
Because this binding sets unevaluatedProperties to false for the
ethernet-ports node, if a device tree author uses the standard port@1
naming convention, the binding will reject it.

Additionally, the single hex digit restriction would prevent port numbers
from exceeding 15. Could this be aligned with the standard pattern?

> +        type: object
> +        $ref: dsa-port.yaml#

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260509102954.4116624-1-wei.fang@nxp.com?part=2

  reply	other threads:[~2026-05-10 10:48 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 10:29 [PATCH v6 net-next 00/15] Add preliminary NETC switch support for i.MX94 Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 01/15] dt-bindings: net: dsa: update the description of 'dsa,member' property Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 02/15] dt-bindings: net: dsa: add NETC switch Wei Fang
2026-05-10 10:48   ` sashiko-bot [this message]
2026-05-11  3:33     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 03/15] net: enetc: add pre-boot initialization for i.MX94 switch Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 04/15] net: enetc: add basic operations to the FDB table Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 05/15] net: enetc: add support for the "Add" operation to VLAN filter table Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  2:05     ` Wei Fang
2026-05-11  2:21       ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 06/15] net: enetc: add support for the "Update" operation to buffer pool table Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  2:01     ` Wei Fang
2026-05-11  2:22       ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 07/15] net: enetc: add support for "Add" and "Delete" operations to IPFT Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  2:11     ` Wei Fang
2026-05-11  2:21       ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 08/15] net: enetc: add multiple command BD rings support Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 09/15] net: dsa: add NETC switch tag support Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  2:18     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 10/15] net: dsa: netc: introduce NXP NETC switch driver for i.MX94 Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  7:17     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 11/15] net: dsa: netc: add phylink MAC operations Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  2:17     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 12/15] net: dsa: netc: add FDB, STP, MTU, port setup and host flooding support Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  3:14     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 13/15] net: dsa: netc: initialize buffer pool table and implement flow-control Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  3:16     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 14/15] net: dsa: netc: add support for the standardized counters Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  3:24     ` Wei Fang
2026-05-09 10:29 ` [PATCH v6 net-next 15/15] net: dsa: netc: add support for ethtool private statistics Wei Fang
2026-05-10 10:48   ` sashiko-bot
2026-05-11  3:26     ` Wei Fang
2026-05-12  6:00   ` Wei Fang

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=20260510104832.7061EC2BCB8@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Frank.Li@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@lists.linux.dev \
    --cc=wei.fang@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.