netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next 0/4] devlink flash update overwrite mask
@ 2020-07-30 23:20 Jacob Keller
  2020-07-30 23:20 ` [net-next 1/4] devlink: convert flash_update to use params structure Jacob Keller
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jacob Keller @ 2020-07-30 23:20 UTC (permalink / raw)
  To: netdev
  Cc: Jacob Keller, Jiri Pirko, Jakub Kicinski, Jonathan Corbet,
	Michael Chan, Bin Luo, Saeed Mahameed, Leon Romanovsky,
	Ido Schimmel, Danielle Ratson

This series introduces support for a new attribute to the flash update
command: DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK. This attribute is a u32
value that represents a bitmask of which subsections of flash to
request/allow overwriting when performing a flash update.

The intent is to support the ability to control overwriting options of the
ice hardware flash update. Specifically, the ice flash components combine
settings and identifiers within the firmware flash section. This series
introduces the two subsections, "identifiers" and "settings". With the new
attribute, users can request to overwrite these subsections when performing
a flash update. By existing convention, it is assumed that flash program
binaries are always updated (and thus overwritten), and no mask bit is
provided to control this.

I updated the .flash_update command to take a new parameters structure, and
pass the new overwrite mask through there. All existing drivers besides ice
and netdevsim are updated to always reject the overwrite mask. netdevsim
gains a new debugfs knob to set what overwrite values the flash update
command should accept. I added some simple tests to the devlink.sh test file
to help verify the interface works.

Patches to enable support for specifying the overwrite sections are also
provided for iproute2-next. This is done primarily in order to enable the
tests for netdevsim. As discussed previously on the list, the primary
motivations for the overwrite mode are two-fold.

First, supporting update with a customized image that has pre-configured
settings and identifiers, used with overwrite of both settings and
identifiers. This enables an initial update to overwrite default values and
customize the adapter with a new serial ID and fresh settings. Second, it
may sometimes be useful to allow overwriting of settings when updating in
order to guarantee that the settings in the flash section are "known good".

The first two patches are for net-next, and the latter two patches are for
iproute2-next. (Note I expect the first iproute2 patch to be replaced by the
usual update of headers after the new attribute is merged).

Cc: Jiri Pirko <jiri@mellanox.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Bin Luo <luobin9@huawei.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Cc: Leon Romanovsky <leon@kernel.org>
Cc: Ido Schimmel <idosch@mellanox.com>
Cc: Danielle Ratson <danieller@mellanox.com>

Jacob Keller (2):
  devlink: convert flash_update to use params structure
  devlink: introduce flash update overwrite mask

 .../networking/devlink/devlink-flash.rst      | 29 ++++++++++++++++
 Documentation/networking/devlink/ice.rst      | 31 +++++++++++++++++
 .../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 15 ++++----
 .../net/ethernet/huawei/hinic/hinic_devlink.c |  7 ++--
 drivers/net/ethernet/intel/ice/ice_devlink.c  | 34 ++++++++++++++-----
 .../net/ethernet/intel/ice/ice_fw_update.c    | 16 +++++++--
 .../net/ethernet/intel/ice/ice_fw_update.h    |  2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c |  7 ++--
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  6 ++--
 drivers/net/ethernet/mellanox/mlxsw/core.h    |  2 +-
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  6 ++--
 .../net/ethernet/netronome/nfp/nfp_devlink.c  |  9 ++---
 drivers/net/netdevsim/dev.c                   | 19 +++++++----
 drivers/net/netdevsim/netdevsim.h             |  1 +
 include/net/devlink.h                         | 15 ++++++--
 include/uapi/linux/devlink.h                  | 24 +++++++++++++
 net/core/devlink.c                            | 23 +++++++++----
 .../drivers/net/netdevsim/devlink.sh          | 18 ++++++++++
 18 files changed, 210 insertions(+), 54 deletions(-)

Jacob Keller (2):
  Update devlink header for overwrite mask attribute
  devlink: support setting the overwrite mask

 devlink/devlink.c            | 37 ++++++++++++++++++++++++++++++++++--
 include/uapi/linux/devlink.h | 24 +++++++++++++++++++++++
 2 files changed, 59 insertions(+), 2 deletions(-)

base-commit: 41d707b7332f1386642c47eb078110ca368a46f5
-- 
2.28.0.163.g6104cc2f0b60


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

end of thread, other threads:[~2020-07-31 20:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-30 23:20 [net-next 0/4] devlink flash update overwrite mask Jacob Keller
2020-07-30 23:20 ` [net-next 1/4] devlink: convert flash_update to use params structure Jacob Keller
2020-07-30 23:20 ` [net-next 2/4] devlink: introduce flash update overwrite mask Jacob Keller
2020-07-30 23:20 ` [iproute2-next 3/4] Update devlink header for overwrite mask attribute Jacob Keller
2020-07-30 23:20 ` [iproute2-next 4/4] devlink: support setting the overwrite mask Jacob Keller
2020-07-31  0:39 ` [net-next 0/4] devlink flash update " Jakub Kicinski
2020-07-31 20:35   ` 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).