netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jakub Kicinski <kubakici@wp.pl>, Jiri Pirko <jiri@resnulli.us>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	Tom Herbert <tom@herbertland.com>,
	Jacob Keller <jacob.e.keller@intel.com>
Subject: [RFC PATCH net-next 0/6] introduce PLDM firmware update library
Date: Thu,  9 Jul 2020 14:26:46 -0700	[thread overview]
Message-ID: <20200709212652.2785924-1-jacob.e.keller@intel.com> (raw)

This series goal is to enable support for updating the ice hardware flash
using the devlink flash command.

The ice firmware update files are distributed using the file format
described by the "PLDM for Firmware Update" standard:

https://www.dmtf.org/documents/pmci/pldm-firmware-update-specification-100

Because this file format is standard, this series introduces a new library
that handles the generic logic for parsing the PLDM file header. The library
uses a design that is very similar to the Mellanox mlxfw module. That is, a
simple ops table is setup and device drivers instantiate an instance of the
pldmfw library with the device specific operations.

Doing so allows for each device to implement the low level behavior for how
to interact with its firmware.

This series includes the library and an implementation for the ice hardware.
In addition, it includes a following patch with additional device parameters
for controlling specific aspects of the update. I suspect that there is a
better way to handle these parameters overall. Perhaps extensions to
DEVLINK_CMD_FLASH_UPDATE? The main purpose of these parameters is to give
additional control over the update choices. Specifically, Intel has flash
update tools which provide similar functionality for other operating
systems. Without these controls, we would not be able to replicate this
functionality within Linux using the devlink interface.

Because the PLDM file format is a standard and not something that is
specific to the Intel hardware, I opted to place this update library in
lib/pldmfw. I should note that while I tried to make the library generic, it
does not attempt to mimic the complete "Update Agent" as defined in the
standard. This is mostly due to the fact that the actual interfaces exposed
to software for the ice hardware would not allow this.

This series is currently based on top of Jeff Kirsher's dev-queue, as it
relies on some cleanup of the device capabilities code that was recently
published.

https://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git/log/?h=dev-queue

Cudzilo, Szymon T (1):
  ice: Add AdminQ commands for FW update

Jacek Naczyk (1):
  ice: Add support for unified NVM update flow capability

Jacob Keller (4):
  ice: add flags indicating pending update of firmware module
  Add pldmfw library for PLDM firmware update
  ice: implement device flash update via devlink
  ice: implement devlink parameters to control flash update

 Documentation/driver-api/index.rst            |   1 +
 .../driver-api/pldmfw/driver-ops.rst          |  56 ++
 .../driver-api/pldmfw/file-format.rst         | 203 ++++
 Documentation/driver-api/pldmfw/index.rst     |  72 ++
 Documentation/networking/devlink/ice.rst      |  46 +
 MAINTAINERS                                   |   7 +
 drivers/net/ethernet/intel/Kconfig            |   1 +
 drivers/net/ethernet/intel/ice/Makefile       |   1 +
 drivers/net/ethernet/intel/ice/ice.h          |  29 +
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   |  83 ++
 drivers/net/ethernet/intel/ice/ice_common.c   |  21 +-
 drivers/net/ethernet/intel/ice/ice_common.h   |   4 +-
 drivers/net/ethernet/intel/ice/ice_devlink.c  | 229 ++++-
 .../net/ethernet/intel/ice/ice_fw_update.c    | 817 ++++++++++++++++
 .../net/ethernet/intel/ice/ice_fw_update.h    |  12 +
 drivers/net/ethernet/intel/ice/ice_main.c     | 154 +++
 drivers/net/ethernet/intel/ice/ice_nvm.c      | 186 ++++
 drivers/net/ethernet/intel/ice/ice_nvm.h      |  16 +
 drivers/net/ethernet/intel/ice/ice_type.h     |  12 +
 include/linux/pldmfw.h                        | 165 ++++
 lib/Kconfig                                   |   4 +
 lib/Makefile                                  |   3 +
 lib/pldmfw/Makefile                           |   2 +
 lib/pldmfw/pldmfw.c                           | 879 ++++++++++++++++++
 lib/pldmfw/pldmfw_private.h                   | 238 +++++
 25 files changed, 3237 insertions(+), 4 deletions(-)
 create mode 100644 Documentation/driver-api/pldmfw/driver-ops.rst
 create mode 100644 Documentation/driver-api/pldmfw/file-format.rst
 create mode 100644 Documentation/driver-api/pldmfw/index.rst
 create mode 100644 drivers/net/ethernet/intel/ice/ice_fw_update.c
 create mode 100644 drivers/net/ethernet/intel/ice/ice_fw_update.h
 create mode 100644 include/linux/pldmfw.h
 create mode 100644 lib/pldmfw/Makefile
 create mode 100644 lib/pldmfw/pldmfw.c
 create mode 100644 lib/pldmfw/pldmfw_private.h

-- 
2.27.0.353.gb9a2d1a0207f


             reply	other threads:[~2020-07-09 21:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-09 21:26 Jacob Keller [this message]
2020-07-09 21:26 ` [RFC PATCH net-next 1/6] ice: Add support for unified NVM update flow capability Jacob Keller
2020-07-09 21:26 ` [RFC PATCH net-next 2/6] ice: Add AdminQ commands for FW update Jacob Keller
2020-07-09 21:26 ` [RFC PATCH net-next 3/6] ice: add flags indicating pending update of firmware module Jacob Keller
2020-07-09 21:26 ` [RFC PATCH net-next 4/6] Add pldmfw library for PLDM firmware update Jacob Keller
2020-07-09 21:26 ` [RFC PATCH net-next 5/6] ice: implement device flash update via devlink Jacob Keller
2020-07-09 21:26 ` [RFC PATCH net-next 6/6] ice: implement devlink parameters to control flash update Jacob Keller
2020-07-10  0:19   ` Jakub Kicinski
2020-07-10  6:25     ` Vasundhara Volam
2020-07-10 17:32     ` Jacob Keller
2020-07-10 20:25       ` Jakub Kicinski
2020-07-10 20:32         ` Jacob Keller
2020-07-15 21:41           ` Jacob Keller
2020-07-15 23:23             ` Jakub Kicinski
2020-07-16  0:21               ` Jacob Keller
2020-07-16 21:29                 ` Jacob Keller
2020-07-16 21:42                   ` Jakub Kicinski
2020-07-16 21:52                     ` Jacob Keller
2020-07-16 22:18                       ` Jakub Kicinski
2020-07-17 17:21                         ` Jacob Keller

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=20200709212652.2785924-1-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=jiri@resnulli.us \
    --cc=kubakici@wp.pl \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    /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).