Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jens Emil Schulz Østergaard" <jensemil.schulzostergaard@microchip.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v8 4/9] net: dsa: lan9645x: add basic dsa driver for LAN9645X
Date: Fri, 03 Jul 2026 06:46:36 +0000	[thread overview]
Message-ID: <20260703064637.2367C1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260702-dsa_lan9645x_switch_driver_base-v8-4-90228d8bba58@microchip.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [High] Traffic from standalone ports is completely dropped in the dataplane, preventing any network communication.
- [Medium] The tail-drop watermark (SYS_ATOP) for the internal CPU port is left uninitialized, preventing CPU frame injection from using shared buffer memory.
- [Low] Redundant identical register modification in the CPU port initialization sequence.
--

Note: The format of this review is altered due to automated recitation policy
restrictions. No original patch code is quoted directly, and the review is
provided as a free-form summary of findings.

commit 6d3e640051eacab0f47d2250812bfddc2bc0f9e8
Author: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
Subject: net: dsa: lan9645x: add basic dsa driver for LAN9645X

This commit adds the base data switch architecture driver for the lan9645x
switch. It sets up the port modules, internal phy connections, queue systems,
and phylink integration for mac side configuration.

[Severity: High]
Will traffic from standalone ports be completely dropped in the dataplane?

In drivers/net/dsa/microchip/lan9645x/lan9645x_main.c within lan9645x_setup(),
the source port masks are initialized to zero. For standalone ports, this
mask is never updated to include any destinations when
lan9645x_update_fwd_mask() is called. Since unknown traffic is flooded to the
unicast destination mask which excludes the cpu port module, and the source
mask prevents forwarding to any port, does this mean all normal traffic
received on standalone ports will be dropped instead of reaching the cpu?

[Severity: Medium]
Does this iteration miss the internal cpu port module?

In drivers/net/dsa/microchip/lan9645x/lan9645x_port.c during
lan9645x_port_set_tail_drop_wm(), the code uses
dsa_switch_for_each_available_port() to configure the tail-drop watermarks.
This iterator limits initialization to the physical front ports, leaving the
internal cpu port module uninitialized at zero. If the cpu injects a frame
that exceeds its reserved buffer allowance, will it be immediately dropped by
the ingress tail dropper because its watermark is zero?

[Severity: Low]
This isn't a bug, but is there a redundant register modification here?

In drivers/net/dsa/microchip/lan9645x/lan9645x_port.c during
lan9645x_port_cpu_init(), the code modifies the injection gap size to zero.
Two statements later, after setting the injection group configuration, the
exact same gap size modification is executed again. Can this second redundant
bus transaction be removed?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-dsa_lan9645x_switch_driver_base-v8-0-90228d8bba58@microchip.com?part=4

  reply	other threads:[~2026-07-03  6:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02  6:45 [PATCH net-next v8 0/9] net: dsa: add DSA support for the LAN9645x switch chip family Jens Emil Schulz Østergaard
2026-07-02  6:45 ` [PATCH net-next v8 1/9] net: dsa: add tag driver for LAN9645X Jens Emil Schulz Østergaard
2026-07-03  6:46   ` sashiko-bot
2026-07-02  6:45 ` [PATCH net-next v8 2/9] dt-bindings: net: lan9645x: add LAN9645X switch bindings Jens Emil Schulz Østergaard
2026-07-03  6:46   ` sashiko-bot
2026-07-02  6:45 ` [PATCH net-next v8 3/9] net: dsa: lan9645x: add autogenerated register macros Jens Emil Schulz Østergaard
2026-07-02  6:45 ` [PATCH net-next v8 4/9] net: dsa: lan9645x: add basic dsa driver for LAN9645X Jens Emil Schulz Østergaard
2026-07-03  6:46   ` sashiko-bot [this message]
2026-07-02  6:45 ` [PATCH net-next v8 5/9] net: dsa: lan9645x: add bridge support Jens Emil Schulz Østergaard
2026-07-03  6:46   ` sashiko-bot
2026-07-02  6:45 ` [PATCH net-next v8 6/9] net: dsa: lan9645x: add vlan support Jens Emil Schulz Østergaard
2026-07-02  6:45 ` [PATCH net-next v8 7/9] net: dsa: lan9645x: add mac table integration Jens Emil Schulz Østergaard
2026-07-02  6:45 ` [PATCH net-next v8 8/9] net: dsa: lan9645x: add mdb management Jens Emil Schulz Østergaard
2026-07-02  6:45 ` [PATCH net-next v8 9/9] net: dsa: lan9645x: add port statistics Jens Emil Schulz Østergaard
2026-07-03  6:46   ` sashiko-bot

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=20260703064637.2367C1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jensemil.schulzostergaard@microchip.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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