Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jacob Keller <jacob.e.keller@intel.com>
Subject: [iproute2-next v3 0/2] devlink flash update overwrite mask
Date: Tue, 18 Aug 2020 17:28:19 -0700	[thread overview]
Message-ID: <20200819002821.2657515-6-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20200819002821.2657515-1-jacob.e.keller@intel.com>

This series introduces support for the new attribute to devlink flash
update, DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK.

This attribute is a bitfield which allows userspace to specify what set of
subfields to overwrite when performing a flash update for a device.

The intention is to support the ability to control the behavior of
overwriting the configuration and identifying fields in the Intel ice device
flash update process. This is necessary  as the firmware layout for the ice
device includes some settings and configuration within the same flash
section as the main firmware binary.

This series, and the accompanying kernel series, introduce support for the
attribute. Once applied, the overwrite support can be be invoked via
devlink:

  # overwrite settings
  devlink dev flash pci/0000:af:00.0 file firmware.bin overwrite settings

  # overwrite identifiers and settings
  devlink dev flash pci/0000:af:00.0 file firmware.bin overwrite settings overwrite identifiers

The overwrite mask is determined by combining all of the "overwrite
<section>" arguments into a bitmask by doing bitwise OR. The "selector" for
the nla_bitfield32 will always be specified as the
DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS provided in our copy of the uapi
header.

Changes since v2:
* remove the use of GENMASK from the userspace API header.
* separate iproute2 and net-next patches to avoid confusion.
* convert to using an nla_bitfield32 using the mnl_attr_push().

Jacob Keller (2):
  Update devlink header for overwrite mask attribute
  devlink: support setting the overwrite mask

 devlink/devlink.c            | 48 ++++++++++++++++++++++++++++++++++--
 include/uapi/linux/devlink.h | 24 ++++++++++++++++++
 2 files changed, 70 insertions(+), 2 deletions(-)


base-commit: e8e8f16ed155dfbe026ad3c22458d1277e17794e
-- 
2.28.0.218.ge27853923b9d.dirty


  parent reply	other threads:[~2020-08-19  0:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19  0:28 [net-next v3 0/4] " Jacob Keller
2020-08-19  0:28 ` [net-next v3 1/4] devlink: check flash_update parameter support in net core Jacob Keller
2020-08-19  3:45   ` Jakub Kicinski
2020-08-19 15:53     ` Keller, Jacob E
2020-08-19 23:36   ` David Miller
2020-08-20  0:58     ` Jacob Keller
2020-08-19  0:28 ` [net-next v3 2/4] devlink: convert flash_update to use params structure Jacob Keller
2020-08-19  0:28 ` [net-next v3 3/4] devlink: introduce flash update overwrite mask Jacob Keller
2020-08-19  3:54   ` Jakub Kicinski
2020-08-19 16:01     ` Keller, Jacob E
2020-08-19 16:30       ` Jakub Kicinski
2020-08-19 17:06         ` Keller, Jacob E
2020-08-19  0:28 ` [net-next v3 4/4] ice: add support for " Jacob Keller
2020-08-19  0:28 ` Jacob Keller [this message]
2020-08-19  0:28 ` [iproute2-next v3 1/2] Update devlink header for overwrite mask attribute Jacob Keller
2020-08-19  0:28 ` [iproute2-next v3 2/2] devlink: support setting the overwrite mask 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=20200819002821.2657515-6-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=netdev@vger.kernel.org \
    --subject='Re: [iproute2-next v3 0/2] devlink flash update overwrite mask' \
    /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

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