@@ -141,3 +141,6 @@ own name.
- u8
- Select the bank of firmware to be used on future boot and/or resets in
devices that have multiple firmware memory banks.
+ * - ``enable_migration``
+ - Boolean
+ - Enable/disable support for live migration in the devlink device.
@@ -511,6 +511,7 @@ enum devlink_param_generic_id {
DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
DEVLINK_PARAM_GENERIC_ID_FW_BANK,
+ DEVLINK_PARAM_GENERIC_ID_ENABLE_MIGRATION,
/* add new param generic ids above here*/
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -572,6 +573,9 @@ enum devlink_param_generic_id {
#define DEVLINK_PARAM_GENERIC_FW_BANK_NAME "fw_bank"
#define DEVLINK_PARAM_GENERIC_FW_BANK_TYPE DEVLINK_PARAM_TYPE_U8
+#define DEVLINK_PARAM_GENERIC_ENABLE_MIGRATION_NAME "enable_migration"
+#define DEVLINK_PARAM_GENERIC_ENABLE_MIGRATION_TYPE DEVLINK_PARAM_TYPE_BOOL
+
#define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
{ \
.id = DEVLINK_PARAM_GENERIC_ID_##_id, \
@@ -5226,6 +5226,11 @@ static const struct devlink_param devlink_param_generic[] = {
.name = DEVLINK_PARAM_GENERIC_FW_BANK_NAME,
.type = DEVLINK_PARAM_GENERIC_FW_BANK_TYPE,
},
+ {
+ .id = DEVLINK_PARAM_GENERIC_ID_ENABLE_MIGRATION,
+ .name = DEVLINK_PARAM_GENERIC_ENABLE_MIGRATION_NAME,
+ .type = DEVLINK_PARAM_GENERIC_ENABLE_MIGRATION_TYPE,
+ },
};
static int devlink_param_generic_verify(const struct devlink_param *param)
Add a new device generic parameter to enable/disable support for live migration in the devlink device. This is intended primarily for a core device that supports other ports/VFs/SFs. Those dependent ports may need their own migratable parameter for individual enable/disable control. Examples: $ devlink dev param set pci/0000:07:00.0 name enable_migration value true cmode runtime $ devlink dev param show pci/0000:07:00.0 name enable_migration pci/0000:07:00.0: name enable_migration type generic values: cmode runtime value true Signed-off-by: Shannon Nelson <shannon.nelson@amd.com> --- Documentation/networking/devlink/devlink-params.rst | 3 +++ include/net/devlink.h | 4 ++++ net/core/devlink.c | 5 +++++ 3 files changed, 12 insertions(+)