mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Colin Foster <colin.foster@in-advantage.com>
To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	UNGLinuxDriver@microchip.com,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Claudiu Manoil <claudiu.manoil@nxp.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH v5 net-next 0/3] use bulk reads for ocelot statistics
Date: Mon,  7 Feb 2022 20:46:41 -0800	[thread overview]
Message-ID: <20220208044644.359951-1-colin.foster@in-advantage.com> (raw)

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.

v1 > v2: reword commit messages
v2 > v3: correctly mark this for net-next when sending
v3 > v4: calloc array instead of zalloc per review
v4 > v5:
    Apply CR suggestions for whitespace
    Fix calloc / zalloc mixup
    Properly destroy workqueues
    Add third commit to split long macros


Colin Foster (3):
  net: ocelot: align macros for consistency
  net: mscc: ocelot: add ability to perform bulk reads
  net: mscc: ocelot: use bulk reads for stats

 drivers/net/ethernet/mscc/ocelot.c    | 78 ++++++++++++++++++++++-----
 drivers/net/ethernet/mscc/ocelot_io.c | 13 +++++
 include/soc/mscc/ocelot.h             | 57 ++++++++++++++------
 3 files changed, 120 insertions(+), 28 deletions(-)

-- 
2.25.1


             reply	other threads:[~2022-02-08  5:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-08  4:46 Colin Foster [this message]
2022-02-08  4:46 ` [PATCH v5 net-next 1/3] net: ocelot: align macros for consistency Colin Foster
2022-02-08 13:06   ` Vladimir Oltean
2022-02-08  4:46 ` [PATCH v5 net-next 2/3] net: mscc: ocelot: add ability to perform bulk reads Colin Foster
2022-02-08 13:07   ` Vladimir Oltean
2022-02-08  4:46 ` [PATCH v5 net-next 3/3] net: mscc: ocelot: use bulk reads for stats Colin Foster
2022-02-08 13:18   ` Vladimir Oltean
2022-02-08 15:03   ` Vladimir Oltean
2022-02-08 15:34     ` Vladimir Oltean
2022-02-08 16:07       ` Colin Foster
2022-02-08 16:10         ` Vladimir Oltean
2022-02-08 15:41     ` Colin Foster
2022-02-08 15:45       ` Vladimir Oltean
2022-02-08 16:49         ` Colin Foster
2022-02-08 17:02           ` Vladimir Oltean
2022-02-08 13:30 ` [PATCH v5 net-next 0/3] use bulk reads for ocelot statistics Vladimir Oltean
2022-02-08 13:55   ` Colin Foster
2022-02-08 14:53     ` Vladimir Oltean

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=20220208044644.359951-1-colin.foster@in-advantage.com \
    --to=colin.foster@in-advantage.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.manoil@nxp.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /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

all inboxes | Powered by JetHome®