linux/Documentation/networking/devlink
Jacob Keller 5d5b4128c4 devlink: introduce flash update overwrite mask
Sections of device flash may contain settings or device identifying
information. When performing a flash update, it is generally expected
that these settings and identifiers are not overwritten.

However, it may sometimes be useful to allow overwriting these fields
when performing a flash update. Some examples include, 1) customizing
the initial device config on first programming, such as overwriting
default device identifying information, or 2) reverting a device
configuration to known good state provided in the new firmware image, or
3) in case it is suspected that current firmware logic for managing the
preservation of fields during an update is broken.

Although some devices are able to completely separate these types of
settings and fields into separate components, this is not true for all
hardware.

To support controlling this behavior, a new
DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK is defined. This is an
nla_bitfield32 which will define what subset of fields in a component
should be overwritten during an update.

If no bits are specified, or of the overwrite mask is not provided, then
an update should not overwrite anything, and should maintain the
settings and identifiers as they are in the previous image.

If the overwrite mask has the DEVLINK_FLASH_OVERWRITE_SETTINGS bit set,
then the device should be configured to overwrite any of the settings in
the requested component with settings found in the provided image.

Similarly, if the DEVLINK_FLASH_OVERWRITE_IDENTIFIERS bit is set, the
device should be configured to overwrite any device identifiers in the
requested component with the identifiers from the image.

Multiple overwrite modes may be combined to indicate that a combination
of the set of fields that should be overwritten.

Drivers which support the new overwrite mask must set the
DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK in the
supported_flash_update_params field of their devlink_ops.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-09-25 17:20:57 -07:00
..
bnxt.rst bnxt_en: Fix "fw.mgmt" and "fw.nsci" info via devlink info_get cb 2020-03-27 15:34:43 -07:00
devlink-dpipe.rst devlink: introduce devlink-dpipe.rst documentation file 2020-01-10 17:07:00 -08:00
devlink-flash.rst devlink: introduce flash update overwrite mask 2020-09-25 17:20:57 -07:00
devlink-health.rst
devlink-info.rst devlink: Add support for board.serial_number to info_get cb. 2020-06-22 16:15:04 -07:00
devlink-params.rst devlink: expand the devlink-info documentation 2020-03-24 16:47:33 -07:00
devlink-region.rst docs: devlink: clarify the scope of snapshot id 2020-05-04 11:58:31 -07:00
devlink-resource.rst devlink: add a devlink-resource.rst documentation file 2020-01-10 17:07:00 -08:00
devlink-trap.rst devlink: Add early_drop trap 2020-08-03 18:06:46 -07:00
ice.rst ice: add documentation for device-caps region 2020-07-07 12:41:01 -07:00
index.rst docs: networkng: convert sja1105's devlink info to RTS 2020-06-10 17:07:04 -07:00
ionic.rst devlink: add documentation for ionic device driver 2020-01-10 17:07:00 -08:00
mlx4.rst devlink: add a file documenting devlink regions 2020-01-10 17:07:00 -08:00
mlx5.rst net/mlx5e: Add devlink fdb_large_groups parameter 2020-02-27 16:40:19 -08:00
mlxsw.rst mlxsw: Add irif and erif disabled traps 2020-01-19 16:23:52 +01:00
mv88e6xxx.rst devlink: convert driver-specific files to reStructuredText 2020-01-10 17:06:59 -08:00
netdevsim.rst devlink: rename and expand devlink-trap-netdevsim.rst 2020-01-10 17:07:00 -08:00
nfp.rst devlink: document info versions for each driver 2020-01-10 17:06:59 -08:00
qed.rst devlink: fix typos in qed documentation 2020-01-15 23:14:31 +01:00
sja1105.rst docs: networkng: convert sja1105's devlink info to RTS 2020-06-10 17:07:04 -07:00
ti-cpsw-switch.rst devlink: convert driver-specific files to reStructuredText 2020-01-10 17:06:59 -08:00