Merge branch 'main' into next
Conflicts: include/uapi/linux/virtio_ids.h Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
commit
917d913b2e
|
|
@ -149,9 +149,9 @@ main(int argc, char **argv)
|
|||
NEXT_ARG();
|
||||
if (netns_switch(argv[1]))
|
||||
exit(-1);
|
||||
} else if (matches_color(opt, &color)) {
|
||||
} else if (matches(opt, "-compressvlans") == 0) {
|
||||
++compress_vlans;
|
||||
} else if (matches_color(opt, &color)) {
|
||||
} else if (matches(opt, "-force") == 0) {
|
||||
++force;
|
||||
} else if (matches(opt, "-json") == 0) {
|
||||
|
|
|
|||
11
bridge/fdb.c
11
bridge/fdb.c
|
|
@ -192,10 +192,13 @@ int print_fdb(struct nlmsghdr *n, void *arg)
|
|||
"mac", "%s ", lladdr);
|
||||
}
|
||||
|
||||
if (!filter_index && r->ndm_ifindex)
|
||||
if (!filter_index && r->ndm_ifindex) {
|
||||
print_string(PRINT_FP, NULL, "dev ", NULL);
|
||||
|
||||
print_color_string(PRINT_ANY, COLOR_IFNAME,
|
||||
"ifname", "dev %s ",
|
||||
"ifname", "%s ",
|
||||
ll_index_to_name(r->ndm_ifindex));
|
||||
}
|
||||
|
||||
if (tb[NDA_DST]) {
|
||||
int family = AF_INET;
|
||||
|
|
@ -208,9 +211,11 @@ int print_fdb(struct nlmsghdr *n, void *arg)
|
|||
RTA_PAYLOAD(tb[NDA_DST]),
|
||||
RTA_DATA(tb[NDA_DST]));
|
||||
|
||||
print_string(PRINT_FP, NULL, "dst ", NULL);
|
||||
|
||||
print_color_string(PRINT_ANY,
|
||||
ifa_family_color(family),
|
||||
"dst", "dst %s ", dst);
|
||||
"dst", "%s ", dst);
|
||||
}
|
||||
|
||||
if (vid)
|
||||
|
|
|
|||
|
|
@ -518,7 +518,7 @@ else
|
|||
"")
|
||||
break ;;
|
||||
*)
|
||||
usage 1 ;;
|
||||
shift 1 ;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3700,7 +3700,7 @@ static int cmd_dev_flash_status_cb(const struct nlmsghdr *nlh, void *data)
|
|||
strcmp(dev_name, opts->dev_name))
|
||||
return MNL_CB_ERROR;
|
||||
|
||||
if (genl->cmd == DEVLINK_CMD_FLASH_UPDATE_END && ctx->not_first) {
|
||||
if (genl->cmd == DEVLINK_CMD_FLASH_UPDATE_END) {
|
||||
pr_out("\n");
|
||||
free(ctx->last_msg);
|
||||
free(ctx->last_component);
|
||||
|
|
@ -3988,7 +3988,7 @@ static void cmd_port_help(void)
|
|||
pr_err(" devlink port set DEV/PORT_INDEX [ type { eth | ib | auto} ]\n");
|
||||
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 STATE ]\n");
|
||||
pr_err(" devlink port function set DEV/PORT_INDEX [ hw_addr ADDR ] [ state { active | inactive } ]\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");
|
||||
|
|
|
|||
|
|
@ -109,17 +109,6 @@ static inline bool is_addrtype_inet_not_multi(const inet_prefix *p)
|
|||
return (p->flags & ADDRTYPE_INET_MULTI) == ADDRTYPE_INET;
|
||||
}
|
||||
|
||||
#define DN_MAXADDL 20
|
||||
#ifndef AF_DECnet
|
||||
#define AF_DECnet 12
|
||||
#endif
|
||||
|
||||
struct dn_naddr
|
||||
{
|
||||
unsigned short a_len;
|
||||
unsigned char a_addr[DN_MAXADDL];
|
||||
};
|
||||
|
||||
#ifndef AF_MPLS
|
||||
# define AF_MPLS 28
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
static const char version[] = "5.13.0";
|
||||
static const char version[] = "5.14.0";
|
||||
|
|
|
|||
4
ip/ip.c
4
ip/ip.c
|
|
@ -72,7 +72,7 @@ static void usage(void)
|
|||
" OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
|
||||
" -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
|
||||
" -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
|
||||
" -4 | -6 | -I | -D | -M | -B | -0 |\n"
|
||||
" -4 | -6 | -M | -B | -0 |\n"
|
||||
" -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
|
||||
" -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
|
||||
" -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |\n"
|
||||
|
|
@ -224,8 +224,6 @@ int main(int argc, char **argv)
|
|||
preferred_family = AF_INET6;
|
||||
} else if (strcmp(opt, "-0") == 0) {
|
||||
preferred_family = AF_PACKET;
|
||||
} else if (strcmp(opt, "-D") == 0) {
|
||||
preferred_family = AF_DECnet;
|
||||
} else if (strcmp(opt, "-M") == 0) {
|
||||
preferred_family = AF_MPLS;
|
||||
} else if (strcmp(opt, "-B") == 0) {
|
||||
|
|
|
|||
|
|
@ -41,6 +41,9 @@ static const char *arp_validate_tbl[] = {
|
|||
"active",
|
||||
"backup",
|
||||
"all",
|
||||
"filter",
|
||||
"filter_active",
|
||||
"filter_backup",
|
||||
NULL,
|
||||
};
|
||||
|
||||
|
|
@ -152,7 +155,7 @@ static void print_explain(FILE *f)
|
|||
" [ ad_actor_system LLADDR ]\n"
|
||||
"\n"
|
||||
"BONDMODE := balance-rr|active-backup|balance-xor|broadcast|802.3ad|balance-tlb|balance-alb\n"
|
||||
"ARP_VALIDATE := none|active|backup|all\n"
|
||||
"ARP_VALIDATE := none|active|backup|all|filter|filter_active|filter_backup\n"
|
||||
"ARP_ALL_TARGETS := any|all\n"
|
||||
"PRIMARY_RESELECT := always|better|failure\n"
|
||||
"FAIL_OVER_MAC := none|active|follow\n"
|
||||
|
|
|
|||
|
|
@ -328,8 +328,7 @@ int print_neigh(struct nlmsghdr *n, void *arg)
|
|||
if (!(filter.state&r->ndm_state) &&
|
||||
!(r->ndm_flags & NTF_PROXY) &&
|
||||
!(r->ndm_flags & NTF_EXT_LEARNED) &&
|
||||
(r->ndm_state || !(filter.state&0x100)) &&
|
||||
(r->ndm_family != AF_DECnet))
|
||||
(r->ndm_state || !(filter.state&0x100)))
|
||||
return 0;
|
||||
|
||||
if (filter.master && !(n->nlmsg_flags & NLM_F_DUMP_FILTERED)) {
|
||||
|
|
|
|||
|
|
@ -243,6 +243,9 @@ static void print_flags(long flags)
|
|||
if (flags & IFF_ONE_QUEUE)
|
||||
print_string(PRINT_ANY, NULL, " %s", "one_queue");
|
||||
|
||||
if (flags & IFF_MULTI_QUEUE)
|
||||
print_string(PRINT_ANY, NULL, " %s", "multi_queue");
|
||||
|
||||
if (flags & IFF_VNET_HDR)
|
||||
print_string(PRINT_ANY, NULL, " %s", "vnet_hdr");
|
||||
|
||||
|
|
@ -253,9 +256,10 @@ static void print_flags(long flags)
|
|||
print_string(PRINT_ANY, NULL, " %s", "filter");
|
||||
|
||||
flags &= ~(IFF_TUN | IFF_TAP | IFF_NO_PI | IFF_ONE_QUEUE |
|
||||
IFF_VNET_HDR | IFF_PERSIST | IFF_NOFILTER);
|
||||
IFF_MULTI_QUEUE | IFF_VNET_HDR | IFF_PERSIST |
|
||||
IFF_NOFILTER);
|
||||
if (flags)
|
||||
print_0xhex(PRINT_ANY, NULL, "%#llx", flags);
|
||||
print_0xhex(PRINT_ANY, NULL, " %#llx", flags);
|
||||
|
||||
close_json_array(PRINT_JSON, NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ const char *get_libbpf_version(void)
|
|||
if (fp == NULL)
|
||||
goto out;
|
||||
|
||||
while ((s = fgets(buf, sizeof(buf), fp)) != NULL) {
|
||||
while (fgets(buf, sizeof(buf), fp) != NULL) {
|
||||
if ((s = strstr(buf, "libbpf.so.")) != NULL) {
|
||||
strncpy(_libbpf_version, s+10, sizeof(_libbpf_version)-1);
|
||||
strtok(_libbpf_version, "\n");
|
||||
|
|
|
|||
|
|
@ -1531,7 +1531,7 @@ retry:
|
|||
* into our buffer. Still, try to give a debuggable error
|
||||
* log for the user, so enlarge it and re-fail.
|
||||
*/
|
||||
if (fd < 0 && (errno == ENOSPC || !ctx->log_size)) {
|
||||
if (fd < 0 && errno == ENOSPC) {
|
||||
if (tries++ < 10 && !bpf_log_realloc(ctx))
|
||||
goto retry;
|
||||
|
||||
|
|
@ -2069,7 +2069,7 @@ retry:
|
|||
fd = bpf_btf_load(ctx->btf_data->d_buf, ctx->btf_data->d_size,
|
||||
ctx->log, ctx->log_size);
|
||||
if (fd < 0 || ctx->verbose) {
|
||||
if (fd < 0 && (errno == ENOSPC || !ctx->log_size)) {
|
||||
if (fd < 0 && errno == ENOSPC) {
|
||||
if (tries++ < 10 && !bpf_log_realloc(ctx))
|
||||
goto retry;
|
||||
|
||||
|
|
@ -3298,6 +3298,9 @@ bool iproute2_is_map_in_map(const char *libbpf_map_name, struct bpf_elf_map *ima
|
|||
|
||||
*omap = ctx->maps[j];
|
||||
outer_map_name = bpf_map_fetch_name(ctx, j);
|
||||
if (!outer_map_name)
|
||||
return false;
|
||||
|
||||
memcpy(omap_name, outer_map_name, strlen(outer_map_name) + 1);
|
||||
|
||||
return true;
|
||||
|
|
|
|||
22
lib/utils.c
22
lib/utils.c
|
|
@ -540,7 +540,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
|
|||
memset(addr, 0, sizeof(*addr));
|
||||
|
||||
if (strcmp(name, "default") == 0) {
|
||||
if ((family == AF_DECnet) || (family == AF_MPLS))
|
||||
if (family == AF_MPLS)
|
||||
return -1;
|
||||
addr->family = family;
|
||||
addr->bytelen = af_byte_len(addr->family);
|
||||
|
|
@ -551,7 +551,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
|
|||
|
||||
if (strcmp(name, "all") == 0 ||
|
||||
strcmp(name, "any") == 0) {
|
||||
if ((family == AF_DECnet) || (family == AF_MPLS))
|
||||
if (family == AF_MPLS)
|
||||
return -1;
|
||||
addr->family = family;
|
||||
addr->bytelen = 0;
|
||||
|
|
@ -636,10 +636,6 @@ int af_bit_len(int af)
|
|||
return 128;
|
||||
case AF_INET:
|
||||
return 32;
|
||||
case AF_DECnet:
|
||||
return 16;
|
||||
case AF_IPX:
|
||||
return 80;
|
||||
case AF_MPLS:
|
||||
return 20;
|
||||
}
|
||||
|
|
@ -729,16 +725,6 @@ int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family)
|
|||
dst->bytelen = 16;
|
||||
memcpy(dst->data, data, 16);
|
||||
break;
|
||||
case 2:
|
||||
dst->family = AF_DECnet;
|
||||
dst->bytelen = 2;
|
||||
memcpy(dst->data, data, 2);
|
||||
break;
|
||||
case 10:
|
||||
dst->family = AF_IPX;
|
||||
dst->bytelen = 10;
|
||||
memcpy(dst->data, data, 10);
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -1029,8 +1015,6 @@ int read_family(const char *name)
|
|||
family = AF_INET6;
|
||||
else if (strcmp(name, "link") == 0)
|
||||
family = AF_PACKET;
|
||||
else if (strcmp(name, "ipx") == 0)
|
||||
family = AF_IPX;
|
||||
else if (strcmp(name, "mpls") == 0)
|
||||
family = AF_MPLS;
|
||||
else if (strcmp(name, "bridge") == 0)
|
||||
|
|
@ -1046,8 +1030,6 @@ const char *family_name(int family)
|
|||
return "inet6";
|
||||
if (family == AF_PACKET)
|
||||
return "link";
|
||||
if (family == AF_IPX)
|
||||
return "ipx";
|
||||
if (family == AF_MPLS)
|
||||
return "mpls";
|
||||
if (family == AF_BRIDGE)
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ bridge \- show / manipulate bridge addresses and devices
|
|||
\fB\-s\fR[\fItatistics\fR] |
|
||||
\fB\-n\fR[\fIetns\fR] name |
|
||||
\fB\-b\fR[\fIatch\fR] filename |
|
||||
\fB\-c\fR[\folor\fR] |
|
||||
\fB\-c\fR[\fIolor\fR] |
|
||||
\fB\-p\fR[\fIretty\fR] |
|
||||
\fB\-j\fR[\fIson\fR] |
|
||||
\fB\-o\fR[\fIneline\fr] }
|
||||
|
|
|
|||
|
|
@ -67,12 +67,12 @@ devlink-port \- devlink port configuration
|
|||
.ti -8
|
||||
.BR "devlink port function set "
|
||||
.IR DEV/PORT_INDEX
|
||||
.RI "{ "
|
||||
.RI "[ "
|
||||
.BR "hw_addr "
|
||||
.RI "ADDR }"
|
||||
.RI "{ "
|
||||
.BR "state"
|
||||
.RI "STATE }"
|
||||
.RI "ADDR ]"
|
||||
.RI "[ "
|
||||
.BR state " { " active " | " inactive " }"
|
||||
.RI "]"
|
||||
|
||||
.ti -8
|
||||
.BR "devlink port function rate "
|
||||
|
|
@ -160,7 +160,7 @@ Is an alias for
|
|||
.PP
|
||||
.B "DEV/PORT_INDEX"
|
||||
- specifies the devlink port index to use for the requested new port.
|
||||
This is optional. When ommited, driver allocates unique port index.
|
||||
This is optional. When omitted, driver allocates unique port index.
|
||||
|
||||
.TP
|
||||
.BR flavour " { " pcipf " | " pcisf " } "
|
||||
|
|
|
|||
|
|
@ -2391,7 +2391,7 @@ may be either
|
|||
.B 0
|
||||
to disable multicast routers on this port,
|
||||
.B 1
|
||||
to let the system detect the presence of of routers (this is the default),
|
||||
to let the system detect the presence of routers (this is the default),
|
||||
.B 2
|
||||
to permanently enable multicast traffic forwarding on this port or
|
||||
.B 3
|
||||
|
|
@ -2523,7 +2523,7 @@ specifies the master device which enslaves devices to show.
|
|||
.TP
|
||||
.BI vrf " NAME "
|
||||
.I NAME
|
||||
speficies the VRF which enslaves devices to show.
|
||||
specifies the VRF which enslaves devices to show.
|
||||
|
||||
.TP
|
||||
.BI type " TYPE "
|
||||
|
|
|
|||
|
|
@ -37,8 +37,6 @@ ip \- show / manipulate routing, network devices, interfaces and tunnels
|
|||
.BR inet " | " inet6 " | " link " } | "
|
||||
\fB-4\fR |
|
||||
\fB-6\fR |
|
||||
\fB-I\fR |
|
||||
\fB-D\fR |
|
||||
\fB-B\fR |
|
||||
\fB-0\fR |
|
||||
\fB-l\fR[\fIoops\fR] { \fBmaximum-addr-flush-attempts\fR } |
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ though inverses this behaviour: the offset is applied always, and
|
|||
will fall back to zero.
|
||||
.TP
|
||||
.BI hashkey " HASHKEY"
|
||||
Spefify what packet data to use to calculate a hash key for bucket lookup. The
|
||||
Specify what packet data to use to calculate a hash key for bucket lookup. The
|
||||
kernel adjusts the value according to the hash table's size. For this to work,
|
||||
the option
|
||||
.B link
|
||||
|
|
|
|||
|
|
@ -3404,13 +3404,13 @@ static int tcpdiag_send(int fd, int protocol, struct filter *f)
|
|||
struct iovec iov[3];
|
||||
int iovlen = 1;
|
||||
|
||||
if (protocol == IPPROTO_UDP || protocol == IPPROTO_MPTCP)
|
||||
return -1;
|
||||
|
||||
if (protocol == IPPROTO_TCP)
|
||||
req.nlh.nlmsg_type = TCPDIAG_GETSOCK;
|
||||
else
|
||||
else if (protocol == IPPROTO_DCCP)
|
||||
req.nlh.nlmsg_type = DCCPDIAG_GETSOCK;
|
||||
else
|
||||
return -1;
|
||||
|
||||
if (show_mem) {
|
||||
req.r.idiag_ext |= (1<<(INET_DIAG_MEMINFO-1));
|
||||
req.r.idiag_ext |= (1<<(INET_DIAG_SKMEMINFO-1));
|
||||
|
|
|
|||
11
tc/f_u32.c
11
tc/f_u32.c
|
|
@ -978,6 +978,13 @@ show_k:
|
|||
goto show_k;
|
||||
}
|
||||
|
||||
static __u32 u32_hash_fold(struct tc_u32_key *key)
|
||||
{
|
||||
__u8 fshift = key->mask ? ffs(ntohl(key->mask)) - 1 : 0;
|
||||
|
||||
return ntohl(key->val & key->mask) >> fshift;
|
||||
}
|
||||
|
||||
static int u32_parse_opt(struct filter_util *qu, char *handle,
|
||||
int argc, char **argv, struct nlmsghdr *n)
|
||||
{
|
||||
|
|
@ -1110,9 +1117,7 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
|
|||
}
|
||||
NEXT_ARG();
|
||||
}
|
||||
hash = sel2.keys[0].val & sel2.keys[0].mask;
|
||||
hash ^= hash >> 16;
|
||||
hash ^= hash >> 8;
|
||||
hash = u32_hash_fold(&sel2.keys[0]);
|
||||
htid = ((hash % divisor) << 12) | (htid & 0xFFF00000);
|
||||
sample_ok = 1;
|
||||
continue;
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ static int netem_parse_opt(struct qdisc_util *qu, int argc, char **argv,
|
|||
NEXT_ARG();
|
||||
++present[TCA_NETEM_CORR];
|
||||
if (get_percent(&cor.loss_corr, *argv)) {
|
||||
explain1("loss correllation");
|
||||
explain1("loss correlation");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue