aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@kernel.org>2022-05-30 09:51:08 -0600
committerDavid Ahern <dsahern@kernel.org>2022-05-30 09:51:08 -0600
commit555a7750128a2c618587715fbad141f6750a4d06 (patch)
tree5174bcbb5f5a80f19328ae69ebae412e8a4c2978
parent8d3977ef8193f976a0905d5ff054869f0d5ebc11 (diff)
parentb1521ec002e1d2c72404aa9e4d7734c541260a7c (diff)
downloadiproute2-555a7750128a2c618587715fbad141f6750a4d06.tar.gz
Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r--devlink/devlink.c25
-rw-r--r--doc/actions/actions-general2
-rw-r--r--include/uapi/linux/bpf.h113
-rw-r--r--include/uapi/linux/if_link.h2
-rw-r--r--include/uapi/linux/tls.h2
-rw-r--r--include/uapi/linux/types.h3
-rw-r--r--include/version.h2
-rw-r--r--ip/iplink.c3
-rw-r--r--man/man8/dcb-app.82
-rw-r--r--man/man8/dcb-dcbx.82
-rw-r--r--man/man8/devlink-dev.82
-rw-r--r--man/man8/devlink-region.82
-rw-r--r--man/man8/tc-bpf.82
-rw-r--r--man/man8/tc-ctinfo.82
-rw-r--r--man/man8/tc-netem.84
-rw-r--r--man/man8/tc-pedit.82
-rw-r--r--man/man8/tc-skbmod.82
-rw-r--r--man/man8/tc-vlan.82
-rw-r--r--man/man8/tc.82
-rw-r--r--tc/em_u32.c2
-rw-r--r--tipc/misc.c5
21 files changed, 155 insertions, 28 deletions
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 7ace968ca..ddf430bbb 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -8529,6 +8529,23 @@ static void cmd_health_help(void)
pr_err(" [ auto_dump { true | false } ]\n");
}
+static int cmd_health_dump(struct dl *dl)
+{
+ if (dl_argv_match(dl, "help")) {
+ cmd_health_help();
+ return 0;
+ } else if (dl_argv_match(dl, "show") ||
+ dl_argv_match(dl, "list") || dl_no_arg(dl)) {
+ dl_arg_inc(dl);
+ return cmd_health_dump_show(dl);
+ } else if (dl_argv_match(dl, "clear")) {
+ dl_arg_inc(dl);
+ return cmd_health_dump_clear(dl);
+ }
+ pr_err("Command \"%s\" not found\n", dl_argv(dl));
+ return -ENOENT;
+}
+
static int cmd_health(struct dl *dl)
{
if (dl_argv_match(dl, "help")) {
@@ -8549,13 +8566,7 @@ static int cmd_health(struct dl *dl)
return cmd_health_test(dl);
} else if (dl_argv_match(dl, "dump")) {
dl_arg_inc(dl);
- if (dl_argv_match(dl, "show")) {
- dl_arg_inc(dl);
- return cmd_health_dump_show(dl);
- } else if (dl_argv_match(dl, "clear")) {
- dl_arg_inc(dl);
- return cmd_health_dump_clear(dl);
- }
+ return cmd_health_dump(dl);
} else if (dl_argv_match(dl, "set")) {
dl_arg_inc(dl);
return cmd_health_set_params(dl);
diff --git a/doc/actions/actions-general b/doc/actions/actions-general
index 407a514ca..a0074a58c 100644
--- a/doc/actions/actions-general
+++ b/doc/actions/actions-general
@@ -72,7 +72,7 @@ action police mtu 4000 rate 1500kbit burst 90k
2)In order to take advantage of some of the targets written by the
iptables people, a classifier can have a packet being massaged by an
iptable target. I have only tested with mangler targets up to now.
-(infact anything that is not in the mangling table is disabled right now)
+(in fact anything that is not in the mangling table is disabled right now)
In terms of hooks:
*ingress is mapped to pre-routing hook
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 1fc94c09d..2892794fa 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1013,6 +1013,7 @@ enum bpf_link_type {
BPF_LINK_TYPE_XDP = 6,
BPF_LINK_TYPE_PERF_EVENT = 7,
BPF_LINK_TYPE_KPROBE_MULTI = 8,
+ BPF_LINK_TYPE_STRUCT_OPS = 9,
MAX_BPF_LINK_TYPE,
};
@@ -1489,6 +1490,15 @@ union bpf_attr {
__aligned_u64 addrs;
__aligned_u64 cookies;
} kprobe_multi;
+ struct {
+ /* this is overlaid with the target_btf_id above. */
+ __u32 target_btf_id;
+ /* black box user-provided value passed through
+ * to BPF program at the execution time and
+ * accessible through bpf_get_attach_cookie() BPF helper
+ */
+ __u64 cookie;
+ } tracing;
};
} link_create;
@@ -5154,6 +5164,91 @@ union bpf_attr {
* if not NULL, is a reference which must be released using its
* corresponding release function, or moved into a BPF map before
* program exit.
+ *
+ * void *bpf_map_lookup_percpu_elem(struct bpf_map *map, const void *key, u32 cpu)
+ * Description
+ * Perform a lookup in *percpu map* for an entry associated to
+ * *key* on *cpu*.
+ * Return
+ * Map value associated to *key* on *cpu*, or **NULL** if no entry
+ * was found or *cpu* is invalid.
+ *
+ * struct mptcp_sock *bpf_skc_to_mptcp_sock(void *sk)
+ * Description
+ * Dynamically cast a *sk* pointer to a *mptcp_sock* pointer.
+ * Return
+ * *sk* if casting is valid, or **NULL** otherwise.
+ *
+ * long bpf_dynptr_from_mem(void *data, u32 size, u64 flags, struct bpf_dynptr *ptr)
+ * Description
+ * Get a dynptr to local memory *data*.
+ *
+ * *data* must be a ptr to a map value.
+ * The maximum *size* supported is DYNPTR_MAX_SIZE.
+ * *flags* is currently unused.
+ * Return
+ * 0 on success, -E2BIG if the size exceeds DYNPTR_MAX_SIZE,
+ * -EINVAL if flags is not 0.
+ *
+ * long bpf_ringbuf_reserve_dynptr(void *ringbuf, u32 size, u64 flags, struct bpf_dynptr *ptr)
+ * Description
+ * Reserve *size* bytes of payload in a ring buffer *ringbuf*
+ * through the dynptr interface. *flags* must be 0.
+ *
+ * Please note that a corresponding bpf_ringbuf_submit_dynptr or
+ * bpf_ringbuf_discard_dynptr must be called on *ptr*, even if the
+ * reservation fails. This is enforced by the verifier.
+ * Return
+ * 0 on success, or a negative error in case of failure.
+ *
+ * void bpf_ringbuf_submit_dynptr(struct bpf_dynptr *ptr, u64 flags)
+ * Description
+ * Submit reserved ring buffer sample, pointed to by *data*,
+ * through the dynptr interface. This is a no-op if the dynptr is
+ * invalid/null.
+ *
+ * For more information on *flags*, please see
+ * 'bpf_ringbuf_submit'.
+ * Return
+ * Nothing. Always succeeds.
+ *
+ * void bpf_ringbuf_discard_dynptr(struct bpf_dynptr *ptr, u64 flags)
+ * Description
+ * Discard reserved ring buffer sample through the dynptr
+ * interface. This is a no-op if the dynptr is invalid/null.
+ *
+ * For more information on *flags*, please see
+ * 'bpf_ringbuf_discard'.
+ * Return
+ * Nothing. Always succeeds.
+ *
+ * long bpf_dynptr_read(void *dst, u32 len, struct bpf_dynptr *src, u32 offset)
+ * Description
+ * Read *len* bytes from *src* into *dst*, starting from *offset*
+ * into *src*.
+ * Return
+ * 0 on success, -E2BIG if *offset* + *len* exceeds the length
+ * of *src*'s data, -EINVAL if *src* is an invalid dynptr.
+ *
+ * long bpf_dynptr_write(struct bpf_dynptr *dst, u32 offset, void *src, u32 len)
+ * Description
+ * Write *len* bytes from *src* into *dst*, starting from *offset*
+ * into *dst*.
+ * Return
+ * 0 on success, -E2BIG if *offset* + *len* exceeds the length
+ * of *dst*'s data, -EINVAL if *dst* is an invalid dynptr or if *dst*
+ * is a read-only dynptr.
+ *
+ * void *bpf_dynptr_data(struct bpf_dynptr *ptr, u32 offset, u32 len)
+ * Description
+ * Get a pointer to the underlying dynptr data.
+ *
+ * *len* must be a statically known value. The returned data slice
+ * is invalidated whenever the dynptr is invalidated.
+ * Return
+ * Pointer to the underlying dynptr data, NULL if the dynptr is
+ * read-only, if the dynptr is invalid, or if the offset and length
+ * is out of bounds.
*/
#define __BPF_FUNC_MAPPER(FN) \
FN(unspec), \
@@ -5351,6 +5446,15 @@ union bpf_attr {
FN(skb_set_tstamp), \
FN(ima_file_hash), \
FN(kptr_xchg), \
+ FN(map_lookup_percpu_elem), \
+ FN(skc_to_mptcp_sock), \
+ FN(dynptr_from_mem), \
+ FN(ringbuf_reserve_dynptr), \
+ FN(ringbuf_submit_dynptr), \
+ FN(ringbuf_discard_dynptr), \
+ FN(dynptr_read), \
+ FN(dynptr_write), \
+ FN(dynptr_data), \
/* */
/* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -5604,6 +5708,10 @@ struct bpf_tunnel_key {
__u8 tunnel_ttl;
__u16 tunnel_ext; /* Padding, future use. */
__u32 tunnel_label;
+ union {
+ __u32 local_ipv4;
+ __u32 local_ipv6[4];
+ };
};
/* user accessible mirror of in-kernel xfrm_state.
@@ -6498,6 +6606,11 @@ struct bpf_timer {
__u64 :64;
} __attribute__((aligned(8)));
+struct bpf_dynptr {
+ __u64 :64;
+ __u64 :64;
+} __attribute__((aligned(8)));
+
struct bpf_sysctl {
__u32 write; /* Sysctl is being read (= 0) or written (= 1).
* Allows 1,2,4-byte read, but no write.
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index 34002e72d..da99b6437 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -368,6 +368,8 @@ enum {
IFLA_PARENT_DEV_NAME,
IFLA_PARENT_DEV_BUS_NAME,
IFLA_GRO_MAX_SIZE,
+ IFLA_TSO_MAX_SIZE,
+ IFLA_TSO_MAX_SEGS,
__IFLA_MAX
};
diff --git a/include/uapi/linux/tls.h b/include/uapi/linux/tls.h
index 3ad54af21..83a3cea46 100644
--- a/include/uapi/linux/tls.h
+++ b/include/uapi/linux/tls.h
@@ -39,6 +39,7 @@
/* TLS socket options */
#define TLS_TX 1 /* Set transmit parameters */
#define TLS_RX 2 /* Set receive parameters */
+#define TLS_TX_ZEROCOPY_SENDFILE 3 /* transmit zerocopy sendfile */
/* Supported versions */
#define TLS_VERSION_MINOR(ver) ((ver) & 0xFF)
@@ -160,6 +161,7 @@ enum {
TLS_INFO_CIPHER,
TLS_INFO_TXCONF,
TLS_INFO_RXCONF,
+ TLS_INFO_ZC_SENDFILE,
__TLS_INFO_MAX,
};
#define TLS_INFO_MAX (__TLS_INFO_MAX - 1)
diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index 7f957444c..6546100a6 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -21,6 +21,9 @@
#define __bitwise
#endif
+/* The kernel doesn't use this legacy form, but user space does */
+#define __bitwise__ __bitwise
+
typedef __u16 __bitwise __le16;
typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
diff --git a/include/version.h b/include/version.h
index 1ced1c5eb..db39d7fea 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1 +1 @@
-static const char version[] = "5.17.0";
+static const char version[] = "5.18.0";
diff --git a/ip/iplink.c b/ip/iplink.c
index fbdf542ae..c64721bc6 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -35,9 +35,6 @@
#define IPLINK_IOCTL_COMPAT 1
-#ifndef GSO_MAX_SIZE
-#define GSO_MAX_SIZE 65536
-#endif
#ifndef GSO_MAX_SEGS
#define GSO_MAX_SEGS 65535
#endif
diff --git a/man/man8/dcb-app.8 b/man/man8/dcb-app.8
index 23fd33746..9780fe4b6 100644
--- a/man/man8/dcb-app.8
+++ b/man/man8/dcb-app.8
@@ -170,7 +170,7 @@ priorities that should be assigned to matching traffic.
\fIDSCP-MAP\fR uses the array parameter syntax, see
.BR dcb (8)
for details. Keys are DSCP points, values are priorities assigned to
-traffic with matching DSCP. DSCP points can be written either direcly as
+traffic with matching DSCP. DSCP points can be written either directly as
numeric values, or using symbolic names specified in
.B /etc/iproute2/rt_dsfield
(however note that that file specifies full 8-bit dsfield values, whereas
diff --git a/man/man8/dcb-dcbx.8 b/man/man8/dcb-dcbx.8
index 52133e348..bafc18f6e 100644
--- a/man/man8/dcb-dcbx.8
+++ b/man/man8/dcb-dcbx.8
@@ -67,7 +67,7 @@ allows setting both and lets the driver handle it as appropriate.
.B cee
.TQ
.B ieee
-The device supports CEE (Converged Enhanced Ethernet) and, respecively, IEEE
+The device supports CEE (Converged Enhanced Ethernet) and, respectively, IEEE
version of the DCB specification. Typically only one of these will be set, but
.B dcb dcbx
does not mandate this.
diff --git a/man/man8/devlink-dev.8 b/man/man8/devlink-dev.8
index 22735dc1f..6906e5094 100644
--- a/man/man8/devlink-dev.8
+++ b/man/man8/devlink-dev.8
@@ -199,7 +199,7 @@ pending this action will reload current firmware image.
.B limit no_reset
- Specifies limitation on reload action.
-If this argument is omitted limit is unspecificed and the reload action is not
+If this argument is omitted limit is unspecified and the reload action is not
limited. In such case driver implementation may include reset or downtime as
needed to perform the actions.
diff --git a/man/man8/devlink-region.8 b/man/man8/devlink-region.8
index c67565660..e6617c189 100644
--- a/man/man8/devlink-region.8
+++ b/man/man8/devlink-region.8
@@ -116,7 +116,7 @@ devlink region dump pci/0000:00:05.0/cr-space snapshot 1
Dump the snapshot taken from cr-space address region with ID 1
.RE
.PP
-devlink region read pci/0000:00:05.0/cr-space snapshot 1 address 0x10 legth 16
+devlink region read pci/0000:00:05.0/cr-space snapshot 1 address 0x10 length 16
.RS 4
Read from address 0x10, 16 Bytes of snapshot ID 1 taken from cr-space address region
.RE
diff --git a/man/man8/tc-bpf.8 b/man/man8/tc-bpf.8
index e4f68aaa7..01230ce6d 100644
--- a/man/man8/tc-bpf.8
+++ b/man/man8/tc-bpf.8
@@ -217,7 +217,7 @@ identifiers which would need to reparse packet contents.
.SS bytecode
is being used for loading cBPF classifier and actions only. The cBPF bytecode
is directly passed as a text string in the form of
-.B \'s,c t f k,c t f k,c t f k,...\'
+.B \(aqs,c t f k,c t f k,c t f k,...'
, where
.B s
denotes the number of subsequent 4-tuples. One such 4-tuple consists of
diff --git a/man/man8/tc-ctinfo.8 b/man/man8/tc-ctinfo.8
index 5b761a8f8..efa2eecaa 100644
--- a/man/man8/tc-ctinfo.8
+++ b/man/man8/tc-ctinfo.8
@@ -58,7 +58,7 @@ Specify the conntrack zone when doing conntrack lookups for packets.
zone is a 16bit unsigned decimal value.
Default is 0.
.IP CONTROL
-The following keywords allow to control how the tree of qdisc, classes,
+The following keywords allow one to control how the tree of qdisc, classes,
filters and actions is further traversed after this action.
.RS
.TP
diff --git a/man/man8/tc-netem.8 b/man/man8/tc-netem.8
index 63ccc2a3d..217758541 100644
--- a/man/man8/tc-netem.8
+++ b/man/man8/tc-netem.8
@@ -67,7 +67,7 @@ NetEm \- Network Emulator
.SH DESCRIPTION
NetEm is an enhancement of the Linux traffic control facilities
-that allow to add delay, packet loss, duplication and more other
+that allow one to add delay, packet loss, duplication and more other
characteristics to packets outgoing from a selected network
interface. NetEm is built using the existing Quality Of Service (QOS)
and Differentiated Services (diffserv) facilities in the Linux
@@ -87,7 +87,7 @@ Delay and jitter values are expressed in ms while correlation is percentage.
.SS distribution
allow the user to choose the delay distribution. If not specified, the default
-distribution is Normal. Additional parameters allow to consider situations in
+distribution is Normal. Additional parameters allow one to consider situations in
which network has variable delays depending on traffic flows concurring on the
same path, that causes several delay peaks and a tail.
diff --git a/man/man8/tc-pedit.8 b/man/man8/tc-pedit.8
index b9d5a44bc..2ea42929e 100644
--- a/man/man8/tc-pedit.8
+++ b/man/man8/tc-pedit.8
@@ -304,7 +304,7 @@ allows one to exclude bits from being changed. Supported only for 32 bits fields
or smaller.
.TP
.I CONTROL
-The following keywords allow to control how the tree of qdisc, classes,
+The following keywords allow one to control how the tree of qdisc, classes,
filters and actions is further traversed after this action.
.RS
.TP
diff --git a/man/man8/tc-skbmod.8 b/man/man8/tc-skbmod.8
index 52eaf989e..646a7e63d 100644
--- a/man/man8/tc-skbmod.8
+++ b/man/man8/tc-skbmod.8
@@ -63,7 +63,7 @@ Used to mark ECN Capable Transport (ECT) IP packets as Congestion Encountered (C
Does not affect Non ECN-Capable Transport (Non-ECT) packets.
.TP
.I CONTROL
-The following keywords allow to control how the tree of qdisc, classes,
+The following keywords allow one to control how the tree of qdisc, classes,
filters and actions is further traversed after this action.
.RS
.TP
diff --git a/man/man8/tc-vlan.8 b/man/man8/tc-vlan.8
index eee663fab..e199c9ae5 100644
--- a/man/man8/tc-vlan.8
+++ b/man/man8/tc-vlan.8
@@ -45,7 +45,7 @@ outer-most VLAN encapsulation. The
.IR PUSH " and " MODIFY
modes require at least a
.I VLANID
-and allow to optionally choose the
+and allow one to optionally choose the
.I VLANPROTO
to use.
diff --git a/man/man8/tc.8 b/man/man8/tc.8
index 4338572a3..d9d80964a 100644
--- a/man/man8/tc.8
+++ b/man/man8/tc.8
@@ -343,7 +343,7 @@ band is not stopped prior to dequeuing a packet.
.TP
netem
Network Emulator is an enhancement of the Linux traffic control facilities that
-allow to add delay, packet loss, duplication and more other characteristics to
+allow one to add delay, packet loss, duplication and more other characteristics to
packets outgoing from a selected network interface.
.TP
pfifo_fast
diff --git a/tc/em_u32.c b/tc/em_u32.c
index bc284af4f..ea2bf882a 100644
--- a/tc/em_u32.c
+++ b/tc/em_u32.c
@@ -84,7 +84,7 @@ static int u32_parse_eopt(struct nlmsghdr *n, struct tcf_ematch_hdr *hdr,
char buf[a->len - nh_len + 1];
offmask = -1;
- memcpy(buf, a->data + nh_len, a->len - nh_len);
+ strncpy(buf, a->data + nh_len, a->len - nh_len + 1);
offset = strtoul(buf, NULL, 0);
} else if (!bstrcmp(a, "nexthdr+")) {
a = bstr_next(a);
diff --git a/tipc/misc.c b/tipc/misc.c
index 909975d8b..6175bf07d 100644
--- a/tipc/misc.c
+++ b/tipc/misc.c
@@ -113,16 +113,15 @@ int str2key(char *str, struct tipc_aead_key *key)
}
}
- if (len > TIPC_AEAD_KEYLEN_MAX)
+ key->keylen = ishex ? (len + 1) / 2 : len;
+ if (key->keylen > TIPC_AEAD_KEYLEN_MAX)
return -1;
/* Obtain key: */
if (!ishex) {
- key->keylen = len;
memcpy(key->key, str, len);
} else {
/* Convert hex string to key */
- key->keylen = (len + 1) / 2;
for (i = 0; i < key->keylen; i++) {
if (i == 0 && len % 2 != 0) {
if (sscanf(str, "%1hhx", &key->key[0]) != 1)