]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: use bulk reads for stats
authorColin Foster <colin.foster@in-advantage.com>
Sun, 13 Feb 2022 19:12:54 +0000 (11:12 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Feb 2022 13:24:29 +0000 (13:24 +0000)
commit2e0ae55da5c830bc64f89df34519208ce382f11a
tree4530de8bf3ffd9692c9285a04b1db11feedaa0c9
parent594424685daa32c3ee7284c9f7e6015f9a1dba63
net: mscc: ocelot: use bulk reads for stats

Create and utilize bulk regmap reads instead of single access for gathering
stats. The background reading of statistics happens frequently, and over
a few contiguous memory regions.

High speed PCIe buses and MMIO access will probably see negligible
performance increase. Lower speed buses like SPI and I2C could see
significant performance increase, since the bus configuration and register
access times account for a large percentage of data transfer time.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c
include/soc/mscc/ocelot.h