]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
uapi: update kernel headers to 5.13-rc6
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 17 Jun 2021 22:54:05 +0000 (15:54 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 17 Jun 2021 22:54:05 +0000 (15:54 -0700)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h
include/uapi/linux/if_bonding.h
include/uapi/linux/if_link.h
include/uapi/linux/seg6_local.h
include/uapi/linux/virtio_ids.h

index 793655ed429eda6ebcd99a475bd7f5b1f16b741a..33abd855c6f32ed2cbb0a0744dcf70e39df50d45 100644 (file)
@@ -312,6 +312,27 @@ union bpf_iter_link_info {
  *             *ctx_out*, *data_out* (for example, packet data), result of the
  *             execution *retval*, and *duration* of the test run.
  *
+ *             The sizes of the buffers provided as input and output
+ *             parameters *ctx_in*, *ctx_out*, *data_in*, and *data_out* must
+ *             be provided in the corresponding variables *ctx_size_in*,
+ *             *ctx_size_out*, *data_size_in*, and/or *data_size_out*. If any
+ *             of these parameters are not provided (ie set to NULL), the
+ *             corresponding size field must be zero.
+ *
+ *             Some program types have particular requirements:
+ *
+ *             **BPF_PROG_TYPE_SK_LOOKUP**
+ *                     *data_in* and *data_out* must be NULL.
+ *
+ *             **BPF_PROG_TYPE_XDP**
+ *                     *ctx_in* and *ctx_out* must be NULL.
+ *
+ *             **BPF_PROG_TYPE_RAW_TRACEPOINT**,
+ *             **BPF_PROG_TYPE_RAW_TRACEPOINT_WRITABLE**
+ *
+ *                     *ctx_out*, *data_in* and *data_out* must be NULL.
+ *                     *repeat* must be zero.
+ *
  *     Return
  *             Returns zero on success. On error, -1 is returned and *errno*
  *             is set appropriately.
@@ -4061,12 +4082,20 @@ union bpf_attr {
  *             of new data availability is sent.
  *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
  *             of new data availability is sent unconditionally.
+ *             If **0** is specified in *flags*, an adaptive notification
+ *             of new data availability is sent.
+ *
+ *             An adaptive notification is a notification sent whenever the user-space
+ *             process has caught up and consumed all available payloads. In case the user-space
+ *             process is still processing a previous payload, then no notification is needed
+ *             as it will process the newly added payload automatically.
  *     Return
  *             0 on success, or a negative error in case of failure.
  *
  * void *bpf_ringbuf_reserve(void *ringbuf, u64 size, u64 flags)
  *     Description
  *             Reserve *size* bytes of payload in a ring buffer *ringbuf*.
+ *             *flags* must be 0.
  *     Return
  *             Valid pointer with *size* bytes of memory available; NULL,
  *             otherwise.
@@ -4078,6 +4107,10 @@ union bpf_attr {
  *             of new data availability is sent.
  *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
  *             of new data availability is sent unconditionally.
+ *             If **0** is specified in *flags*, an adaptive notification
+ *             of new data availability is sent.
+ *
+ *             See 'bpf_ringbuf_output()' for the definition of adaptive notification.
  *     Return
  *             Nothing. Always succeeds.
  *
@@ -4088,6 +4121,10 @@ union bpf_attr {
  *             of new data availability is sent.
  *             If **BPF_RB_FORCE_WAKEUP** is specified in *flags*, notification
  *             of new data availability is sent unconditionally.
+ *             If **0** is specified in *flags*, an adaptive notification
+ *             of new data availability is sent.
+ *
+ *             See 'bpf_ringbuf_output()' for the definition of adaptive notification.
  *     Return
  *             Nothing. Always succeeds.
  *
@@ -4671,6 +4708,33 @@ union bpf_attr {
  *     Return
  *             The number of traversed map elements for success, **-EINVAL** for
  *             invalid **flags**.
+ *
+ * long bpf_snprintf(char *str, u32 str_size, const char *fmt, u64 *data, u32 data_len)
+ *     Description
+ *             Outputs a string into the **str** buffer of size **str_size**
+ *             based on a format string stored in a read-only map pointed by
+ *             **fmt**.
+ *
+ *             Each format specifier in **fmt** corresponds to one u64 element
+ *             in the **data** array. For strings and pointers where pointees
+ *             are accessed, only the pointer values are stored in the *data*
+ *             array. The *data_len* is the size of *data* in bytes.
+ *
+ *             Formats **%s** and **%p{i,I}{4,6}** require to read kernel
+ *             memory. Reading kernel memory may fail due to either invalid
+ *             address or valid address but requiring a major memory fault. If
+ *             reading kernel memory fails, the string for **%s** will be an
+ *             empty string, and the ip address for **%p{i,I}{4,6}** will be 0.
+ *             Not returning error to bpf program is consistent with what
+ *             **bpf_trace_printk**\ () does for now.
+ *
+ *     Return
+ *             The strictly positive length of the formatted string, including
+ *             the trailing zero character. If the return value is greater than
+ *             **str_size**, **str** contains a truncated string, guaranteed to
+ *             be zero-terminated except when **str_size** is 0.
+ *
+ *             Or **-EBUSY** if the per-CPU memory copy buffer is busy.
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -4838,6 +4902,7 @@ union bpf_attr {
        FN(sock_from_file),             \
        FN(check_mtu),                  \
        FN(for_each_map_elem),          \
+       FN(snprintf),                   \
        /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
@@ -5379,6 +5444,8 @@ struct bpf_link_info {
                } raw_tracepoint;
                struct {
                        __u32 attach_type;
+                       __u32 target_obj_id; /* prog_id for PROG_EXT, otherwise btf object id */
+                       __u32 target_btf_id; /* BTF type id inside the object */
                } tracing;
                struct {
                        __u64 cgroup_id;
index e8eb4ad03cf18e3b8ed083fd2600f3770e387d42..d174914a837dbfaa55409dfe682eec3148bb53a0 100644 (file)
@@ -153,14 +153,3 @@ enum {
 #define BOND_3AD_STAT_MAX (__BOND_3AD_STAT_MAX - 1)
 
 #endif /* _LINUX_IF_BONDING_H */
-
-/*
- * Local variables:
- *  version-control: t
- *  kept-new-versions: 5
- *  c-indent-level: 8
- *  c-basic-offset: 8
- *  tab-width: 8
- * End:
- */
-
index 50193377e5e40e54cf33f0052b0914e868e1f151..0e81707a96371029dc9a222a629191b52b021b9f 100644 (file)
@@ -612,6 +612,7 @@ enum macvlan_macaddr_mode {
 };
 
 #define MACVLAN_FLAG_NOPROMISC 1
+#define MACVLAN_FLAG_NODST     2 /* skip dst macvlan if matching src macvlan */
 
 /* VRF section */
 enum {
index bb5c8ddfcec52f06412fc7aedf69ef360698fc2f..859555149cf00cb029eb96754a56ee7d60980f56 100644 (file)
@@ -27,6 +27,7 @@ enum {
        SEG6_LOCAL_OIF,
        SEG6_LOCAL_BPF,
        SEG6_LOCAL_VRFTABLE,
+       SEG6_LOCAL_COUNTERS,
        __SEG6_LOCAL_MAX,
 };
 #define SEG6_LOCAL_MAX (__SEG6_LOCAL_MAX - 1)
@@ -78,4 +79,33 @@ enum {
 
 #define SEG6_LOCAL_BPF_PROG_MAX (__SEG6_LOCAL_BPF_PROG_MAX - 1)
 
+/* SRv6 Behavior counters are encoded as netlink attributes guaranteeing the
+ * correct alignment.
+ * Each counter is identified by a different attribute type (i.e.
+ * SEG6_LOCAL_CNT_PACKETS).
+ *
+ * - SEG6_LOCAL_CNT_PACKETS: identifies a counter that counts the number of
+ *   packets that have been CORRECTLY processed by an SRv6 Behavior instance
+ *   (i.e., packets that generate errors or are dropped are NOT counted).
+ *
+ * - SEG6_LOCAL_CNT_BYTES: identifies a counter that counts the total amount
+ *   of traffic in bytes of all packets that have been CORRECTLY processed by
+ *   an SRv6 Behavior instance (i.e., packets that generate errors or are
+ *   dropped are NOT counted).
+ *
+ * - SEG6_LOCAL_CNT_ERRORS: identifies a counter that counts the number of
+ *   packets that have NOT been properly processed by an SRv6 Behavior instance
+ *   (i.e., packets that generate errors or are dropped).
+ */
+enum {
+       SEG6_LOCAL_CNT_UNSPEC,
+       SEG6_LOCAL_CNT_PAD,             /* pad for 64 bits values */
+       SEG6_LOCAL_CNT_PACKETS,
+       SEG6_LOCAL_CNT_BYTES,
+       SEG6_LOCAL_CNT_ERRORS,
+       __SEG6_LOCAL_CNT_MAX,
+};
+
+#define SEG6_LOCAL_CNT_MAX (__SEG6_LOCAL_CNT_MAX - 1)
+
 #endif
index bc1c0621f5edd18ee6e3c9328f4d8d815d51dc65..4fe842c3a3a9847ab102dd73f4b0d1134cc2abdf 100644 (file)
 #define VIRTIO_ID_PSTORE               22 /* virtio pstore device */
 #define VIRTIO_ID_IOMMU                        23 /* virtio IOMMU */
 #define VIRTIO_ID_MEM                  24 /* virtio mem */
+#define VIRTIO_ID_SOUND                        25 /* virtio sound */
 #define VIRTIO_ID_FS                   26 /* virtio filesystem */
 #define VIRTIO_ID_PMEM                 27 /* virtio pmem */
 #define VIRTIO_ID_MAC80211_HWSIM       29 /* virtio mac80211-hwsim */
+#define VIRTIO_ID_BT                   40 /* virtio bluetooth */
 
 #endif /* _LINUX_VIRTIO_IDS_H */