]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 27 May 2022 00:09:59 +0000 (17:09 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 27 May 2022 00:09:59 +0000 (17:09 -0700)
1  2 
devlink/devlink.c
include/uapi/linux/bpf.h
include/uapi/linux/if_link.h
include/uapi/linux/tls.h
include/uapi/linux/types.h
ip/iplink.c

Simple merge
index 5889a4d30ab3ad4012499fde0c311c89c4ff0472,1fc94c09df3c5e24bd63c3c73c51ae309d01acfd..2892794fae0f86c2aa2b96c103d6b99fd7e8b204
@@@ -1013,6 -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 -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;
  
   *            The **hash_algo** is returned on success,
   *            **-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if
   *            invalid arguments are passed.
+  *
+  * void *bpf_kptr_xchg(void *map_value, void *ptr)
+  *    Description
+  *            Exchange kptr at pointer *map_value* with *ptr*, and return the
+  *            old value. *ptr* can be NULL, otherwise it must be a referenced
+  *            pointer which will be released when this helper is called.
+  *    Return
+  *            The old value of kptr (which can be NULL). The returned pointer
+  *            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),                     \
        FN(copy_from_user_task),        \
        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
@@@ -5592,6 -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.
@@@ -6486,6 -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.
index 22e21e57afc942f66e69fba4dda6807f8fa85421,34002e72d10ae3be9f71fde1e9e5817b9d56dadc..da99b643724f978be1d3ee8656d87df3bd87685e
@@@ -363,6 -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
  };
index 3ad54af2101a03d9cbb52f8991c5ad24b204ec9b,3ad54af2101a03d9cbb52f8991c5ad24b204ec9b..83a3cea46cece93c15752fd89cc85c72b33811e6
@@@ -39,6 -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 -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)
index 7f957444ccba0022b3ab4ef49686a8f8c7b0e221,7f957444ccba0022b3ab4ef49686a8f8c7b0e221..6546100a69f2419d841ac2241ca1df8bc5c5b11c
@@@ -21,6 -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 --cc ip/iplink.c
Simple merge