All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] devlink direct region reading
@ 2020-01-30 22:58 Jacob Keller
  2020-01-30 22:58 ` [PATCH 01/15] devlink: prepare to support region operations Jacob Keller
                   ` (19 more replies)
  0 siblings, 20 replies; 62+ messages in thread
From: Jacob Keller @ 2020-01-30 22:58 UTC (permalink / raw)
  To: netdev; +Cc: jiri, valex, linyunsheng, lihong.yang, Jacob Keller

As per the previous discussions about supporting devlink region snapshot
triggers and direct region writes, this is an RFC patch series to implement
these changes. I fully expect to need revisions to this series, and the ice
driver changes will need to go through the normal intel-wired-lan queue
process.

The final patches implement support for directly reading from a region
without a snapshot. In order to have context on how and why this is
implemented, the ice driver is modified to support devlink and expose a
region. The series can be broken down into multiple parts or stages, as
described below.

The first 4 patches modify devlink regions to support a new
devlink_region_ops structure, and then implement a new op for requesting
that the driver capture an immediate snapshot. Support for that is then
implemented in the netdevsim driver. This was previously discussed on the
list:

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

The only major change is to convert to using an operation in the
devlink_region_ops structure instead of passing the pointer as an argument
to devlink_region_create. This makes it easier for regions to support
additional operations in the future.

Following this section is 3 patches to the ice driver implementing a
function to easily read portions of the NVM contents as flat addressable
memory. The current .get_eeprom function is updated to support reading from
the entire NVM.

There is a patch to add devlinkm_alloc as a devres based managed allocation
for the devlink_alloc call.

Following this are 4 patches to implement basic devlink support for the ice
driver. This includes a simple .get_info handler.

Finally, the last 3 patches implement a new region in the ice driver for
accessing the shadow RAM. This region will support the immediate trigger
operation as well as a new read operation that enables directly reading from
the shadow RAM without a region.

I expect that this series is not yet ready to land and am sending it
primarily as a discussion point on the changes to the devlink core code. I
expect feedback and the need to change and improve the implementation.

It's likely that the actual submissions can be broken up into smaller
series, for example the basic ice devlink support going first followed by a
separate series for the region changes.

I've also submitted iproute2 patches for implementing the ability to request
snapshots and read from the region directly.

Jacob Keller (12):
  devlink: prepare to support region operations
  devlink: add functions to take snapshot while locked
  devlink: add operation to take an immediate snapshot
  netdevsim: support taking immediate snapshot via devlink
  ice: use __le16 types for explicitly Little Endian values
  ice: create function to read a section of the NVM and Shadow RAM
  ice: enable initial devlink support for function zero
  ice: add basic handler for devlink .info_get
  ice: add board identifier info to devlink .info_get
  ice: add a devlink region to dump shadow RAM contents
  devlink: support directly reading from region memory
  ice: support direct read of the shadow ram region

Jesse Brandeburg (1):
  ice: implement full NVM read from ETHTOOL_GEEPROM

 drivers/net/ethernet/intel/Kconfig            |   1 +
 drivers/net/ethernet/intel/ice/Makefile       |   1 +
 drivers/net/ethernet/intel/ice/ice.h          |   7 +
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   |   3 +
 drivers/net/ethernet/intel/ice/ice_common.c   |  61 +++
 drivers/net/ethernet/intel/ice/ice_common.h   |   5 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c  | 427 ++++++++++++++++++
 drivers/net/ethernet/intel/ice/ice_devlink.h  |  20 +
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |  37 +-
 drivers/net/ethernet/intel/ice/ice_main.c     |  22 +
 drivers/net/ethernet/intel/ice/ice_nvm.c      | 211 +++------
 drivers/net/ethernet/intel/ice/ice_nvm.h      |   7 +
 drivers/net/ethernet/intel/ice/ice_type.h     |   1 +
 drivers/net/ethernet/mellanox/mlx4/crdump.c   |  25 +-
 drivers/net/netdevsim/dev.c                   |  44 +-
 include/net/devlink.h                         |  28 +-
 include/uapi/linux/devlink.h                  |   2 +
 net/core/devlink.c                            | 246 +++++++---
 18 files changed, 918 insertions(+), 230 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ice/ice_devlink.c
 create mode 100644 drivers/net/ethernet/intel/ice/ice_devlink.h

