From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Jonathan Corbet <corbet@lwn.net>, Jiri Pirko <jiri@nvidia.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
David Ahern <dsahern@kernel.org>,
Stephen Hemminger <stephen@networkplumber.org>,
linux-doc@vger.kernel.org
Subject: [iproute2-next v3 0/3] devlink: support dry run attribute for flash update
Date: Mon, 25 Jul 2022 13:56:47 -0700 [thread overview]
Message-ID: <20220725205650.4018731-1-jacob.e.keller@intel.com> (raw)
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 <jacob.e.keller@intel.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Jiri Pirko <jiri@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: linux-doc@vger.kernel.org
Cc: netdev@vger.kernel.org
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
--
2.35.1.456.ga9c7032d4631
next reply other threads:[~2022-07-25 20:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-25 20:56 Jacob Keller [this message]
2022-07-25 20:56 ` [iproute2-next v3 1/3] update <linux/devlink.h> UAPI header Jacob Keller
2022-07-25 20:56 ` [iproute2-next v3 2/3] mnlg: add function to get CTRL_ATTR_MAXATTR value Jacob Keller
2022-07-26 7:46 ` Jiri Pirko
2022-08-26 0:40 ` Keller, Jacob E
2022-08-26 8:38 ` Jiri Pirko
2022-07-25 20:56 ` [iproute2-next v3 3/3] devlink: add dry run attribute support to devlink flash Jacob Keller
2022-07-25 21:13 ` Stephen Hemminger
2022-07-25 21:19 ` Keller, Jacob E
2022-07-25 21:27 ` Keller, Jacob E
2022-07-26 7:47 ` Jiri Pirko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220725205650.4018731-1-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox