From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: sashiko-reviews@lists.linux.dev, robh@kernel.org,
devicetree@vger.kernel.org, conor+dt@kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next v8 10/10] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration
Date: Sat, 23 May 2026 10:23:55 +0200 [thread overview]
Message-ID: <ahFkG32jFRJ7W_cv@lore-desk> (raw)
In-Reply-To: <20260522165820.04839729@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
On May 22, Jakub Kicinski wrote:
> On Fri, 22 May 2026 21:25:37 +0200 Lorenzo Bianconi wrote:
> > - What happens when device tree does not provide MAC addresses for two or
> > more same-side GDM interfaces?
> > - This is the same comment reported in [0].
> > Since the hw exposes just a single register (REG_FE_LAN_MAC_H or
> > REG_FE_WAN_MAC_H) for the LAN/WAN mac address MSBs, we need to
> > require all the interfaces configured as LAN or WAN to share the
> > mac address MSBs and the user needs to select the new mac address
> > observing this limitation.
> > Please note this limitation is only valid if multiple net_devices
> > are configured as LAN (or WAN). Since in the current codebase we
> > do not support multiple interfaces configured as LAN or WAN, we are
> > not introducing any regression.
> > I do not think selecting a "base" for the mac address is helpful
> > if the user does not provide the mac address via the DTS or NVME
> > (as suggested by sashiko) since it will not help us if the mac
> > addresses configured via DTS are "wrong" (if they do not respect
> > the limitation described above). What do you think?
>
> If the MACs are not provided something is obviously wrong with the
> device. We should try to provide enough functionality for the user
> to be able to troubleshoot. For an AP perhaps that means SSH / remote
> logs? So switching/routing doesn't have to work, I'd think.
>
> Will the user be able to log in when REG_FE_LAN_MAC_H does not match
> the MAC of a port?
REG_FE_LAN_MAC_H and REG_FE_WAN_MAC_H regs are used by the FE module to
hw accelerate forwarded traffic and does not prevent the user to log into
the device even if they are set to a different values with respect to the
configured mac addresses (just hw acceleration will not work properly).
To prove it, I set to 0 REG_FE_WAN_MAC_H, REG_FE_WAN_MAC_LMIN and
REG_FE_WAN_MAC_LMAX and I still able to ping the device via the WAN
interface.
I guess the easiest solution is to neglect errors from airoha_set_macaddr()
in airoha_dev_init() (as it is in the current codebase) in order to allow
the device to probe successfully and provide a warning message to the user
regarding the mac address misconfiguration. What do you think?
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2026-05-23 8:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 8:57 [PATCH net-next v8 00/10] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 01/10] dt-bindings: net: airoha: Add GDM port ethernet child node Lorenzo Bianconi
2026-05-22 19:27 ` Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 02/10] net: airoha: Introduce airoha_gdm_dev struct Lorenzo Bianconi
2026-05-20 8:59 ` sashiko-bot
2026-05-20 12:25 ` Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 03/10] net: airoha: Move airoha_qdma pointer in " Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 04/10] net: airoha: Rely on airoha_gdm_dev pointer in airoha_is_lan_gdm_port() Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 05/10] net: airoha: Move qos_sq_bmap in airoha_gdm_dev struct Lorenzo Bianconi
2026-05-20 8:59 ` sashiko-bot
2026-05-20 12:24 ` Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 06/10] net: airoha: Move {cpu,fwd}_tx_packets " Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 07/10] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
2026-05-20 8:59 ` sashiko-bot
2026-05-20 12:28 ` Lorenzo Bianconi
2026-05-20 12:33 ` Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 08/10] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 09/10] net: airoha: Introduce WAN device flag Lorenzo Bianconi
2026-05-20 8:59 ` sashiko-bot
2026-05-20 12:46 ` Lorenzo Bianconi
2026-05-19 8:57 ` [PATCH net-next v8 10/10] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration Lorenzo Bianconi
2026-05-20 8:59 ` sashiko-bot
2026-05-20 12:49 ` Lorenzo Bianconi
2026-05-22 18:25 ` Jakub Kicinski
2026-05-22 19:25 ` Lorenzo Bianconi
2026-05-22 23:58 ` Jakub Kicinski
2026-05-23 8:23 ` Lorenzo Bianconi [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=ahFkG32jFRJ7W_cv@lore-desk \
--to=lorenzo@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--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