public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Benjamin Larsson <benjamin.larsson@genexis.eu>
Cc: Jakub Kicinski <kuba@kernel.org>,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, ansuelsmth@gmail.com,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v3 04/12] net: airoha: Rely on net_device pointer in HTB callbacks
Date: Fri, 10 Apr 2026 13:52:54 +0200	[thread overview]
Message-ID: <adjklonQX0q7ghZD@lore-desk> (raw)
In-Reply-To: <bd486b55-a8d7-4811-965a-aa1f3dc98e30@genexis.eu>

[-- Attachment #1: Type: text/plain, Size: 2378 bytes --]

> On 10/04/2026 04:57, Jakub Kicinski wrote:
> > This is an AI-generated review of your patch. The human sending this
> > email says "For your consideration."
> > ---
> > net: airoha: Introduce WAN device flag
> > 
> > This commit introduces a WAN flag to specify whether a device is used to
> > transmit or receive WAN or LAN traffic. It enables specifying multiple LAN
> > devices but limits the configuration to a single WAN device.
> > 
> 
> [...]
> 
> > > +		fallthrough;
> > > +	}
> > > +	case AIROHA_GDM2_IDX:
> > > +		/* GDM2 is always used as wan */
> > > +		dev->flags |= PRIV_FLAG_WAN;
> > >   		break;
> > >   	default:
> > >   		break;
> > >   	}
> > > -	for (i = 0; i < eth->soc->num_ppe; i++)
> > > -		airoha_ppe_set_cpu_port(dev, i, airoha_get_fe_port(dev));
> > > +	airoha_dev_set_qdma(dev);
> > > +	airoha_set_macaddr(dev, netdev->dev_addr);
> > 
> > Since the commit message notes it is possible to specify multiple LAN
> > devices, does unconditionally calling airoha_set_macaddr() for each
> > device overwrite the single shared hardware LAN MAC register?
> > 
> > If so, could this cause only the last initialized LAN device to have its MAC
> > correctly programmed into the hardware, leading to dropped unicast
> > packets for the other LAN interfaces?
> > 
> > > +
> > > +	if (!airoha_is_lan_gdm_dev(dev) &&
> > > +	    (port->id == AIROHA_GDM3_IDX || port->id == AIROHA_GDM4_IDX)) {
> > > +		int err;
> > 
> > [ ... ]
> 
> Hi, the frame engine can be configured with a range of wan mac addresses and
> a range of lan mac addresses via registers that set the top 24 bits and then
> 2 registers that form a range of the low 24 bits.
> 
> Documentation says that packets that fall into this mac address range either
> on the lan side or the wan side are to be treated as layer 3 packages and if
> a packet is not then it will be handled as a layer 2 packet.
> 
> The exact implication of this and if it actually matters is unknown. But
> traffic that comes in on an interface that is not matched by an acceleration
> flow is usually forwarded to the cpu for further processing.

The assumption here is the mac addresses are read from the SNAND or eMMC and
they all share the upper bits. I will fix the issue with a separated patch for
net tree.

Regards,
Lorenzo

> 
> MvH
> Benjamin Larsson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-04-10 11:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-06 10:34 [PATCH net-next v3 00/12] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 01/12] dt-bindings: net: airoha: Add EN7581 ethernet-ports properties Lorenzo Bianconi
2026-04-10  2:57   ` Jakub Kicinski
2026-04-10 13:14     ` Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 02/12] net: airoha: Set PPE cpu port for GDM2 if loopback is enabled Lorenzo Bianconi
2026-04-10  2:57   ` Jakub Kicinski
2026-04-10 12:52     ` Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 03/12] net: airoha: Rely on net_device pointer in airoha_dev_setup_tc_block signature Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 04/12] net: airoha: Rely on net_device pointer in HTB callbacks Lorenzo Bianconi
2026-04-10  2:57   ` Jakub Kicinski
2026-04-10 11:29     ` Benjamin Larsson
2026-04-10 11:52       ` Lorenzo Bianconi [this message]
2026-04-10 11:51     ` Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 05/12] net: airoha: Rely on net_device pointer in ETS callbacks Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 06/12] net: airoha: Introduce airoha_gdm_dev struct Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 07/12] net: airoha: Move airoha_qdma pointer in " Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 08/12] net: airoha: Rely on airoha_gdm_dev pointer in airhoa_is_lan_gdm_port() Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 09/12] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
2026-04-10  2:57   ` Jakub Kicinski
2026-04-10 10:19     ` Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 10/12] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-04-10  2:57   ` Jakub Kicinski
2026-04-10 10:35     ` Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 11/12] net: airoha: Introduce WAN device flag Lorenzo Bianconi
2026-04-06 10:34 ` [PATCH net-next v3 12/12] net: airoha: Rename get_src_port_id callback in get_sport Lorenzo Bianconi
2026-04-10  2:56 ` [PATCH net-next v3 00/12] net: airoha: Support multiple net_devices connected to the same GDM port Jakub Kicinski
2026-04-10 10:39   ` Lorenzo Bianconi
2026-04-10  2:59 ` Jakub Kicinski
2026-04-10  7:37   ` Lorenzo Bianconi

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=adjklonQX0q7ghZD@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --cc=benjamin.larsson@genexis.eu \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    /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