Netdev List
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: sashiko-reviews@lists.linux.dev
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next v9 3/6] net: airoha: Support multiple net_devices for a single FE GDM port
Date: Thu, 4 Jun 2026 10:33:23 +0200	[thread overview]
Message-ID: <aiE4U_HOgBpuRZOm@lore-desk> (raw)
In-Reply-To: <20260604060125.5B5A11F00898@smtp.kernel.org>

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

[...]
> 
> Are there similar issues with the ingress configuration?  Earlier in
> airoha_dev_open(), REG_GDM_INGRESS_CFG(port->id) is modified based on whether
> the specific netdev uses DSA:
> 
> 	if (netdev_uses_dsa(netdev))
> 		airoha_fe_set(qdma->eth, REG_GDM_INGRESS_CFG(port->id),
> 			      GDM_STAG_EN_MASK);
> 	else
> 		airoha_fe_clear(qdma->eth, REG_GDM_INGRESS_CFG(port->id),
> 				GDM_STAG_EN_MASK);

This is not a real issue since just GDM1 can be used as cpu port of the dsa
switch (MT7630) and we do not support multiple net_devices for GDM1.

> 
> Also, do airoha_dev_stop() and airoha_dev_change_mtu() have similar
> regressions?  They appear to blindly overwrite shared registers like
> REG_GDM_FWD_CFG (setting it to FE_PSE_PORT_DROP) and REG_GDM_LEN_CFG(port->id).
> 
> I noticed the stop() and MTU issues might be fixed in a subsequent patch, but
> should this intermediate patch be self-contained to avoid breaking
> bisectability?

These issues are addressed in subsequent patches on the same series.

> 
> [ ... ]
> > @@ -3080,15 +3100,51 @@ static int airoha_alloc_gdm_port(struct airoha_eth *eth,
> >  	u64_stats_init(&port->stats.syncp);
> >  	spin_lock_init(&port->stats.lock);
> >  	port->id = id;
> > -	/* XXX: Read nbq from DTS */
> > -	port->nbq = id == AIROHA_GDM3_IDX && airoha_is_7581(eth) ? 4 : 0;
> >  	eth->ports[p] = port;
> >  
> >  	err = airoha_metadata_dst_alloc(port);
> >  	if (err)
> >  		return err;
> >  
> > -	return airoha_alloc_gdm_device(eth, port, np);
> > +	/* Default nbq value to ensure backward compatibility */
> > +	nbq = id == AIROHA_GDM3_IDX && airoha_is_7581(eth) ? 4 : 0;
> > +
> > +	for_each_child_of_node(np, node) {
> > +		/* Multiple external serdes connected to the FE GDM port via an
> > +		 * external arbiter.
> > +		 */
> > +		const __be32 *nbq_ptr;
> 
> [Severity: Medium]
> Will these multiplexed devices report duplicated, incorrect hardware statistics?

hw statistics will be addressed with a dedicated patch not part of the series.

Regards,
Lorenzo

> 
> When userspace queries statistics for any single multiplexed device,
> airoha_dev_get_stats64() fetches from port->stats, which is updated by
> airoha_update_hw_stats() reading the clear-on-read MAC hardware counters for
> the entire physical GDM port.
> 
> Since the port->stats structure is shared across all net_devices attached to
> the port, each device will report the total traffic volume of all devices
> sharing the port rather than its own traffic.
> 
> Should the driver rely on per-queue software counters to provide accurate
> per-device statistics when hardware MACs are multiplexed?
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/20260603-airoha-eth-multi-serdes-v9-0-5d476bc2f426@kernel.org?part=3

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

  parent reply	other threads:[~2026-06-04  8:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  6:00 [PATCH net-next v9 0/6] net: airoha: Support multiple net_devices connected to the same GDM port Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 1/6] dt-bindings: net: airoha: Add GDM port ethernet child node Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 2/6] net: airoha: Remove private net_device pointer in airoha_gdm_dev struct Lorenzo Bianconi
     [not found]   ` <20260604060124.ACAD11F00893@smtp.kernel.org>
2026-06-04  7:50     ` Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 3/6] net: airoha: Support multiple net_devices for a single FE GDM port Lorenzo Bianconi
     [not found]   ` <20260604060125.5B5A11F00898@smtp.kernel.org>
2026-06-04  8:33     ` Lorenzo Bianconi [this message]
2026-06-04  8:41   ` Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 4/6] net: airoha: Do not stop GDM port if it is shared Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 5/6] net: airoha: Introduce WAN device flag Lorenzo Bianconi
2026-06-03  6:00 ` [PATCH net-next v9 6/6] net: airoha: Support multiple LAN/WAN interfaces for hw MAC address configuration Lorenzo Bianconi
     [not found]   ` <20260604060126.0DF2B1F00899@smtp.kernel.org>
2026-06-04  9:03     ` Lorenzo Bianconi
2026-06-04  9:20   ` 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=aiE4U_HOgBpuRZOm@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.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