netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [iproute2-next PATCH 0/3] devlink: support dry run attribute for flash update
@ 2022-07-20 18:34 Jacob Keller
  2022-07-20 18:34 ` [iproute2-next PATCH 1/3] update <linux/devlink.h> UAPI header Jacob Keller
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jacob Keller @ 2022-07-20 18:34 UTC (permalink / raw)
  To: netdev; +Cc: Jakub Kicinski, Jacob Keller

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(-)

-- 
2.36.1


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

end of thread, other threads:[~2022-07-21 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-20 18:34 [iproute2-next PATCH 0/3] devlink: support dry run attribute for flash update Jacob Keller
2022-07-20 18:34 ` [iproute2-next PATCH 1/3] update <linux/devlink.h> UAPI header Jacob Keller
2022-07-20 18:34 ` [iproute2-next PATCH 2/3] mnlg: add function to get CTRL_ATTR_MAXATTR value Jacob Keller
2022-07-20 18:34 ` [iproute2-next PATCH 3/3] devlink: add dry run attribute support to devlink flash Jacob Keller
2022-07-21  5:59   ` Jiri Pirko
2022-07-21 18:55     ` Keller, Jacob E
2022-07-21  5:59 ` [iproute2-next PATCH 0/3] devlink: support dry run attribute for flash update Jiri Pirko

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).