if (mig)
opts->port_fn_caps.value |= DEVLINK_PORT_FN_CAP_MIGRATABLE;
o_found |= DL_OPT_PORT_FN_CAPS;
+ } else if (dl_argv_match(dl, "ipsec_crypto") &&
+ (o_all & DL_OPT_PORT_FN_CAPS)) {
+ bool ipsec_crypto;
+
+ dl_arg_inc(dl);
+ err = dl_argv_bool(dl, &ipsec_crypto);
+ if (err)
+ return err;
+ opts->port_fn_caps.selector |= DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO;
+ if (ipsec_crypto)
+ opts->port_fn_caps.value |= DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO;
+ o_found |= DL_OPT_PORT_FN_CAPS;
} else {
pr_err("Unknown option \"%s\"\n", dl_argv(dl));
return -EINVAL;
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 } ] [ migratable { enable | disable } ]\n");
+ pr_err(" [ ipsec_crypto { 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");
print_string(PRINT_ANY, "migratable", " migratable %s",
port_fn_caps->value & DEVLINK_PORT_FN_CAP_MIGRATABLE ?
"enable" : "disable");
+ if (port_fn_caps->selector & DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO)
+ print_string(PRINT_ANY, "ipsec_crypto", " ipsec_crypto %s",
+ port_fn_caps->value & DEVLINK_PORT_FN_CAP_IPSEC_CRYPTO ?
+ "enable" : "disable");
}
if (!dl->json_output)
{
pr_err("Usage: devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { active | inactive } ]\n");
pr_err(" [ roce { enable | disable } ] [ migratable { enable | disable } ]\n");
+ pr_err(" [ ipsec_crypto { enable | disable } ]\n");
pr_err(" devlink port function rate { help | show | add | del | set }\n");
}
.RI "[ "
.BR migratable " { " enable " | " disable " }"
.RI "]"
+.RI "[ "
+.BR ipsec_crypto " { " enable " | " disable " }"
+.RI "]"
.ti -8
.BR "devlink port function rate "
.BR migratable " { " enable " | " disable " } "
Set the migratable capability of the function.
+.TP
+.BR ipsec_crypto " { " enable " | " disable " } "
+Set the IPsec crypto offload capability of the function. Controls XFRM state
+crypto operation (Encrypt/Decrypt) offload.
+
.ti -8
.SS devlink port del - delete a devlink port
.PP
This will enable the migratable functionality of the function.
.RE
.PP
+devlink port function set pci/0000:01:00.0/1 ipsec_crypto enable
+.RS 4
+This will enable the IPsec crypto offload functionality of the function.
+.RE
+.PP
devlink port function set pci/0000:01:00.0/1 hw_addr 00:00:00:11:22:33 state active
.RS 4
Configure hardware address and also active the function. When a function is