From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Jiri Pirko <jiri@nvidia.com>,
Michael Chan <michael.chan@broadcom.com>,
Shannon Nelson <snelson@pensando.io>,
Saeed Mahameed <saeedm@nvidia.com>,
Boris Pismenny <borisp@nvidia.com>, Bin Luo <luobin9@huawei.com>,
Jakub Kicinksi <kuba@kernel.org>
Subject: [net-next v4 0/2] devlink: move common flash_update calls to core
Date: Wed, 18 Nov 2020 11:06:34 -0800 [thread overview]
Message-ID: <20201118190636.1235045-1-jacob.e.keller@intel.com> (raw)
This series moves a couple common pieces done by all drivers of the
->flash_update interface into devlink.c flash update handler. Specifically,
the core code will now request_firmware and
devlink_flash_update_(begin|end)_notify.
This cleanup is intended to simplify driver implementations so that they
have less work to do and are less capable of doing the "wrong" thing.
For request_firmware, this simplification is done as it is not expected that
drivers would do anything else. It also standardizes all drivers so that
they use the same interface (request_firmware, as opposed to
request_firmware_direct), and allows reporting the netlink extended ack with
the file name attribute.
For status notification, this change prevents drivers from sending a status
message without properly sending the status end notification. The current
userspace implementation of devlink relies on this end notification to
properly close the flash update channel. Without this, the flash update
process may hang indefinitely. By moving the begin and end calls into the
core code, it is no longer possible for a driver author to get this wrong.
Changes since v3
* picked up acked-by and reviewed-by comments
* fixed the ionic driver to leave the print statement in place
For the original patch that moved request_firmware, see [1]. For the v2 see
[2]. For further discussion of the issues with devlink flash status see [3].
For v3 see [4].
Cc: Jiri Pirko <jiri@nvidia.com>
Cc: Michael Chan <michael.chan@broadcom.com>
Cc: Shannon Nelson <snelson@pensando.io>
Cc: Saeed Mahameed <saeedm@nvidia.com>
Cc: Boris Pismenny <borisp@nvidia.com>
Cc: Bin Luo <luobin9@huawei.com>
Cc: Jakub Kicinksi <kuba@kernel.org>
[1] https://lore.kernel.org/netdev/20201113000142.3563690-1-jacob.e.keller@intel.com/
[2] https://lore.kernel.org/netdev/20201113224559.3910864-1-jacob.e.keller@intel.com/
[3] https://lore.kernel.org/netdev/6352e9d3-02af-721e-3a54-ef99a666be29@intel.com/
[4] https://lore.kernel.org/netdev/20201117200820.854115-1-jacob.e.keller@intel.com/
Jacob Keller (2):
devlink: move request_firmware out of driver
devlink: move flash end and begin to core devlink
.../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 4 +--
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 33 +++++++++++------
.../net/ethernet/broadcom/bnxt/bnxt_ethtool.h | 4 +--
.../net/ethernet/huawei/hinic/hinic_devlink.c | 12 +------
drivers/net/ethernet/intel/ice/ice_devlink.c | 17 +--------
.../net/ethernet/mellanox/mlx5/core/devlink.c | 11 +-----
.../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 3 --
drivers/net/ethernet/mellanox/mlxsw/core.c | 11 +-----
.../net/ethernet/netronome/nfp/nfp_devlink.c | 2 +-
drivers/net/ethernet/netronome/nfp/nfp_main.c | 17 ++-------
drivers/net/ethernet/netronome/nfp/nfp_main.h | 2 +-
.../ethernet/pensando/ionic/ionic_devlink.c | 2 +-
.../ethernet/pensando/ionic/ionic_devlink.h | 2 +-
.../net/ethernet/pensando/ionic/ionic_fw.c | 14 ++------
drivers/net/netdevsim/dev.c | 2 --
include/net/devlink.h | 9 +++--
net/core/devlink.c | 36 ++++++++++++++-----
17 files changed, 68 insertions(+), 113 deletions(-)
base-commit: ed30aef3c864f99111e16d4ea5cf29488d99a278
--
2.29.0
next reply other threads:[~2020-11-18 19:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-18 19:06 Jacob Keller [this message]
2020-11-18 19:06 ` [net-next v4 1/2] devlink: move request_firmware out of driver Jacob Keller
2020-11-18 19:06 ` [net-next v4 2/2] devlink: move flash end and begin to core devlink Jacob Keller
2020-11-20 5:43 ` [net-next v4 0/2] devlink: move common flash_update calls to core Jakub Kicinski
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=20201118190636.1235045-1-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=borisp@nvidia.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=luobin9@huawei.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=snelson@pensando.io \
/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;
as well as URLs for NNTP newsgroup(s).