mbox series

[iproute2-next,0/3] devlink: support dry run attribute for flash update

Message ID 20220720183449.2070222-1-jacob.e.keller@intel.com (mailing list archive)
Headers show
Series devlink: support dry run attribute for flash update | expand

Message

Jacob Keller July 20, 2022, 6:34 p.m. UTC
Allow users to request a dry run of a flash update by adding the
DEVLINK_ATTR_DRY_RUN.

Because many devlink commands do not validate and reject unknown attributes,
this could have unexpected side effects on older kernels which lack the
attribute. To handle this, check the socket and determine the maximum
attribute the kernel supports. Only allow passing the DEVLINK_ATTR_DRY_RUN
for kernels which have the attribute.

This allows a user to validate that a flash update will be accepted by the
driver and device without being forced to commit to updating.

Jacob Keller (3):
  update <linux/devlink.h> UAPI header
  mnlg: add function to get CTRL_ATTR_MAXATTR value
  devlink: add dry run attribute support to devlink flash

 devlink/devlink.c            | 45 +++++++++++++++++++++++++++--
 devlink/mnlg.c               | 56 ++++++++++++++++++++++++++++++++++++
 devlink/mnlg.h               |  1 +
 include/uapi/linux/devlink.h |  8 ++++++
 4 files changed, 108 insertions(+), 2 deletions(-)

Comments

Jiri Pirko July 21, 2022, 5:59 a.m. UTC | #1
You are missing iproute2 maintainers in the cc.