From: Jacob Keller <jacob.e.keller@intel.com>
To: netdev@vger.kernel.org
Cc: Jacob Keller <jacob.e.keller@intel.com>
Subject: [iproute2-next v2 4/5] Update devlink header for overwrite mask attribute
Date: Fri, 31 Jul 2020 17:21:58 -0700 [thread overview]
Message-ID: <20200801002159.3300425-5-jacob.e.keller@intel.com> (raw)
In-Reply-To: <20200801002159.3300425-1-jacob.e.keller@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
include/uapi/linux/devlink.h | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index b7f23faae901..3d006ad2fdaf 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -228,6 +228,28 @@ enum {
DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
};
+/* Specify what sections of a flash component can be overwritten when
+ * performing an update. Overwriting of firmware binary sections is always
+ * implicitly assumed to be allowed.
+ *
+ * Each section must be documented in
+ * Documentation/networking/devlink/devlink-flash.rst
+ *
+ */
+enum {
+ DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT,
+ DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT,
+
+ __DEVLINK_FLASH_OVERWRITE_MAX_BIT,
+ DEVLINK_FLASH_OVERWRITE_MAX_BIT = __DEVLINK_FLASH_OVERWRITE_MAX_BIT - 1
+};
+
+#define DEVLINK_FLASH_OVERWRITE_SETTINGS BIT(DEVLINK_FLASH_OVERWRITE_SETTINGS_BIT)
+#define DEVLINK_FLASH_OVERWRITE_IDENTIFIERS BIT(DEVLINK_FLASH_OVERWRITE_IDENTIFIERS_BIT)
+
+#define DEVLINK_SUPPORTED_FLASH_OVERWRITE_SECTIONS \
+ GENMASK(DEVLINK_FLASH_OVERWRITE_MAX_BIT, 0)
+
/**
* enum devlink_trap_action - Packet trap action.
* @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
@@ -458,6 +480,8 @@ enum devlink_attr {
DEVLINK_ATTR_PORT_LANES, /* u32 */
DEVLINK_ATTR_PORT_SPLITTABLE, /* u8 */
+ DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK, /* u32 */
+
/* add new attributes above here, update the policy in devlink.c */
__DEVLINK_ATTR_MAX,
--
2.28.0.163.g6104cc2f0b60
next prev parent reply other threads:[~2020-08-01 0:22 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-01 0:21 [net-next v2 0/5] devlink flash update overwrite mask Jacob Keller
2020-08-01 0:21 ` [net-next v2 1/5] devlink: convert flash_update to use params structure Jacob Keller
2020-08-03 15:46 ` Jiri Pirko
2020-08-01 0:21 ` [net-next v2 2/5] devlink: introduce flash update overwrite mask Jacob Keller
2020-08-03 15:38 ` Jiri Pirko
2020-08-03 16:53 ` Jacob Keller
2020-08-03 23:08 ` Jacob Keller
2020-08-01 0:21 ` [net-next v2 3/5] ice: add support for " Jacob Keller
2020-08-01 0:21 ` Jacob Keller [this message]
2020-08-01 0:21 ` [iproute2-next v2 5/5] devlink: support setting the " Jacob Keller
2020-08-03 15:53 ` David Ahern
2020-08-03 16:20 ` Jiri Pirko
2020-08-03 16:56 ` Jacob Keller
2020-08-03 21:20 ` David Ahern
2020-08-03 22:44 ` Jacob Keller
2020-08-03 23:30 ` Jacob Keller
2020-08-03 23:54 ` David Ahern
2020-08-04 18:31 ` Jacob Keller
2020-08-03 15:28 ` [net-next v2 0/5] devlink flash update " Jiri Pirko
2020-08-03 16:51 ` 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=20200801002159.3300425-5-jacob.e.keller@intel.com \
--to=jacob.e.keller@intel.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).