netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/8] devlink: support direct read from region
@ 2022-11-17 22:07 Jacob Keller
  2022-11-17 22:07 ` [PATCH net-next 1/8] devlink: find snapshot in devlink_nl_cmd_region_read_dumpit Jacob Keller
                   ` (8 more replies)
  0 siblings, 9 replies; 26+ messages in thread
From: Jacob Keller @ 2022-11-17 22:07 UTC (permalink / raw)
  To: netdev; +Cc: Jacob Keller, Jiri Pirko, Jakub Kicinski

A long time ago when initially implementing devlink regions in ice I
proposed the ability to allow reading from a region without taking a
snapshot [1]. I eventually dropped this work from the original series due to
size. Then I eventually lost track of submitting this follow up.

This can be useful when interacting with some region that has some
definitive "contents" from which snapshots are made. For example the ice
driver has regions representing the contents of the device flash.

If userspace wants to read the contents today, it must first take a snapshot
and then read from that snapshot. This makes sense if you want to read a
large portion of data or you want to be sure reads are consistently from the
same recording of the flash.

However if user space only wants to read a small chunk, it must first
generate a snapshot of the entire contents, perform a read from the
snapshot, and then delete the snapshot after reading.

For such a use case, a direct read from the region makes more sense. This
can be achieved by allowing the devlink region read command to work without
a snapshot. Instead the portion to be read can be forwarded directly to the
driver via a new .read callback.

This avoids the need to read the entire region contents into memory first
and avoids the software overhead of creating a snapshot and then deleting
it.

This series implements such behavior and hooks up the ice NVM and shadow RAM
regions to allow it.

[1] https://lore.kernel.org/netdev/20200130225913.1671982-1-jacob.e.keller@intel.com/

Cc: Jiri Pirko <jiri@nvidia.com>
Cc: Jakub Kicinski <kuba@kernel.org>

Jacob Keller (8):
  devlink: find snapshot in devlink_nl_cmd_region_read_dumpit
  devlink: use min_t to calculate data_size
  devlink: report extended error message in region_read_dumpit
  devlink: remove unnecessary parameter from chunk_fill function
  devlink: refactor region_read_snapshot_fill to use a callback function
  devlink: support directly reading from region memory
  ice: use same function to snapshot both NVM and Shadow RAM
  ice: implement direct read for NVM and Shadow RAM regions

 .../networking/devlink/devlink-region.rst     |   8 ++
 drivers/net/ethernet/intel/ice/ice_devlink.c  | 112 +++++++++-------
 include/net/devlink.h                         |  16 +++
 net/core/devlink.c                            | 121 +++++++++++++-----
 4 files changed, 180 insertions(+), 77 deletions(-)


base-commit: b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7
-- 
2.38.1.420.g319605f8f00e


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2022-11-23 20:52 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-17 22:07 [PATCH net-next 0/8] devlink: support direct read from region Jacob Keller
2022-11-17 22:07 ` [PATCH net-next 1/8] devlink: find snapshot in devlink_nl_cmd_region_read_dumpit Jacob Keller
2022-11-17 22:07 ` [PATCH net-next 2/8] devlink: use min_t to calculate data_size Jacob Keller
2022-11-19  1:36   ` Jakub Kicinski
2022-11-21 17:51     ` Jacob Keller
2022-11-21 18:35       ` Jacob Keller
2022-11-21 19:06         ` Jakub Kicinski
2022-11-21 21:16           ` Jacob Keller
2022-11-17 22:07 ` [PATCH net-next 3/8] devlink: report extended error message in region_read_dumpit Jacob Keller
2022-11-19  1:40   ` Jakub Kicinski
2022-11-21 17:53     ` Jacob Keller
2022-11-21 19:10     ` Jacob Keller
2022-11-21 19:23       ` Jakub Kicinski
2022-11-21 21:18         ` Jacob Keller
2022-11-22  4:07           ` Jakub Kicinski
2022-11-17 22:07 ` [PATCH net-next 4/8] devlink: remove unnecessary parameter from chunk_fill function Jacob Keller
2022-11-17 22:08 ` [PATCH net-next 5/8] devlink: refactor region_read_snapshot_fill to use a callback function Jacob Keller
2022-11-19  1:31   ` Jakub Kicinski
2022-11-19  1:48   ` Jakub Kicinski
2022-11-21 17:55     ` Jacob Keller
2022-11-17 22:08 ` [PATCH net-next 6/8] devlink: support directly reading from region memory Jacob Keller
2022-11-19  1:49   ` Jakub Kicinski
2022-11-23 19:20     ` Jacob Keller
2022-11-17 22:08 ` [PATCH net-next 7/8] ice: use same function to snapshot both NVM and Shadow RAM Jacob Keller
2022-11-17 22:08 ` [PATCH net-next 8/8] ice: implement direct read for NVM and Shadow RAM regions Jacob Keller
2022-11-23 20:51 ` [PATCH net-next 0/8] devlink: support direct read from region Jacob Keller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).