lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 24 Oct 2023 16:08:31 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: davem@...emloft.net, Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Jakub Kicinski <kuba@...nel.org>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	devicetree@...r.kernel.org, thomas.petazzoni@...tlin.com,
	Florian Fainelli <f.fainelli@...il.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	linux-arm-kernel@...ts.infradead.org,
	Vladimir Oltean <vladimir.oltean@....com>,
	Luka Perkov <luka.perkov@...tura.hr>,
	Robert Marko <robert.marko@...tura.hr>,
	Andy Gross <agross@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konrad.dybcio@...ainline.org>,
	Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next 3/5] net: ipqess: introduce the Qualcomm IPQESS
 driver

> > > +	for (c = 0; c < priv->info->mib_count; c++) {
> > > +		mib = &ar8327_mib[c];
> > > +		reg = QCA8K_PORT_MIB_COUNTER(port->index) + mib->offset;
> > > +
> > > +		ret = qca8k_read(priv, reg, &val);
> > > +		if (ret < 0)
> > > +			continue;
> > 
> > Given the switch is built in, is this fast? The 8k driver avoids doing
> > register reads for this.
> 
> Sorry, I don't quite understand what you mean. Are you referring to the existing 
> QCA8k DSA driver? From what I've seen, it calls qca8k_get_ethtool_stats defined 
> in qca8k-common.c and this uses the same register read.

It should actually build an Ethernet frame containing a command to get
most of the statistics in one operation. That frame is sent to the
switch over the SoCs ethernet interface. The switch replies with a
frame containing the statistics. This should be faster than doing lots
of register reads over a slow MDIO bus.

Now, given that this switch is built into the SoC, i assume the MDIO
bus is gone, so register access is fast. So you don't need to use
Ethernet frames.

	 Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