@@ -2130,6 +2130,18 @@ static int dl_argv_parse(struct dl *dl, uint64_t o_required,
if (roce)
opts->port_fn_caps.value |= DEVLINK_PORT_FN_CAP_ROCE;
o_found |= DL_OPT_PORT_FN_CAPS;
+ } else if (dl_argv_match(dl, "migratable") &&
+ (o_all & DL_OPT_PORT_FN_CAPS)) {
+ bool mig;
+
+ dl_arg_inc(dl);
+ err = dl_argv_bool(dl, &mig);
+ if (err)
+ return err;
+ opts->port_fn_caps.selector |= DEVLINK_PORT_FN_CAP_MIGRATABLE;
+ if (mig)
+ opts->port_fn_caps.value |= DEVLINK_PORT_FN_CAP_MIGRATABLE;
+ o_found |= DL_OPT_PORT_FN_CAPS;
} else {
pr_err("Unknown option \"%s\"\n", dl_argv(dl));
return -EINVAL;
@@ -4405,7 +4417,7 @@ static void cmd_port_help(void)
pr_err(" devlink port split DEV/PORT_INDEX count COUNT\n");
pr_err(" devlink port unsplit DEV/PORT_INDEX\n");
pr_err(" devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { active | inactive } ]\n");
- pr_err(" [ roce { enable | disable } ]\n");
+ pr_err(" [ roce { enable | disable } ] [ migratable { enable | disable } ]\n");
pr_err(" devlink port function rate { help | show | add | del | set }\n");
pr_err(" devlink port param set DEV/PORT_INDEX name PARAMETER value VALUE cmode { permanent | driverinit | runtime }\n");
pr_err(" devlink port param show [DEV/PORT_INDEX name PARAMETER]\n");
@@ -4527,6 +4539,10 @@ static void pr_out_port_function(struct dl *dl, struct nlattr **tb_port)
print_string(PRINT_ANY, "roce", " roce %s",
port_fn_caps->value & DEVLINK_PORT_FN_CAP_ROCE ?
"enable" : "disable");
+ if (port_fn_caps->selector & DEVLINK_PORT_FN_CAP_MIGRATABLE)
+ print_string(PRINT_ANY, "migratable", " migratable %s",
+ port_fn_caps->value & DEVLINK_PORT_FN_CAP_MIGRATABLE ?
+ "enable" : "disable");
}
if (!dl->json_output)
@@ -4722,7 +4738,7 @@ static int cmd_port_param_show(struct dl *dl)
static void cmd_port_function_help(void)
{
pr_err("Usage: devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state STATE ]\n");
- pr_err(" [ roce { enable | disable } ]\n");
+ pr_err(" [ roce { enable | disable } ] [ migratable { enable | disable } ]\n");
pr_err(" devlink port function rate { help | show | add | del | set }\n");
}