mbox series

[v1,net-next,0/2] use bulk reads for ocelot statistics

Message ID 20220110010618.428927-1-colin.foster@in-advantage.com (mailing list archive)
Headers show
Series use bulk reads for ocelot statistics | expand

Message

Colin Foster Jan. 10, 2022, 1:06 a.m. UTC
Ocelot loops over memory regions to gather stats on different ports.
These regions are mostly continuous, and are ordered. This patch set
uses that information to break the stats reads into regions that can get
read in bulk.

The motiviation is for general cleanup, but also for SPI. Performing two
back-to-back reads on a SPI bus require toggling the CS line, holding,
re-toggling the CS line, sending 3 address bytes, sending N padding
bytes, then actually performing the read. Bulk reads could reduce almost
all of that overhead, but require that the reads are performed via
regmap_bulk_read.

Colin Foster (2):
  net: mscc: ocelot: add ability to perform bulk reads
  net: mscc: ocelot: use bulk reads for stats

 drivers/net/ethernet/mscc/ocelot.c    | 76 ++++++++++++++++++++++-----
 drivers/net/ethernet/mscc/ocelot_io.c | 13 +++++
 include/soc/mscc/ocelot.h             | 12 +++++
 3 files changed, 88 insertions(+), 13 deletions(-)

Comments

Jakub Kicinski Jan. 12, 2022, 6:12 p.m. UTC | #1
On Sun,  9 Jan 2022 17:06:16 -0800 Colin Foster wrote:
> Ocelot loops over memory regions to gather stats on different ports.
> These regions are mostly continuous, and are ordered. This patch set
> uses that information to break the stats reads into regions that can get
> read in bulk.
> 
> The motiviation is for general cleanup, but also for SPI. Performing two
> back-to-back reads on a SPI bus require toggling the CS line, holding,
> re-toggling the CS line, sending 3 address bytes, sending N padding
> bytes, then actually performing the read. Bulk reads could reduce almost
> all of that overhead, but require that the reads are performed via
> regmap_bulk_read.

Looks like this missed our 5.17 PR, please repost in two weeks once the
merge window is open. You can check if net-next is open here:

http://vger.kernel.org/~davem/net-next.html