Merge remote-tracking branch 'main/main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
David Ahern 2024-07-08 22:36:13 +00:00
commit af9559b233
4 changed files with 31 additions and 8 deletions

View File

@ -2648,7 +2648,7 @@ static void dl_opts_put(struct nlmsghdr *nlh, struct dl *dl)
mnl_attr_put_u64(nlh, DEVLINK_ATTR_TRAP_POLICER_BURST,
opts->trap_policer_burst);
if (opts->present & (DL_OPT_PORT_FUNCTION_HW_ADDR | DL_OPT_PORT_FUNCTION_STATE |
DL_OPT_PORT_FN_CAPS))
DL_OPT_PORT_FN_CAPS | DL_OPT_PORT_FN_MAX_IO_EQS))
dl_function_attr_put(nlh, opts);
if (opts->present & DL_OPT_PORT_FLAVOUR)
mnl_attr_put_u16(nlh, DEVLINK_ATTR_PORT_FLAVOUR, opts->port_flavour);
@ -4772,7 +4772,7 @@ static void cmd_port_help(void)
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 } ] [ ipsec_packet { enable | disable } ]\n");
pr_err(" [ max_io_eqs EQS\n");
pr_err(" [ max_io_eqs EQS ]\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");

View File

@ -154,6 +154,24 @@ static int flush_update(void)
return 0;
}
static bool filter_multipath(const struct rtattr *rta)
{
const struct rtnexthop *nh = RTA_DATA(rta);
int len = RTA_PAYLOAD(rta);
while (len >= sizeof(*nh)) {
if (nh->rtnh_len > len)
break;
if (!((nh->rtnh_ifindex ^ filter.oif) & filter.oifmask))
return true;
len -= NLMSG_ALIGN(nh->rtnh_len);
nh = RTNH_NEXT(nh);
}
return false;
}
static int filter_nlmsg(struct nlmsghdr *n, struct rtattr **tb, int host_len)
{
struct rtmsg *r = NLMSG_DATA(n);
@ -310,12 +328,15 @@ static int filter_nlmsg(struct nlmsghdr *n, struct rtattr **tb, int host_len)
return 0;
}
if (filter.oifmask) {
int oif = 0;
if (tb[RTA_OIF]) {
int oif = rta_getattr_u32(tb[RTA_OIF]);
if (tb[RTA_OIF])
oif = rta_getattr_u32(tb[RTA_OIF]);
if ((oif^filter.oif)&filter.oifmask)
return 0;
if ((oif ^ filter.oif) & filter.oifmask)
return 0;
} else if (tb[RTA_MULTIPATH]) {
if (!filter_multipath(tb[RTA_MULTIPATH]))
return 0;
}
}
if (filter.markmask) {
int mark = 0;

View File

@ -63,7 +63,7 @@ devlink resource show pci/0000:01:00.0
Shows the resources of the specified devlink device.
.RE
.PP
devlink resource set pci/0000:01:00.0 /kvd/linear 98304
devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304
.RS 4
Sets the size of the specified resource for the specified devlink device.
.RE

View File

@ -1043,6 +1043,7 @@ static int buf_update(int len)
}
/* Append content to buffer as part of the current field */
__attribute__((format(printf, 1, 0)))
static void vout(const char *fmt, va_list args)
{
struct column *f = current_field;
@ -3473,6 +3474,7 @@ static int bpf_maps_opts_load_btf(struct bpf_map_info *info, struct btf **btf)
return 0;
}
__attribute__((format(printf, 2, 0)))
static void out_bpf_sk_storage_print_fn(void *ctx, const char *fmt, va_list args)
{
vout(fmt, args);