-- 
2.25.0.rc1


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

end of thread, other threads:[~2020-02-04 19:20 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 22:58 [RFC PATCH 00/13] devlink direct region reading Jacob Keller
2020-01-30 22:58 ` [PATCH 01/15] devlink: prepare to support region operations Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-02-03 11:35   ` Jiri Pirko
2020-02-03 16:48     ` Jacob Keller
2020-02-03 17:07     ` Jacob Keller
2020-02-03 17:10       ` Jacob Keller
2020-02-03 17:14     ` Jacob Keller
2020-02-03 17:17     ` Jacob Keller
2020-01-30 22:58 ` [PATCH 02/15] devlink: add functions to take snapshot while locked Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:09     ` Jacob Keller
2020-02-03 11:39   ` Jiri Pirko
2020-02-03 16:45     ` Jacob Keller
2020-01-30 22:58 ` [PATCH 03/15] devlink: add operation to take an immediate snapshot Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-02-03  8:19   ` Yunsheng Lin
2020-02-03 11:50     ` Jiri Pirko
2020-02-03 11:50   ` Jiri Pirko
2020-02-03 16:33     ` Jacob Keller
2020-02-03 19:32     ` Jacob Keller
2020-02-03 21:30       ` Jiri Pirko
2020-02-04 19:20         ` Jacob Keller
2020-01-30 22:58 ` [PATCH 04/15] netdevsim: support taking immediate snapshot via devlink Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:12     ` Jacob Keller
2020-01-30 22:59 ` [PATCH 05/15] ice: use __le16 types for explicitly Little Endian values Jacob Keller
2020-01-30 22:59 ` [PATCH 06/15] ice: create function to read a section of the NVM and Shadow RAM Jacob Keller
2020-01-30 22:59 ` [PATCH 07/15] ice: implement full NVM read from ETHTOOL_GEEPROM Jacob Keller
2020-01-30 22:59 ` [PATCH 08/15] devlink: add devres managed devlinkm_alloc and devlinkm_free Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:16     ` Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-02-01  0:51     ` Jacob Keller
2020-02-01 17:43       ` Jakub Kicinski
2020-02-03 16:35         ` Jacob Keller
2020-02-03 11:29   ` Jiri Pirko
2020-02-03 16:56     ` Jacob Keller
2020-01-30 22:59 ` [PATCH 09/15] ice: enable initial devlink support Jacob Keller
2020-01-30 22:59 ` [PATCH 10/15] ice: add basic handler for devlink .info_get Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:25     ` Jacob Keller
2020-01-30 22:59 ` [PATCH 11/15] ice: add board identifier info to " Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:26     ` Jacob Keller
2020-01-30 22:59 ` [PATCH 12/15] ice: add a devlink region to dump shadow RAM contents Jacob Keller
2020-01-30 22:59 ` [PATCH 13/15] devlink: support directly reading from region memory Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:27     ` Jacob Keller
2020-01-31 19:15     ` Jacob Keller
2020-02-03 13:44   ` Jiri Pirko
2020-02-03 16:40     ` Jacob Keller
2020-01-30 22:59 ` [PATCH 14/15] ice: support direct read of the shadow ram region Jacob Keller
2020-01-30 22:59 ` [PATCH 15/15] ice: add ice.rst devlink documentation file Jacob Keller
2020-01-31 18:07   ` Jakub Kicinski
2020-01-31 18:28     ` Jacob Keller
2020-01-30 22:59 ` [RFC PATCH 1/3] Update kernel headers Jacob Keller
2020-01-30 22:59 ` [RFC PATCH 2/3] devlink: add support for DEVLINK_CMD_REGION_TAKE_SNAPSHOT Jacob Keller
2020-01-30 22:59 ` [RFC PATCH 3/3] devlink: stop requiring snapshot for regions Jacob Keller
2020-01-30 23:03 ` [RFC PATCH 00/13] devlink direct region reading Jacob Keller
2020-01-31 18:06 ` Jakub Kicinski
2020-01-31 18:09   ` Jacob Keller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.