Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
commit
50b668bdbf
|
|
@ -3036,6 +3036,7 @@ static int cmd_dev_param_show_cb(const struct nlmsghdr *nlh, void *data)
|
||||||
struct param_ctx {
|
struct param_ctx {
|
||||||
struct dl *dl;
|
struct dl *dl;
|
||||||
int nla_type;
|
int nla_type;
|
||||||
|
bool cmode_found;
|
||||||
union {
|
union {
|
||||||
uint8_t vu8;
|
uint8_t vu8;
|
||||||
uint16_t vu16;
|
uint16_t vu16;
|
||||||
|
|
@ -3088,6 +3089,7 @@ static int cmd_dev_param_set_cb(const struct nlmsghdr *nlh, void *data)
|
||||||
|
|
||||||
cmode = mnl_attr_get_u8(nla_value[DEVLINK_ATTR_PARAM_VALUE_CMODE]);
|
cmode = mnl_attr_get_u8(nla_value[DEVLINK_ATTR_PARAM_VALUE_CMODE]);
|
||||||
if (cmode == dl->opts.cmode) {
|
if (cmode == dl->opts.cmode) {
|
||||||
|
ctx->cmode_found = true;
|
||||||
val_attr = nla_value[DEVLINK_ATTR_PARAM_VALUE_DATA];
|
val_attr = nla_value[DEVLINK_ATTR_PARAM_VALUE_DATA];
|
||||||
switch (nla_type) {
|
switch (nla_type) {
|
||||||
case MNL_TYPE_U8:
|
case MNL_TYPE_U8:
|
||||||
|
|
@ -3140,6 +3142,10 @@ static int cmd_dev_param_set(struct dl *dl)
|
||||||
err = mnlu_gen_socket_sndrcv(&dl->nlg, nlh, cmd_dev_param_set_cb, &ctx);
|
err = mnlu_gen_socket_sndrcv(&dl->nlg, nlh, cmd_dev_param_set_cb, &ctx);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
if (!ctx.cmode_found) {
|
||||||
|
pr_err("Configuration mode not supported\n");
|
||||||
|
return -ENOTSUP;
|
||||||
|
}
|
||||||
|
|
||||||
nlh = mnlu_gen_socket_cmd_prepare(&dl->nlg, DEVLINK_CMD_PARAM_SET,
|
nlh = mnlu_gen_socket_cmd_prepare(&dl->nlg, DEVLINK_CMD_PARAM_SET,
|
||||||
NLM_F_REQUEST | NLM_F_ACK);
|
NLM_F_REQUEST | NLM_F_ACK);
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
static const char version[] = "5.14.0";
|
static const char version[] = "5.15.0";
|
||||||
|
|
|
||||||
|
|
@ -3307,8 +3307,7 @@ bool iproute2_is_map_in_map(const char *libbpf_map_name, struct bpf_elf_map *ima
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!ctx->maps[i].id ||
|
if (!ctx->maps[i].id ||
|
||||||
ctx->maps[i].inner_id ||
|
ctx->maps[i].inner_id)
|
||||||
ctx->maps[i].inner_idx == -1)
|
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
*imap = ctx->maps[i];
|
*imap = ctx->maps[i];
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,15 @@ devlink-port \- devlink port configuration
|
||||||
|
|
||||||
.ti -8
|
.ti -8
|
||||||
.BI "devlink port add"
|
.BI "devlink port add"
|
||||||
.RB "["
|
.RB "{"
|
||||||
.IR "DEV | DEV/PORT_INDEX"
|
.IR "DEV | DEV/PORT_INDEX"
|
||||||
.RB "] "
|
.RB "} "
|
||||||
.RB "[ " flavour
|
.RB "[ " flavour
|
||||||
.IR FLAVOUR " ]"
|
.IR FLAVOUR " ]"
|
||||||
.RB "[ " pcipf
|
.RB "[ " pfnum
|
||||||
.IR PFNUMBER " ]"
|
.IR PFNUMBER " ]"
|
||||||
.br
|
.RB "[ " sfnum
|
||||||
.RB "{ " pcisf
|
.IR SFNUMBER " ]"
|
||||||
.IR SFNUMBER " }"
|
|
||||||
.br
|
|
||||||
.RB "[ " controller
|
.RB "[ " controller
|
||||||
.IR CNUM " ]"
|
.IR CNUM " ]"
|
||||||
.br
|
.br
|
||||||
|
|
@ -102,7 +100,7 @@ devlink-port \- devlink port configuration
|
||||||
.SS devlink port set - change devlink port attributes
|
.SS devlink port set - change devlink port attributes
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.in +4
|
.in +4
|
||||||
|
|
@ -126,7 +124,7 @@ set port type
|
||||||
.SS devlink port split - split devlink port into more
|
.SS devlink port split - split devlink port into more
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -137,7 +135,7 @@ number of ports to split to.
|
||||||
Could be performed on any split port of the same split group.
|
Could be performed on any split port of the same split group.
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.SS devlink port show - display devlink port attributes
|
.SS devlink port show - display devlink port attributes
|
||||||
|
|
@ -154,11 +152,11 @@ Is an alias for
|
||||||
.ti -8
|
.ti -8
|
||||||
.SS devlink port add - add a devlink port
|
.SS devlink port add - add a devlink port
|
||||||
.PP
|
.PP
|
||||||
.B "DEV"
|
.I "DEV"
|
||||||
- specifies the devlink device to operate on. or
|
- specifies the devlink device to operate on. or
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port index to use for the requested new port.
|
- specifies the devlink port index to use for the requested new port.
|
||||||
This is optional. When omitted, driver allocates unique port index.
|
This is optional. When omitted, driver allocates unique port index.
|
||||||
|
|
||||||
|
|
@ -173,17 +171,17 @@ set port flavour
|
||||||
- PCI SF port
|
- PCI SF port
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR pfnum " { " pfnumber " } "
|
.BI pfnum " PFNUMBER "
|
||||||
Specifies PCI pfnumber to use on which a SF device to create
|
Specifies PCI pfnumber to use on which a SF device to create
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR sfnum " { " sfnumber " } "
|
.BI sfnum " SFNUMBER "
|
||||||
Specifies sfnumber to assign to the device of the SF.
|
Specifies sfnumber to assign to the device of the SF.
|
||||||
This field is optional for those devices which supports auto assignment of the
|
This field is optional for those devices which supports auto assignment of the
|
||||||
SF number.
|
SF number.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR controller " { " controller " } "
|
.BI controller " CNUM "
|
||||||
Specifies controller number for which the SF port is created.
|
Specifies controller number for which the SF port is created.
|
||||||
This field is optional. It is used only when SF port is created for the
|
This field is optional. It is used only when SF port is created for the
|
||||||
external controller.
|
external controller.
|
||||||
|
|
@ -192,17 +190,17 @@ external controller.
|
||||||
.SS devlink port function set - Set the port function attribute(s).
|
.SS devlink port function set - Set the port function attribute(s).
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR hw_addr " ADDR"
|
.BI hw_addr " ADDR"
|
||||||
- hardware address of the function to set. This is a Ethernet MAC address when
|
Hardware address of the function to set. This is a Ethernet MAC address when
|
||||||
port type is Ethernet.
|
port type is Ethernet.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
.BR state " { " active " | " inactive " } "
|
.BR state " { " active " | " inactive " } "
|
||||||
- new state of the function to change to.
|
New state of the function to change to.
|
||||||
|
|
||||||
.I active
|
.I active
|
||||||
- Once configuration of the function is done, activate the function.
|
- Once configuration of the function is done, activate the function.
|
||||||
|
|
@ -213,13 +211,13 @@ port type is Ethernet.
|
||||||
.ti -8
|
.ti -8
|
||||||
.SS devlink port del - delete a devlink port
|
.SS devlink port del - delete a devlink port
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to delete.
|
- specifies the devlink port to delete.
|
||||||
|
|
||||||
.ti -8
|
.ti -8
|
||||||
.SS devlink port param set - set new value to devlink port configuration parameter
|
.SS devlink port param set - set new value to devlink port configuration parameter
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -246,7 +244,7 @@ Configuration mode in which the new value is set.
|
||||||
.SS devlink port param show - display devlink port supported configuration parameters attributes
|
.SS devlink port param show - display devlink port supported configuration parameters attributes
|
||||||
|
|
||||||
.PP
|
.PP
|
||||||
.B "DEV/PORT_INDEX"
|
.I "DEV/PORT_INDEX"
|
||||||
- specifies the devlink port to operate on.
|
- specifies the devlink port to operate on.
|
||||||
|
|
||||||
.B name
|
.B name
|
||||||
|
|
|
||||||
|
|
@ -26,11 +26,24 @@ static void print_type(struct rd *rd, uint32_t val)
|
||||||
srq_types_to_str(val));
|
srq_types_to_str(val));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_qps(const char *str)
|
static void print_qps(char *qp_str)
|
||||||
{
|
{
|
||||||
if (!strlen(str))
|
char *qpn;
|
||||||
|
|
||||||
|
if (!strlen(qp_str))
|
||||||
return;
|
return;
|
||||||
print_color_string(PRINT_ANY, COLOR_NONE, "lqpn", "lqpn %s ", str);
|
|
||||||
|
open_json_array(PRINT_ANY, "lqpn");
|
||||||
|
print_color_string(PRINT_FP, COLOR_NONE, NULL, " ", NULL);
|
||||||
|
qpn = strtok(qp_str, ",");
|
||||||
|
while (qpn) {
|
||||||
|
print_color_string(PRINT_ANY, COLOR_NONE, NULL, "%s", qpn);
|
||||||
|
qpn = strtok(NULL, ",");
|
||||||
|
if (qpn)
|
||||||
|
print_color_string(PRINT_FP, COLOR_NONE, NULL, ",", NULL);
|
||||||
|
}
|
||||||
|
print_color_string(PRINT_FP, COLOR_NONE, NULL, " ", NULL);
|
||||||
|
close_json_array(PRINT_JSON, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int filter_srq_range_qps(struct rd *rd, struct nlattr **qp_line,
|
static int filter_srq_range_qps(struct rd *rd, struct nlattr **qp_line,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue