Skip to content

devlink: support dry run attribute for flash update

Jacob Keller linux-doc netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest posting 2/23 patches 7 repliesIn review
  2. v3 posting 1/24 patches 1 replySuperseded
  3. v2 posting 2/23 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/22 patches3 repliesSuperseded
v13 patches3 repliesSuperseded

Changes in v3 from the cover letter

* Remove unnecessary () with return
* Reduce indentation of dl_get_max_attr

Patches in v3 posting 2/2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3update <linux/devlink.h> UAPI headerinclude/uapi/linux/devlink.h+8 -00 replies
2/3mnlg: add function to get CTRL_ATTR_MAXATTR valuedevlink/mnlg.c devlink/mnlg.h+57 -03 replies
3/3devlink: add dry run attribute support to devlink flashdevlink/devlink.c+44 -24 replies

Reviews trailers per patch

2 of 3 patches have a Reviewed-by or Acked-by.

PatchJiri Pirko
1/3
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

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

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.

Changes since v1
* Add Cc for maintainers
* Make dl_kernel_supports_dry_run more generic

Changes since v2
* Remove unnecessary () with return
* Reduce indentation of dl_get_max_attr

Cc Jacob Keller <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Jiri Pirko <[email protected]>
Cc "David S. Miller" <[email protected]>
Cc Eric Dumazet <[email protected]>
Cc Jakub Kicinski <[email protected]>
Cc Paolo Abeni <[email protected]>
Cc Tony Nguyen <[email protected]>
Cc David Ahern <[email protected]>
Cc Stephen Hemminger <[email protected]>

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            | 46 +++++++++++++++++++++++++++--
 devlink/mnlg.c               | 56 ++++++++++++++++++++++++++++++++++++
 devlink/mnlg.h               |  1 +
 include/uapi/linux/devlink.h |  8 ++++++
 4 files changed, 109 insertions(+), 2 deletions(-)

base-commit: 4cb0bec3744ac4f8d21de0e769f170e4059c6b9e

Signature · 1 line
2.35.1.456.ga9c7032d4631