]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Sun, 26 Jun 2022 17:13:08 +0000 (11:13 -0600)
committerDavid Ahern <dsahern@kernel.org>
Sun, 26 Jun 2022 17:13:08 +0000 (11:13 -0600)
Update kernel headers to commit:
    ebeae54d3a77 ("net: pcs: xpcs: depends on PHYLINK in Kconfig")

Signed-off-by: David Ahern <dsahern@kernel.org>
include/uapi/linux/bpf.h
include/uapi/linux/btf.h
include/uapi/linux/if_link.h

index 2892794fae0f86c2aa2b96c103d6b99fd7e8b204..7927de64893efbdfb1dc9048762d75d833b494ab 100644 (file)
@@ -3597,10 +3597,11 @@ union bpf_attr {
  *
  *             *iph* points to the start of the IPv4 or IPv6 header, while
  *             *iph_len* contains **sizeof**\ (**struct iphdr**) or
- *             **sizeof**\ (**struct ip6hdr**).
+ *             **sizeof**\ (**struct ipv6hdr**).
  *
  *             *th* points to the start of the TCP header, while *th_len*
- *             contains **sizeof**\ (**struct tcphdr**).
+ *             contains the length of the TCP header (at least
+ *             **sizeof**\ (**struct tcphdr**)).
  *     Return
  *             0 if *iph* and *th* are a valid SYN cookie ACK, or a negative
  *             error otherwise.
@@ -3783,10 +3784,11 @@ union bpf_attr {
  *
  *             *iph* points to the start of the IPv4 or IPv6 header, while
  *             *iph_len* contains **sizeof**\ (**struct iphdr**) or
- *             **sizeof**\ (**struct ip6hdr**).
+ *             **sizeof**\ (**struct ipv6hdr**).
  *
  *             *th* points to the start of the TCP header, while *th_len*
- *             contains the length of the TCP header.
+ *             contains the length of the TCP header with options (at least
+ *             **sizeof**\ (**struct tcphdr**)).
  *     Return
  *             On success, lower 32 bits hold the generated SYN cookie in
  *             followed by 16 bits which hold the MSS value for that cookie,
@@ -5249,6 +5251,80 @@ union bpf_attr {
  *             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.
+ *
+ * s64 bpf_tcp_raw_gen_syncookie_ipv4(struct iphdr *iph, struct tcphdr *th, u32 th_len)
+ *     Description
+ *             Try to issue a SYN cookie for the packet with corresponding
+ *             IPv4/TCP headers, *iph* and *th*, without depending on a
+ *             listening socket.
+ *
+ *             *iph* points to the IPv4 header.
+ *
+ *             *th* points to the start of the TCP header, while *th_len*
+ *             contains the length of the TCP header (at least
+ *             **sizeof**\ (**struct tcphdr**)).
+ *     Return
+ *             On success, lower 32 bits hold the generated SYN cookie in
+ *             followed by 16 bits which hold the MSS value for that cookie,
+ *             and the top 16 bits are unused.
+ *
+ *             On failure, the returned value is one of the following:
+ *
+ *             **-EINVAL** if *th_len* is invalid.
+ *
+ * s64 bpf_tcp_raw_gen_syncookie_ipv6(struct ipv6hdr *iph, struct tcphdr *th, u32 th_len)
+ *     Description
+ *             Try to issue a SYN cookie for the packet with corresponding
+ *             IPv6/TCP headers, *iph* and *th*, without depending on a
+ *             listening socket.
+ *
+ *             *iph* points to the IPv6 header.
+ *
+ *             *th* points to the start of the TCP header, while *th_len*
+ *             contains the length of the TCP header (at least
+ *             **sizeof**\ (**struct tcphdr**)).
+ *     Return
+ *             On success, lower 32 bits hold the generated SYN cookie in
+ *             followed by 16 bits which hold the MSS value for that cookie,
+ *             and the top 16 bits are unused.
+ *
+ *             On failure, the returned value is one of the following:
+ *
+ *             **-EINVAL** if *th_len* is invalid.
+ *
+ *             **-EPROTONOSUPPORT** if CONFIG_IPV6 is not builtin.
+ *
+ * long bpf_tcp_raw_check_syncookie_ipv4(struct iphdr *iph, struct tcphdr *th)
+ *     Description
+ *             Check whether *iph* and *th* contain a valid SYN cookie ACK
+ *             without depending on a listening socket.
+ *
+ *             *iph* points to the IPv4 header.
+ *
+ *             *th* points to the TCP header.
+ *     Return
+ *             0 if *iph* and *th* are a valid SYN cookie ACK.
+ *
+ *             On failure, the returned value is one of the following:
+ *
+ *             **-EACCES** if the SYN cookie is not valid.
+ *
+ * long bpf_tcp_raw_check_syncookie_ipv6(struct ipv6hdr *iph, struct tcphdr *th)
+ *     Description
+ *             Check whether *iph* and *th* contain a valid SYN cookie ACK
+ *             without depending on a listening socket.
+ *
+ *             *iph* points to the IPv6 header.
+ *
+ *             *th* points to the TCP header.
+ *     Return
+ *             0 if *iph* and *th* are a valid SYN cookie ACK.
+ *
+ *             On failure, the returned value is one of the following:
+ *
+ *             **-EACCES** if the SYN cookie is not valid.
+ *
+ *             **-EPROTONOSUPPORT** if CONFIG_IPV6 is not builtin.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -5455,6 +5531,10 @@ union bpf_attr {
        FN(dynptr_read),                \
        FN(dynptr_write),               \
        FN(dynptr_data),                \
+       FN(tcp_raw_gen_syncookie_ipv4), \
+       FN(tcp_raw_gen_syncookie_ipv6), \
+       FN(tcp_raw_check_syncookie_ipv4),       \
+       FN(tcp_raw_check_syncookie_ipv6),       \
        /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
index aa0f4a3efd3c775dc50d2f61284ea6fe02e2f7bf..426daf5aa61804ec98deeca3532c20cea0adf7d0 100644 (file)
@@ -36,10 +36,10 @@ struct btf_type {
         * bits 24-28: kind (e.g. int, ptr, array...etc)
         * bits 29-30: unused
         * bit     31: kind_flag, currently used by
-        *             struct, union and fwd
+        *             struct, union, enum, fwd and enum64
         */
        __u32 info;
-       /* "size" is used by INT, ENUM, STRUCT, UNION and DATASEC.
+       /* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64.
         * "size" tells the size of the type it is describing.
         *
         * "type" is used by PTR, TYPEDEF, VOLATILE, CONST, RESTRICT,
@@ -63,7 +63,7 @@ enum {
        BTF_KIND_ARRAY          = 3,    /* Array        */
        BTF_KIND_STRUCT         = 4,    /* Struct       */
        BTF_KIND_UNION          = 5,    /* Union        */
-       BTF_KIND_ENUM           = 6,    /* Enumeration  */
+       BTF_KIND_ENUM           = 6,    /* Enumeration up to 32-bit values */
        BTF_KIND_FWD            = 7,    /* Forward      */
        BTF_KIND_TYPEDEF        = 8,    /* Typedef      */
        BTF_KIND_VOLATILE       = 9,    /* Volatile     */
@@ -76,6 +76,7 @@ enum {
        BTF_KIND_FLOAT          = 16,   /* Floating point       */
        BTF_KIND_DECL_TAG       = 17,   /* Decl Tag */
        BTF_KIND_TYPE_TAG       = 18,   /* Type Tag */
+       BTF_KIND_ENUM64         = 19,   /* Enumeration up to 64-bit values */
 
        NR_BTF_KINDS,
        BTF_KIND_MAX            = NR_BTF_KINDS - 1,
@@ -186,4 +187,14 @@ struct btf_decl_tag {
        __s32   component_idx;
 };
 
+/* BTF_KIND_ENUM64 is followed by multiple "struct btf_enum64".
+ * The exact number of btf_enum64 is stored in the vlen (of the
+ * info in "struct btf_type").
+ */
+struct btf_enum64 {
+       __u32   name_off;
+       __u32   val_lo32;
+       __u32   val_hi32;
+};
+
 #endif /* __LINUX_BTF_H__ */
index da99b643724f978be1d3ee8656d87df3bd87685e..e0fbbfeeb3a16eab83a34db73659d945e98b5ec6 100644 (file)
@@ -961,6 +961,7 @@ enum {
        IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
        IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
        IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
+       IFLA_BOND_SLAVE_PRIO,
        __IFLA_BOND_SLAVE_MAX,
 };