]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
basic/linux: update linux uapi headers
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Jan 2023 11:37:49 +0000 (12:37 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 25 Jan 2023 13:27:18 +0000 (14:27 +0100)
IPPROTO_L2TP was moved from linux/l2tp.h to linux/in.h [0], so let's
reflect that change to fix build with newer kernels:

```
In file included from ../src/libsystemd/sd-netlink/netlink-types-genl.c:10:
../src/basic/linux/l2tp.h:16: error: "IPPROTO_L2TP" redefined [-Werror]
   16 | #define IPPROTO_L2TP            115
      |
In file included from ../src/libsystemd/sd-netlink/netlink-types-genl.c:3:
/usr/include/netinet/in.h:85: note: this is the location of the previous definition
   85 | #define IPPROTO_L2TP            IPPROTO_L2TP
      |
cc1: all warnings being treated as errors
```

When at it, update the rest of the headers we ship as well.

[0] https://github.com/torvalds/linux/commit/65b32f801bfbc54dc98144a6ec26082b59d131ee

18 files changed:
src/basic/linux/README
src/basic/linux/btrfs.h
src/basic/linux/btrfs_tree.h
src/basic/linux/genetlink.h
src/basic/linux/if_bridge.h
src/basic/linux/if_ether.h
src/basic/linux/if_link.h
src/basic/linux/if_macsec.h
src/basic/linux/if_tun.h
src/basic/linux/in.h
src/basic/linux/l2tp.h
src/basic/linux/netfilter/nf_tables.h
src/basic/linux/netlink.h
src/basic/linux/nl80211.h
src/basic/linux/pkt_sched.h
src/basic/linux/rtnetlink.h
src/basic/linux/stddef.h [new file with mode: 0644]
src/basic/linux/update.sh

index 2bb70fdaadb812a6ea231ab8b9428f7708722983..1abc9450a6b3fbd1dca610aab9c0bb0a54798b50 100644 (file)
@@ -4,3 +4,4 @@ The files in this directory are copied from current kernel master
 modifications are applied:
 - btrfs.h: drop '__user' attributes
 - if.h: drop '#include <linux/compiler.h>' and '__user' attributes
+- stddef.h: drop '#include <linux/compiler_types.h>'
index 6a0442b388d4933a3f3d9582484c7d4312a69e9e..0a53bdc38a81d506ec30568988a1c22b88a3c4ec 100644 (file)
 
 #ifndef _UAPI_LINUX_BTRFS_H
 #define _UAPI_LINUX_BTRFS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <linux/types.h>
 #include <linux/ioctl.h>
+#include <linux/fs.h>
 
 #define BTRFS_IOCTL_MAGIC 0x94
 #define BTRFS_VOL_NAME_MAX 255
@@ -93,7 +99,7 @@ struct btrfs_qgroup_inherit {
        __u64   num_ref_copies;
        __u64   num_excl_copies;
        struct btrfs_qgroup_limit lim;
-       __u64   qgroups[0];
+       __u64   qgroups[];
 };
 
 struct btrfs_ioctl_qgroup_limit_args {
@@ -290,6 +296,12 @@ struct btrfs_ioctl_fs_info_args {
 #define BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE_VALID  (1ULL << 1)
 #define BTRFS_FEATURE_COMPAT_RO_VERITY                 (1ULL << 2)
 
+/*
+ * Put all block group items into a dedicated block group tree, greatly
+ * reducing mount time for large filesystem due to better locality.
+ */
+#define BTRFS_FEATURE_COMPAT_RO_BLOCK_GROUP_TREE       (1ULL << 3)
+
 #define BTRFS_FEATURE_INCOMPAT_MIXED_BACKREF   (1ULL << 0)
 #define BTRFS_FEATURE_INCOMPAT_DEFAULT_SUBVOL  (1ULL << 1)
 #define BTRFS_FEATURE_INCOMPAT_MIXED_GROUPS    (1ULL << 2)
@@ -327,6 +339,12 @@ struct btrfs_ioctl_feature_flags {
  */
 struct btrfs_balance_args {
        __u64 profiles;
+
+       /*
+        * usage filter
+        * BTRFS_BALANCE_ARGS_USAGE with a single value means '0..N'
+        * BTRFS_BALANCE_ARGS_USAGE_RANGE - range syntax, min..max
+        */
        union {
                __u64 usage;
                struct {
@@ -543,7 +561,7 @@ struct btrfs_ioctl_search_header {
        __u64 offset;
        __u32 type;
        __u32 len;
-};
+} __attribute__ ((__may_alias__));
 
 #define BTRFS_SEARCH_ARGS_BUFSIZE (4096 - sizeof(struct btrfs_ioctl_search_key))
 /*
@@ -556,18 +574,23 @@ struct btrfs_ioctl_search_args {
        char buf[BTRFS_SEARCH_ARGS_BUFSIZE];
 };
 
+/*
+ * Extended version of TREE_SEARCH ioctl that can return more than 4k of bytes.
+ * The allocated size of the buffer is set in buf_size.
+ */
 struct btrfs_ioctl_search_args_v2 {
        struct btrfs_ioctl_search_key key; /* in/out - search parameters */
        __u64 buf_size;            /* in - size of buffer
                                            * out - on EOVERFLOW: needed size
                                            *       to store item */
-       __u64 buf[0];                       /* out - found items */
+       __u64 buf[];                       /* out - found items */
 };
 
+/* With a @src_length of zero, the range from @src_offset->EOF is cloned! */
 struct btrfs_ioctl_clone_range_args {
-  __s64 src_fd;
-  __u64 src_offset, src_length;
-  __u64 dest_offset;
+       __s64 src_fd;
+       __u64 src_offset, src_length;
+       __u64 dest_offset;
 };
 
 /*
@@ -632,7 +655,7 @@ struct btrfs_ioctl_same_args {
        __u16 dest_count;       /* in - total elements in info array */
        __u16 reserved1;
        __u32 reserved2;
-       struct btrfs_ioctl_same_extent_info info[0];
+       struct btrfs_ioctl_same_extent_info info[];
 };
 
 struct btrfs_ioctl_space_info {
@@ -644,7 +667,7 @@ struct btrfs_ioctl_space_info {
 struct btrfs_ioctl_space_args {
        __u64 space_slots;
        __u64 total_spaces;
-       struct btrfs_ioctl_space_info spaces[0];
+       struct btrfs_ioctl_space_info spaces[];
 };
 
 struct btrfs_data_container {
@@ -652,7 +675,7 @@ struct btrfs_data_container {
        __u32   bytes_missing;  /* out -- additional bytes needed for result */
        __u32   elem_cnt;       /* out */
        __u32   elem_missed;    /* out */
-       __u64   val[0];         /* out */
+       __u64   val[];          /* out */
 };
 
 struct btrfs_ioctl_ino_path_args {
@@ -671,8 +694,11 @@ struct btrfs_ioctl_logical_ino_args {
        /* struct btrfs_data_container  *inodes;        out   */
        __u64                           inodes;
 };
-/* Return every ref to the extent, not just those containing logical block.
- * Requires logical == extent bytenr. */
+
+/*
+ * Return every ref to the extent, not just those containing logical block.
+ * Requires logical == extent bytenr.
+ */
 #define BTRFS_LOGICAL_INO_ARGS_IGNORE_OFFSET   (1ULL << 0)
 
 enum btrfs_dev_stat_values {
@@ -777,11 +803,19 @@ struct btrfs_ioctl_received_subvol_args {
  */
 #define BTRFS_SEND_FLAG_VERSION                        0x8
 
+/*
+ * Send compressed data using the ENCODED_WRITE command instead of decompressing
+ * the data and sending it with the WRITE command. This requires protocol
+ * version >= 2.
+ */
+#define BTRFS_SEND_FLAG_COMPRESSED             0x10
+
 #define BTRFS_SEND_FLAG_MASK \
        (BTRFS_SEND_FLAG_NO_FILE_DATA | \
         BTRFS_SEND_FLAG_OMIT_STREAM_HEADER | \
         BTRFS_SEND_FLAG_OMIT_END_CMD | \
-        BTRFS_SEND_FLAG_VERSION)
+        BTRFS_SEND_FLAG_VERSION | \
+        BTRFS_SEND_FLAG_COMPRESSED)
 
 struct btrfs_ioctl_send_args {
        __s64 send_fd;                  /* in */
@@ -1130,4 +1164,8 @@ enum btrfs_err_code {
 #define BTRFS_IOC_ENCODED_WRITE _IOW(BTRFS_IOCTL_MAGIC, 64, \
                                     struct btrfs_ioctl_encoded_io_args)
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _UAPI_LINUX_BTRFS_H */
index d4117152d90783a57c347a5f541a0d70e3036614..ab38d0f411fa4699ec43b9f1e42372abd60c4f61 100644 (file)
 #include <stddef.h>
 #endif
 
+/* ASCII for _BHRfS_M, no terminating nul */
+#define BTRFS_MAGIC 0x4D5F53665248425FULL
+
+#define BTRFS_MAX_LEVEL 8
+
+/*
+ * We can actually store much bigger names, but lets not confuse the rest of
+ * linux.
+ */
+#define BTRFS_NAME_LEN 255
+
+/*
+ * Theoretical limit is larger, but we keep this down to a sane value. That
+ * should limit greatly the possibility of collisions on inode ref items.
+ */
+#define BTRFS_LINK_MAX 65535U
+
 /*
  * This header contains the structure definitions and constants used
  * by file system objects that can be retrieved using
@@ -359,6 +376,50 @@ enum btrfs_csum_type {
 #define BTRFS_FT_SYMLINK       7
 #define BTRFS_FT_XATTR         8
 #define BTRFS_FT_MAX           9
+/* Directory contains encrypted data */
+#define BTRFS_FT_ENCRYPTED     0x80
+
+static inline __u8 btrfs_dir_flags_to_ftype(__u8 flags)
+{
+       return flags & ~BTRFS_FT_ENCRYPTED;
+}
+
+/*
+ * Inode flags
+ */
+#define BTRFS_INODE_NODATASUM          (1U << 0)
+#define BTRFS_INODE_NODATACOW          (1U << 1)
+#define BTRFS_INODE_READONLY           (1U << 2)
+#define BTRFS_INODE_NOCOMPRESS         (1U << 3)
+#define BTRFS_INODE_PREALLOC           (1U << 4)
+#define BTRFS_INODE_SYNC               (1U << 5)
+#define BTRFS_INODE_IMMUTABLE          (1U << 6)
+#define BTRFS_INODE_APPEND             (1U << 7)
+#define BTRFS_INODE_NODUMP             (1U << 8)
+#define BTRFS_INODE_NOATIME            (1U << 9)
+#define BTRFS_INODE_DIRSYNC            (1U << 10)
+#define BTRFS_INODE_COMPRESS           (1U << 11)
+
+#define BTRFS_INODE_ROOT_ITEM_INIT     (1U << 31)
+
+#define BTRFS_INODE_FLAG_MASK                                          \
+       (BTRFS_INODE_NODATASUM |                                        \
+        BTRFS_INODE_NODATACOW |                                        \
+        BTRFS_INODE_READONLY |                                         \
+        BTRFS_INODE_NOCOMPRESS |                                       \
+        BTRFS_INODE_PREALLOC |                                         \
+        BTRFS_INODE_SYNC |                                             \
+        BTRFS_INODE_IMMUTABLE |                                        \
+        BTRFS_INODE_APPEND |                                           \
+        BTRFS_INODE_NODUMP |                                           \
+        BTRFS_INODE_NOATIME |                                          \
+        BTRFS_INODE_DIRSYNC |                                          \
+        BTRFS_INODE_COMPRESS |                                         \
+        BTRFS_INODE_ROOT_ITEM_INIT)
+
+#define BTRFS_INODE_RO_VERITY          (1U << 0)
+
+#define BTRFS_INODE_RO_FLAG_MASK       (BTRFS_INODE_RO_VERITY)
 
 /*
  * The key defines the order in the tree, and so it also defines (optimal)
@@ -389,6 +450,109 @@ struct btrfs_key {
        __u64 offset;
 } __attribute__ ((__packed__));
 
+/*
+ * Every tree block (leaf or node) starts with this header.
+ */
+struct btrfs_header {
+       /* These first four must match the super block */
+       __u8 csum[BTRFS_CSUM_SIZE];
+       /* FS specific uuid */
+       __u8 fsid[BTRFS_FSID_SIZE];
+       /* Which block this node is supposed to live in */
+       __le64 bytenr;
+       __le64 flags;
+
+       /* Allowed to be different from the super from here on down */
+       __u8 chunk_tree_uuid[BTRFS_UUID_SIZE];
+       __le64 generation;
+       __le64 owner;
+       __le32 nritems;
+       __u8 level;
+} __attribute__ ((__packed__));
+
+/*
+ * This is a very generous portion of the super block, giving us room to
+ * translate 14 chunks with 3 stripes each.
+ */
+#define BTRFS_SYSTEM_CHUNK_ARRAY_SIZE 2048
+
+/*
+ * Just in case we somehow lose the roots and are not able to mount, we store
+ * an array of the roots from previous transactions in the super.
+ */
+#define BTRFS_NUM_BACKUP_ROOTS 4
+struct btrfs_root_backup {
+       __le64 tree_root;
+       __le64 tree_root_gen;
+
+       __le64 chunk_root;
+       __le64 chunk_root_gen;
+
+       __le64 extent_root;
+       __le64 extent_root_gen;
+
+       __le64 fs_root;
+       __le64 fs_root_gen;
+
+       __le64 dev_root;
+       __le64 dev_root_gen;
+
+       __le64 csum_root;
+       __le64 csum_root_gen;
+
+       __le64 total_bytes;
+       __le64 bytes_used;
+       __le64 num_devices;
+       /* future */
+       __le64 unused_64[4];
+
+       __u8 tree_root_level;
+       __u8 chunk_root_level;
+       __u8 extent_root_level;
+       __u8 fs_root_level;
+       __u8 dev_root_level;
+       __u8 csum_root_level;
+       /* future and to align */
+       __u8 unused_8[10];
+} __attribute__ ((__packed__));
+
+/*
+ * A leaf is full of items. offset and size tell us where to find the item in
+ * the leaf (relative to the start of the data area)
+ */
+struct btrfs_item {
+       struct btrfs_disk_key key;
+       __le32 offset;
+       __le32 size;
+} __attribute__ ((__packed__));
+
+/*
+ * Leaves have an item area and a data area:
+ * [item0, item1....itemN] [free space] [dataN...data1, data0]
+ *
+ * The data is separate from the items to get the keys closer together during
+ * searches.
+ */
+struct btrfs_leaf {
+       struct btrfs_header header;
+       struct btrfs_item items[];
+} __attribute__ ((__packed__));
+
+/*
+ * All non-leaf blocks are nodes, they hold only keys and pointers to other
+ * blocks.
+ */
+struct btrfs_key_ptr {
+       struct btrfs_disk_key key;
+       __le64 blockptr;
+       __le64 generation;
+} __attribute__ ((__packed__));
+
+struct btrfs_node {
+       struct btrfs_header header;
+       struct btrfs_key_ptr ptrs[];
+} __attribute__ ((__packed__));
+
 struct btrfs_dev_item {
        /* the internal btrfs device id */
        __le64 devid;
@@ -472,6 +636,69 @@ struct btrfs_chunk {
        /* additional stripes go here */
 } __attribute__ ((__packed__));
 
+/*
+ * The super block basically lists the main trees of the FS.
+ */
+struct btrfs_super_block {
+       /* The first 4 fields must match struct btrfs_header */
+       __u8 csum[BTRFS_CSUM_SIZE];
+       /* FS specific UUID, visible to user */
+       __u8 fsid[BTRFS_FSID_SIZE];
+       /* This block number */
+       __le64 bytenr;
+       __le64 flags;
+
+       /* Allowed to be different from the btrfs_header from here own down */
+       __le64 magic;
+       __le64 generation;
+       __le64 root;
+       __le64 chunk_root;
+       __le64 log_root;
+
+       /*
+        * This member has never been utilized since the very beginning, thus
+        * it's always 0 regardless of kernel version.  We always use
+        * generation + 1 to read log tree root.  So here we mark it deprecated.
+        */
+       __le64 __unused_log_root_transid;
+       __le64 total_bytes;
+       __le64 bytes_used;
+       __le64 root_dir_objectid;
+       __le64 num_devices;
+       __le32 sectorsize;
+       __le32 nodesize;
+       __le32 __unused_leafsize;
+       __le32 stripesize;
+       __le32 sys_chunk_array_size;
+       __le64 chunk_root_generation;
+       __le64 compat_flags;
+       __le64 compat_ro_flags;
+       __le64 incompat_flags;
+       __le16 csum_type;
+       __u8 root_level;
+       __u8 chunk_root_level;
+       __u8 log_root_level;
+       struct btrfs_dev_item dev_item;
+
+       char label[BTRFS_LABEL_SIZE];
+
+       __le64 cache_generation;
+       __le64 uuid_tree_generation;
+
+       /* The UUID written into btree blocks */
+       __u8 metadata_uuid[BTRFS_FSID_SIZE];
+
+       __u64 nr_global_roots;
+
+       /* Future expansion */
+       __le64 reserved[27];
+       __u8 sys_chunk_array[BTRFS_SYSTEM_CHUNK_ARRAY_SIZE];
+       struct btrfs_root_backup super_roots[BTRFS_NUM_BACKUP_ROOTS];
+
+       /* Padded to 4096 bytes */
+       __u8 padding[565];
+} __attribute__ ((__packed__));
+
 #define BTRFS_FREE_SPACE_EXTENT        1
 #define BTRFS_FREE_SPACE_BITMAP        2
 
@@ -526,6 +753,14 @@ struct btrfs_extent_item_v0 {
 /* use full backrefs for extent pointers in the block */
 #define BTRFS_BLOCK_FLAG_FULL_BACKREF  (1ULL << 8)
 
+#define BTRFS_BACKREF_REV_MAX          256
+#define BTRFS_BACKREF_REV_SHIFT                56
+#define BTRFS_BACKREF_REV_MASK         (((u64)BTRFS_BACKREF_REV_MAX - 1) << \
+                                        BTRFS_BACKREF_REV_SHIFT)
+
+#define BTRFS_OLD_BACKREF_REV          0
+#define BTRFS_MIXED_BACKREF_REV                1
+
 /*
  * this flag is only used internally by scrub and may be changed at any time
  * it is only declared here to avoid collisions
@@ -575,7 +810,7 @@ struct btrfs_inode_extref {
        __le64 parent_objectid;
        __le64 index;
        __le16 name_len;
-       __u8   name[0];
+       __u8   name[];
        /* name goes here */
 } __attribute__ ((__packed__));
 
@@ -965,6 +1200,10 @@ static inline __u16 btrfs_qgroup_level(__u64 qgroupid)
  */
 #define BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT  (1ULL << 2)
 
+#define BTRFS_QGROUP_STATUS_FLAGS_MASK (BTRFS_QGROUP_STATUS_FLAG_ON |          \
+                                        BTRFS_QGROUP_STATUS_FLAG_RESCAN |      \
+                                        BTRFS_QGROUP_STATUS_FLAG_INCONSISTENT)
+
 #define BTRFS_QGROUP_STATUS_VERSION        1
 
 struct btrfs_qgroup_status_item {
index d83f214b4134ab518ecc37318d506df3de987ead..ddba3ca01e39aedd09ee86d1e9145bb66fe09b35 100644 (file)
@@ -87,6 +87,8 @@ enum {
        __CTRL_ATTR_MCAST_GRP_MAX,
 };
 
+#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
+
 enum {
        CTRL_ATTR_POLICY_UNSPEC,
        CTRL_ATTR_POLICY_DO,
@@ -96,7 +98,6 @@ enum {
        CTRL_ATTR_POLICY_DUMP_MAX = __CTRL_ATTR_POLICY_DUMP_MAX - 1
 };
 
-#define CTRL_ATTR_MCAST_GRP_MAX (__CTRL_ATTR_MCAST_GRP_MAX - 1)
-
+#define CTRL_ATTR_POLICY_MAX (__CTRL_ATTR_POLICY_DUMP_MAX - 1)
 
 #endif /* _UAPI__LINUX_GENERIC_NETLINK_H */
index a86a7e7b811f2bf95bf8e734638968ecf26f726f..d9de241d90f9863ede77aca849aaba68c00f7a17 100644 (file)
@@ -723,10 +723,31 @@ enum {
 enum {
        MDBE_ATTR_UNSPEC,
        MDBE_ATTR_SOURCE,
+       MDBE_ATTR_SRC_LIST,
+       MDBE_ATTR_GROUP_MODE,
+       MDBE_ATTR_RTPROT,
        __MDBE_ATTR_MAX,
 };
 #define MDBE_ATTR_MAX (__MDBE_ATTR_MAX - 1)
 
+/* per mdb entry source */
+enum {
+       MDBE_SRC_LIST_UNSPEC,
+       MDBE_SRC_LIST_ENTRY,
+       __MDBE_SRC_LIST_MAX,
+};
+#define MDBE_SRC_LIST_MAX (__MDBE_SRC_LIST_MAX - 1)
+
+/* per mdb entry per source attributes
+ * these are embedded in MDBE_SRC_LIST_ENTRY
+ */
+enum {
+       MDBE_SRCATTR_UNSPEC,
+       MDBE_SRCATTR_ADDRESS,
+       __MDBE_SRCATTR_MAX,
+};
+#define MDBE_SRCATTR_MAX (__MDBE_SRCATTR_MAX - 1)
+
 /* Embedded inside LINK_XSTATS_TYPE_BRIDGE */
 enum {
        BRIDGE_XSTATS_UNSPEC,
index 1d0bccc3fa54cd55db9369e0aa26c1ce38918f53..69e0457eb2000dfda7b96fd4b1daff93f7970f9f 100644 (file)
 #define ETH_P_QINQ3    0x9300          /* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_EDSA     0xDADA          /* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_DSA_8021Q        0xDADB          /* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */
+#define ETH_P_DSA_A5PSW        0xE001          /* A5PSW Tag Value [ NOT AN OFFICIALLY REGISTERED ID ] */
 #define ETH_P_IFE      0xED3E          /* ForCES inter-FE LFB type */
 #define ETH_P_AF_IUCV   0xFBFB         /* IBM af_iucv [ NOT AN OFFICIALLY REGISTERED ID ] */
 
 #define ETH_P_LOCALTALK 0x0009         /* Localtalk pseudo type        */
 #define ETH_P_CAN      0x000C          /* CAN: Controller Area Network */
 #define ETH_P_CANFD    0x000D          /* CANFD: CAN flexible data rate*/
+#define ETH_P_CANXL    0x000E          /* CANXL: eXtended frame Length */
 #define ETH_P_PPPTALK  0x0010          /* Dummy type for Atalk over PPP*/
 #define ETH_P_TR_802_2 0x0011          /* 802.2 frames                 */
 #define ETH_P_MOBITEX  0x0015          /* Mobitex (kaz@cafe.net)       */
index 5f58dcfe2787f308bb2aa5777cca0816dd32bbb9..1021a7e47a868aa372f923172f103a8cf1af1a1e 100644 (file)
@@ -370,6 +370,9 @@ enum {
        IFLA_GRO_MAX_SIZE,
        IFLA_TSO_MAX_SIZE,
        IFLA_TSO_MAX_SEGS,
+       IFLA_ALLMULTI,          /* Allmulti count: > 0 means acts ALLMULTI */
+
+       IFLA_DEVLINK_PORT,
 
        __IFLA_MAX
 };
@@ -560,6 +563,7 @@ enum {
        IFLA_BRPORT_MCAST_EHT_HOSTS_LIMIT,
        IFLA_BRPORT_MCAST_EHT_HOSTS_CNT,
        IFLA_BRPORT_LOCKED,
+       IFLA_BRPORT_MAB,
        __IFLA_BRPORT_MAX
 };
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
@@ -694,6 +698,7 @@ enum {
        IFLA_XFRM_UNSPEC,
        IFLA_XFRM_LINK,
        IFLA_XFRM_IF_ID,
+       IFLA_XFRM_COLLECT_METADATA,
        __IFLA_XFRM_MAX
 };
 
@@ -963,6 +968,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,
 };
 
@@ -1373,4 +1379,14 @@ enum {
 
 #define IFLA_MCTP_MAX (__IFLA_MCTP_MAX - 1)
 
+/* DSA section */
+
+enum {
+       IFLA_DSA_UNSPEC,
+       IFLA_DSA_MASTER,
+       __IFLA_DSA_MAX,
+};
+
+#define IFLA_DSA_MAX   (__IFLA_DSA_MAX - 1)
+
 #endif /* _UAPI_LINUX_IF_LINK_H */
index 3af2aa069a3677ca30691c854268664201f7103f..d5b6d1f37353e788ff8d0fdaf010946986c6a3fd 100644 (file)
@@ -22,6 +22,8 @@
 
 #define MACSEC_KEYID_LEN 16
 
+#define MACSEC_SALT_LEN 12
+
 /* cipher IDs as per IEEE802.1AE-2018 (Table 14-1) */
 #define MACSEC_CIPHER_ID_GCM_AES_128 0x0080C20001000001ULL
 #define MACSEC_CIPHER_ID_GCM_AES_256 0x0080C20001000002ULL
index 454ae31b93c7a4b4aeedddf7ceb5274377b39a58..287cdc81c9390c289a30545aa7ed23d81c3329d3 100644 (file)
@@ -67,6 +67,8 @@
 #define IFF_TAP                0x0002
 #define IFF_NAPI       0x0010
 #define IFF_NAPI_FRAGS 0x0020
+/* Used in TUNSETIFF to bring up tun/tap without carrier */
+#define IFF_NO_CARRIER 0x0040
 #define IFF_NO_PI      0x1000
 /* This flag has no real effect */
 #define IFF_ONE_QUEUE  0x2000
@@ -88,6 +90,8 @@
 #define TUN_F_TSO6     0x04    /* I can handle TSO for IPv6 packets */
 #define TUN_F_TSO_ECN  0x08    /* I can handle TSO with ECN bits. */
 #define TUN_F_UFO      0x10    /* I can handle UFO packets */
+#define TUN_F_USO4     0x20    /* I can handle USO for IPv4 packets */
+#define TUN_F_USO6     0x40    /* I can handle USO for IPv6 packets */
 
 /* Protocol info prepended to the packets (when IFF_NO_PI is not set) */
 #define TUN_PKT_STRIP  0x0001
@@ -108,7 +112,7 @@ struct tun_pi {
 struct tun_filter {
        __u16  flags; /* TUN_FLT_ flags see above */
        __u16  count; /* Number of addresses */
-       __u8   addr[0][ETH_ALEN];
+       __u8   addr[][ETH_ALEN];
 };
 
 #endif /* _UAPI__IF_TUN_H */
index 14168225cecdc74cb7c46b3abd0c1f0bcf874a7a..07a4cb149305be99b1b661887abf5e37c2affc9a 100644 (file)
@@ -20,6 +20,7 @@
 #define _UAPI_LINUX_IN_H
 
 #include <linux/types.h>
+#include <linux/stddef.h>
 #include <linux/libc-compat.h>
 #include <linux/socket.h>
 
@@ -68,6 +69,8 @@ enum {
 #define IPPROTO_PIM            IPPROTO_PIM
   IPPROTO_COMP = 108,          /* Compression Header Protocol          */
 #define IPPROTO_COMP           IPPROTO_COMP
+  IPPROTO_L2TP = 115,          /* Layer 2 Tunnelling Protocol          */
+#define IPPROTO_L2TP           IPPROTO_L2TP
   IPPROTO_SCTP = 132,          /* Stream Control Transport Protocol    */
 #define IPPROTO_SCTP           IPPROTO_SCTP
   IPPROTO_UDPLITE = 136,       /* UDP-Lite (RFC 3828)                  */
@@ -188,21 +191,13 @@ struct ip_mreq_source {
 };
 
 struct ip_msfilter {
+       __be32          imsf_multiaddr;
+       __be32          imsf_interface;
+       __u32           imsf_fmode;
+       __u32           imsf_numsrc;
        union {
-               struct {
-                       __be32          imsf_multiaddr_aux;
-                       __be32          imsf_interface_aux;
-                       __u32           imsf_fmode_aux;
-                       __u32           imsf_numsrc_aux;
-                       __be32          imsf_slist[1];
-               };
-               struct {
-                       __be32          imsf_multiaddr;
-                       __be32          imsf_interface;
-                       __u32           imsf_fmode;
-                       __u32           imsf_numsrc;
-                       __be32          imsf_slist_flex[];
-               };
+               __be32          imsf_slist[1];
+               __DECLARE_FLEX_ARRAY(__be32, imsf_slist_flex);
        };
 };
 
index bab8c9708611139357eb888c9ad367935f380844..7d81c3e1ec29aabd374e94f70ec1161e9f5f78ad 100644 (file)
@@ -13,8 +13,6 @@
 #include <linux/in.h>
 #include <linux/in6.h>
 
-#define IPPROTO_L2TP           115
-
 /**
  * struct sockaddr_l2tpip - the sockaddr structure for L2TP-over-IP sockets
  * @l2tp_family:  address family number AF_L2TPIP.
index 466fd3f4447c2fc47ca2a52db149ec27dc079216..cfa844da1ce61eae8679868239f639948f65eb94 100644 (file)
@@ -97,6 +97,7 @@ enum nft_verdicts {
  * @NFT_MSG_NEWFLOWTABLE: add new flow table (enum nft_flowtable_attributes)
  * @NFT_MSG_GETFLOWTABLE: get flow table (enum nft_flowtable_attributes)
  * @NFT_MSG_DELFLOWTABLE: delete flow table (enum nft_flowtable_attributes)
+ * @NFT_MSG_GETRULE_RESET: get rules and reset stateful expressions (enum nft_obj_attributes)
  */
 enum nf_tables_msg_types {
        NFT_MSG_NEWTABLE,
@@ -124,6 +125,7 @@ enum nf_tables_msg_types {
        NFT_MSG_NEWFLOWTABLE,
        NFT_MSG_GETFLOWTABLE,
        NFT_MSG_DELFLOWTABLE,
+       NFT_MSG_GETRULE_RESET,
        NFT_MSG_MAX,
 };
 
@@ -760,6 +762,7 @@ enum nft_payload_bases {
        NFT_PAYLOAD_NETWORK_HEADER,
        NFT_PAYLOAD_TRANSPORT_HEADER,
        NFT_PAYLOAD_INNER_HEADER,
+       NFT_PAYLOAD_TUN_HEADER,
 };
 
 /**
@@ -779,6 +782,32 @@ enum nft_payload_csum_flags {
        NFT_PAYLOAD_L4CSUM_PSEUDOHDR = (1 << 0),
 };
 
+enum nft_inner_type {
+       NFT_INNER_UNSPEC        = 0,
+       NFT_INNER_VXLAN,
+       NFT_INNER_GENEVE,
+};
+
+enum nft_inner_flags {
+       NFT_INNER_HDRSIZE       = (1 << 0),
+       NFT_INNER_LL            = (1 << 1),
+       NFT_INNER_NH            = (1 << 2),
+       NFT_INNER_TH            = (1 << 3),
+};
+#define NFT_INNER_MASK         (NFT_INNER_HDRSIZE | NFT_INNER_LL | \
+                                NFT_INNER_NH | NFT_INNER_TH)
+
+enum nft_inner_attributes {
+       NFTA_INNER_UNSPEC,
+       NFTA_INNER_NUM,
+       NFTA_INNER_TYPE,
+       NFTA_INNER_FLAGS,
+       NFTA_INNER_HDRSIZE,
+       NFTA_INNER_EXPR,
+       __NFTA_INNER_MAX
+};
+#define NFTA_INNER_MAX (__NFTA_INNER_MAX - 1)
+
 /**
  * enum nft_payload_attributes - nf_tables payload expression netlink attributes
  *
index 855dffb4c1c3e906882644f4bf4e729190c82913..e2ae82e3f9f7187d12ad6d78b6875cfccce878cd 100644 (file)
@@ -20,7 +20,7 @@
 #define NETLINK_CONNECTOR      11
 #define NETLINK_NETFILTER      12      /* netfilter subsystem */
 #define NETLINK_IP6_FW         13
-#define NETLINK_DNRTMSG                14      /* DECnet routing messages */
+#define NETLINK_DNRTMSG                14      /* DECnet routing messages (obsolete) */
 #define NETLINK_KOBJECT_UEVENT 15      /* Kernel messages to userspace */
 #define NETLINK_GENERIC                16
 /* leave room for NETLINK_DM (DM Events) */
@@ -41,12 +41,20 @@ struct sockaddr_nl {
                __u32           nl_groups;      /* multicast groups mask */
 };
 
+/**
+ * struct nlmsghdr - fixed format metadata header of Netlink messages
+ * @nlmsg_len:   Length of message including header
+ * @nlmsg_type:  Message content type
+ * @nlmsg_flags: Additional flags
+ * @nlmsg_seq:   Sequence number
+ * @nlmsg_pid:   Sending process port ID
+ */
 struct nlmsghdr {
-       __u32           nlmsg_len;      /* Length of message including header */
-       __u16           nlmsg_type;     /* Message content */
-       __u16           nlmsg_flags;    /* Additional flags */
-       __u32           nlmsg_seq;      /* Sequence number */
-       __u32           nlmsg_pid;      /* Sending process port ID */
+       __u32           nlmsg_len;
+       __u16           nlmsg_type;
+       __u16           nlmsg_flags;
+       __u32           nlmsg_seq;
+       __u32           nlmsg_pid;
 };
 
 /* Flags values */
@@ -54,7 +62,7 @@ struct nlmsghdr {
 #define NLM_F_REQUEST          0x01    /* It is request message.       */
 #define NLM_F_MULTI            0x02    /* Multipart message, terminated by NLMSG_DONE */
 #define NLM_F_ACK              0x04    /* Reply with ack, with zero or error code */
-#define NLM_F_ECHO             0x08    /* Echo this request            */
+#define NLM_F_ECHO             0x08    /* Receive resulting notifications */
 #define NLM_F_DUMP_INTR                0x10    /* Dump was inconsistent due to sequence change */
 #define NLM_F_DUMP_FILTERED    0x20    /* Dump was filtered as requested */
 
@@ -132,6 +140,10 @@ struct nlmsgerr {
  *     be used - in the success case - to identify a created
  *     object or operation or similar (binary)
  * @NLMSGERR_ATTR_POLICY: policy for a rejected attribute
+ * @NLMSGERR_ATTR_MISS_TYPE: type of a missing required attribute,
+ *     %NLMSGERR_ATTR_MISS_NEST will not be present if the attribute was
+ *     missing at the message level
+ * @NLMSGERR_ATTR_MISS_NEST: offset of the nest where attribute was missing
  * @__NLMSGERR_ATTR_MAX: number of attributes
  * @NLMSGERR_ATTR_MAX: highest attribute number
  */
@@ -141,6 +153,8 @@ enum nlmsgerr_attrs {
        NLMSGERR_ATTR_OFFS,
        NLMSGERR_ATTR_COOKIE,
        NLMSGERR_ATTR_POLICY,
+       NLMSGERR_ATTR_MISS_TYPE,
+       NLMSGERR_ATTR_MISS_NEST,
 
        __NLMSGERR_ATTR_MAX,
        NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
@@ -337,6 +351,9 @@ enum netlink_attribute_type {
  *     bitfield32 type (U32)
  * @NL_POLICY_TYPE_ATTR_MASK: mask of valid bits for unsigned integers (U64)
  * @NL_POLICY_TYPE_ATTR_PAD: pad attribute for 64-bit alignment
+ *
+ * @__NL_POLICY_TYPE_ATTR_MAX: number of attributes
+ * @NL_POLICY_TYPE_ATTR_MAX: highest attribute number
  */
 enum netlink_policy_type_attr {
        NL_POLICY_TYPE_ATTR_UNSPEC,
index d9490e3062a70a52206e5ac0a9becfa35bee66f2..c14a91bbca7c9e6000978174becfa3e52982d1d2 100644 (file)
  * Once the association is done, the driver cleans the FILS AAD data.
  */
 
+/**
+ * DOC: Multi-Link Operation
+ *
+ * In Multi-Link Operation, a connection between to MLDs utilizes multiple
+ * links. To use this in nl80211, various commands and responses now need
+ * to or will include the new %NL80211_ATTR_MLO_LINKS attribute.
+ * Additionally, various commands that need to operate on a specific link
+ * now need to be given the %NL80211_ATTR_MLO_LINK_ID attribute, e.g. to
+ * use %NL80211_CMD_START_AP or similar functions.
+ */
+
 /**
  * enum nl80211_commands - supported nl80211 commands
  *
  *     the non-transmitting interfaces are deleted as well.
  *
  * @NL80211_CMD_GET_KEY: Get sequence counter information for a key specified
- *     by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC.
+ *     by %NL80211_ATTR_KEY_IDX and/or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC
+ *     represents peer's MLD address for MLO pairwise key. For MLO group key,
+ *     the link is identified by %NL80211_ATTR_MLO_LINK_ID.
  * @NL80211_CMD_SET_KEY: Set key attributes %NL80211_ATTR_KEY_DEFAULT,
  *     %NL80211_ATTR_KEY_DEFAULT_MGMT, or %NL80211_ATTR_KEY_THRESHOLD.
+ *     For MLO connection, the link to set default key is identified by
+ *     %NL80211_ATTR_MLO_LINK_ID.
  * @NL80211_CMD_NEW_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
  *     %NL80211_ATTR_KEY_IDX, %NL80211_ATTR_MAC, %NL80211_ATTR_KEY_CIPHER,
- *     and %NL80211_ATTR_KEY_SEQ attributes.
+ *     and %NL80211_ATTR_KEY_SEQ attributes. %NL80211_ATTR_MAC represents
+ *     peer's MLD address for MLO pairwise key. The link to add MLO
+ *     group key is identified by %NL80211_ATTR_MLO_LINK_ID.
  * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX
- *     or %NL80211_ATTR_MAC.
+ *     or %NL80211_ATTR_MAC. %NL80211_ATTR_MAC represents peer's MLD address
+ *     for MLO pairwise key. The link to delete group key is identified by
+ *     %NL80211_ATTR_MLO_LINK_ID.
  *
  * @NL80211_CMD_GET_BEACON: (not used)
  * @NL80211_CMD_SET_BEACON: change the beacon on an access point interface
  *     %NL80211_ATTR_CSA_C_OFFSETS_TX is an array of offsets to CSA
  *     counters which will be updated to the current value. This attribute
  *     is used during CSA period.
+ *     For TX on an MLD, the frequency can be omitted and the link ID be
+ *     specified, or if transmitting to a known peer MLD (with MLD addresses
+ *     in the frame) both can be omitted and the link will be selected by
+ *     lower layers.
+ *     For RX notification, %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
+ *     indicate the frame RX timestamp and %NL80211_ATTR_TX_HW_TIMESTAMP may
+ *     be included to indicate the ack TX timestamp.
  * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
  *     command may be used with the corresponding cookie to cancel the wait
  *     time if it is known that it is no longer necessary.  This command is
  *     transmitted with %NL80211_CMD_FRAME. %NL80211_ATTR_COOKIE identifies
  *     the TX command and %NL80211_ATTR_FRAME includes the contents of the
  *     frame. %NL80211_ATTR_ACK flag is included if the recipient acknowledged
- *     the frame.
+ *     the frame. %NL80211_ATTR_TX_HW_TIMESTAMP may be included to indicate the
+ *     tx timestamp and %NL80211_ATTR_RX_HW_TIMESTAMP may be included to
+ *     indicate the ack RX timestamp.
  * @NL80211_CMD_ACTION_TX_STATUS: Alias for @NL80211_CMD_FRAME_TX_STATUS for
  *     backward compatibility.
  *
  *     has been received. %NL80211_ATTR_FRAME is used to specify the
  *     frame contents.  The frame is the raw EAPoL data, without ethernet or
  *     802.11 headers.
+ *     For an MLD transmitter, the %NL80211_ATTR_MLO_LINK_ID may be given and
+ *     its effect will depend on the destination: If the destination is known
+ *     to be an MLD, this will be used as a hint to select the link to transmit
+ *     the frame on. If the destination is not an MLD, this will select both
+ *     the link to transmit on and the source address will be set to the link
+ *     address of that link.
  *     When used as an event indication %NL80211_ATTR_CONTROL_PORT_ETHERTYPE,
  *     %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT and %NL80211_ATTR_MAC are added
  *     indicating the protocol type of the received frame; whether the frame
  *      to describe the BSSID address of the AP and %NL80211_ATTR_TIMEOUT to
  *      specify the timeout value.
  *
+ * @NL80211_CMD_ADD_LINK: Add a new link to an interface. The
+ *     %NL80211_ATTR_MLO_LINK_ID attribute is used for the new link.
+ * @NL80211_CMD_REMOVE_LINK: Remove a link from an interface. This may come
+ *     without %NL80211_ATTR_MLO_LINK_ID as an easy way to remove all links
+ *     in preparation for e.g. roaming to a regular (non-MLO) AP.
+ *
+ * @NL80211_CMD_ADD_LINK_STA: Add a link to an MLD station
+ * @NL80211_CMD_MODIFY_LINK_STA: Modify a link of an MLD station
+ * @NL80211_CMD_REMOVE_LINK_STA: Remove a link of an MLD station
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -1481,6 +1525,13 @@ enum nl80211_commands {
 
        NL80211_CMD_ASSOC_COMEBACK,
 
+       NL80211_CMD_ADD_LINK,
+       NL80211_CMD_REMOVE_LINK,
+
+       NL80211_CMD_ADD_LINK_STA,
+       NL80211_CMD_MODIFY_LINK_STA,
+       NL80211_CMD_REMOVE_LINK_STA,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -2340,8 +2391,10 @@ enum nl80211_commands {
  *
  * @NL80211_ATTR_IFTYPE_EXT_CAPA: Nested attribute of the following attributes:
  *     %NL80211_ATTR_IFTYPE, %NL80211_ATTR_EXT_CAPA,
- *     %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities per
- *     interface type.
+ *     %NL80211_ATTR_EXT_CAPA_MASK, to specify the extended capabilities and
+ *     other interface-type specific capabilities per interface type. For MLO,
+ *     %NL80211_ATTR_EML_CAPABILITY and %NL80211_ATTR_MLD_CAPA_AND_OPS are
+ *     present.
  *
  * @NL80211_ATTR_MU_MIMO_GROUP_DATA: array of 24 bytes that defines a MU-MIMO
  *     groupID for monitor mode.
@@ -2663,6 +2716,41 @@ enum nl80211_commands {
  *     association request when used with NL80211_CMD_NEW_STATION). Can be set
  *     only if %NL80211_STA_FLAG_WME is set.
  *
+ * @NL80211_ATTR_MLO_LINK_ID: A (u8) link ID for use with MLO, to be used with
+ *     various commands that need a link ID to operate.
+ * @NL80211_ATTR_MLO_LINKS: A nested array of links, each containing some
+ *     per-link information and a link ID.
+ * @NL80211_ATTR_MLD_ADDR: An MLD address, used with various commands such as
+ *     authenticate/associate.
+ *
+ * @NL80211_ATTR_MLO_SUPPORT: Flag attribute to indicate user space supports MLO
+ *     connection. Used with %NL80211_CMD_CONNECT. If this attribute is not
+ *     included in NL80211_CMD_CONNECT drivers must not perform MLO connection.
+ *
+ * @NL80211_ATTR_MAX_NUM_AKM_SUITES: U16 attribute. Indicates maximum number of
+ *     AKM suites allowed for %NL80211_CMD_CONNECT, %NL80211_CMD_ASSOCIATE and
+ *     %NL80211_CMD_START_AP in %NL80211_CMD_GET_WIPHY response. If this
+ *     attribute is not present userspace shall consider maximum number of AKM
+ *     suites allowed as %NL80211_MAX_NR_AKM_SUITES which is the legacy maximum
+ *     number prior to the introduction of this attribute.
+ *
+ * @NL80211_ATTR_EML_CAPABILITY: EML Capability information (u16)
+ * @NL80211_ATTR_MLD_CAPA_AND_OPS: MLD Capabilities and Operations (u16)
+ *
+ * @NL80211_ATTR_TX_HW_TIMESTAMP: Hardware timestamp for TX operation in
+ *     nanoseconds (u64). This is the device clock timestamp so it will
+ *     probably reset when the device is stopped or the firmware is reset.
+ *     When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the frame TX
+ *     timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
+ *     the ack TX timestamp.
+ * @NL80211_ATTR_RX_HW_TIMESTAMP: Hardware timestamp for RX operation in
+ *     nanoseconds (u64). This is the device clock timestamp so it will
+ *     probably reset when the device is stopped or the firmware is reset.
+ *     When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
+ *     timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
+ *     the incoming frame RX timestamp.
+ * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
+ *     (re)associations.
  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3177,6 +3265,21 @@ enum nl80211_attrs {
 
        NL80211_ATTR_DISABLE_EHT,
 
+       NL80211_ATTR_MLO_LINKS,
+       NL80211_ATTR_MLO_LINK_ID,
+       NL80211_ATTR_MLD_ADDR,
+
+       NL80211_ATTR_MLO_SUPPORT,
+
+       NL80211_ATTR_MAX_NUM_AKM_SUITES,
+
+       NL80211_ATTR_EML_CAPABILITY,
+       NL80211_ATTR_MLD_CAPA_AND_OPS,
+
+       NL80211_ATTR_TX_HW_TIMESTAMP,
+       NL80211_ATTR_RX_HW_TIMESTAMP,
+       NL80211_ATTR_TD_BITMAP,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -3231,6 +3334,11 @@ enum nl80211_attrs {
 #define NL80211_HE_MIN_CAPABILITY_LEN           16
 #define NL80211_HE_MAX_CAPABILITY_LEN           54
 #define NL80211_MAX_NR_CIPHER_SUITES           5
+
+/*
+ * NL80211_MAX_NR_AKM_SUITES is obsolete when %NL80211_ATTR_MAX_NUM_AKM_SUITES
+ * present in %NL80211_CMD_GET_WIPHY response.
+ */
 #define NL80211_MAX_NR_AKM_SUITES              2
 #define NL80211_EHT_MIN_CAPABILITY_LEN          13
 #define NL80211_EHT_MAX_CAPABILITY_LEN          51
@@ -4853,6 +4961,8 @@ enum nl80211_bss_scan_width {
  *     Contains a nested array of signal strength attributes (u8, dBm),
  *     using the nesting index as the antenna number.
  * @NL80211_BSS_FREQUENCY_OFFSET: frequency offset in KHz
+ * @NL80211_BSS_MLO_LINK_ID: MLO link ID of the BSS (u8).
+ * @NL80211_BSS_MLD_ADDR: MLD address of this BSS if connected to it.
  * @__NL80211_BSS_AFTER_LAST: internal
  * @NL80211_BSS_MAX: highest BSS attribute
  */
@@ -4878,6 +4988,8 @@ enum nl80211_bss {
        NL80211_BSS_PARENT_BSSID,
        NL80211_BSS_CHAIN_SIGNAL,
        NL80211_BSS_FREQUENCY_OFFSET,
+       NL80211_BSS_MLO_LINK_ID,
+       NL80211_BSS_MLD_ADDR,
 
        /* keep last */
        __NL80211_BSS_AFTER_LAST,
@@ -5874,7 +5986,7 @@ enum nl80211_ap_sme_features {
  * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
  *     the connected inactive stations in AP mode.
  * @NL80211_FEATURE_CELL_BASE_REG_HINTS: This driver has been tested
- *     to work properly to suppport receiving regulatory hints from
+ *     to work properly to support receiving regulatory hints from
  *     cellular base stations.
  * @NL80211_FEATURE_P2P_DEVICE_NEEDS_CHANNEL: (no longer available, only
  *     here to reserve the value for API/ABI compatibility)
@@ -6174,6 +6286,14 @@ enum nl80211_feature_flags {
  * @NL80211_EXT_FEATURE_RADAR_BACKGROUND: Device supports background radar/CAC
  *     detection.
  *
+ * @NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE: Device can perform a MAC address
+ *     change without having to bring the underlying network device down
+ *     first. For example, in station mode this can be used to vary the
+ *     origin MAC address prior to a connection to a new AP for privacy
+ *     or other reasons. Note that certain driver specific restrictions
+ *     might apply, e.g. no scans in progress, no offchannel operations
+ *     in progress, and no active connections.
+ *
  * @NUM_NL80211_EXT_FEATURES: number of extended features.
  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
  */
@@ -6241,6 +6361,7 @@ enum nl80211_ext_feature_index {
        NL80211_EXT_FEATURE_BSS_COLOR,
        NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
        NL80211_EXT_FEATURE_RADAR_BACKGROUND,
+       NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
 
        /* add new features before the definition below */
        NUM_NL80211_EXT_FEATURES,
index f292b467b27fcc3e9d0320773665b0aab59e5f1b..000eec106856a4860e1b6a73dcfd5f91c0c9aa14 100644 (file)
@@ -1232,6 +1232,16 @@ enum {
 #define TCA_TAPRIO_ATTR_FLAG_TXTIME_ASSIST     _BITUL(0)
 #define TCA_TAPRIO_ATTR_FLAG_FULL_OFFLOAD      _BITUL(1)
 
+enum {
+       TCA_TAPRIO_TC_ENTRY_UNSPEC,
+       TCA_TAPRIO_TC_ENTRY_INDEX,              /* u32 */
+       TCA_TAPRIO_TC_ENTRY_MAX_SDU,            /* u32 */
+
+       /* add new constants above here */
+       __TCA_TAPRIO_TC_ENTRY_CNT,
+       TCA_TAPRIO_TC_ENTRY_MAX = (__TCA_TAPRIO_TC_ENTRY_CNT - 1)
+};
+
 enum {
        TCA_TAPRIO_ATTR_UNSPEC,
        TCA_TAPRIO_ATTR_PRIOMAP, /* struct tc_mqprio_qopt */
@@ -1245,6 +1255,7 @@ enum {
        TCA_TAPRIO_ATTR_SCHED_CYCLE_TIME_EXTENSION, /* s64 */
        TCA_TAPRIO_ATTR_FLAGS, /* u32 */
        TCA_TAPRIO_ATTR_TXTIME_DELAY, /* u32 */
+       TCA_TAPRIO_ATTR_TC_ENTRY, /* nest */
        __TCA_TAPRIO_ATTR_MAX,
 };
 
index 83849a37db5b2df65cde310b1e40859af43bfa51..eb2747d58a81386ca3b68f4abeb9ce620fd77a3b 100644 (file)
@@ -440,7 +440,7 @@ struct rtnexthop {
 /* RTA_VIA */
 struct rtvia {
        __kernel_sa_family_t    rtvia_family;
-       __u8                    rtvia_addr[0];
+       __u8                    rtvia_addr[];
 };
 
 /* RTM_CACHEINFO */
diff --git a/src/basic/linux/stddef.h b/src/basic/linux/stddef.h
new file mode 100644 (file)
index 0000000..1a73963
--- /dev/null
@@ -0,0 +1,46 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef _UAPI_LINUX_STDDEF_H
+#define _UAPI_LINUX_STDDEF_H
+
+
+#ifndef __always_inline
+#define __always_inline inline
+#endif
+
+/**
+ * __struct_group() - Create a mirrored named and anonyomous struct
+ *
+ * @TAG: The tag name for the named sub-struct (usually empty)
+ * @NAME: The identifier name of the mirrored sub-struct
+ * @ATTRS: Any struct attributes (usually empty)
+ * @MEMBERS: The member declarations for the mirrored structs
+ *
+ * Used to create an anonymous union of two structs with identical layout
+ * and size: one anonymous and one named. The former's members can be used
+ * normally without sub-struct naming, and the latter can be used to
+ * reason about the start, end, and size of the group of struct members.
+ * The named struct can also be explicitly tagged for layer reuse, as well
+ * as both having struct attributes appended.
+ */
+#define __struct_group(TAG, NAME, ATTRS, MEMBERS...) \
+       union { \
+               struct { MEMBERS } ATTRS; \
+               struct TAG { MEMBERS } ATTRS NAME; \
+       }
+
+/**
+ * __DECLARE_FLEX_ARRAY() - Declare a flexible array usable in a union
+ *
+ * @TYPE: The type of each flexible array element
+ * @NAME: The name of the flexible array member
+ *
+ * In order to have a flexible array member in a union or alone in a
+ * struct, it needs to be wrapped in an anonymous struct with at least 1
+ * named member, but that member can be empty.
+ */
+#define __DECLARE_FLEX_ARRAY(TYPE, NAME)       \
+       struct { \
+               struct { } __empty_ ## NAME; \
+               TYPE NAME[]; \
+       }
+#endif
index 72e133d0bcd7777c5c8e5328b6fcb00cf0aca41a..6aff039d3ef545d054ef7a03eed87d464101e225 100755 (executable)
@@ -6,5 +6,5 @@ set -o pipefail
 for i in *.h */*.h; do
     curl --fail "https://raw.githubusercontent.com/torvalds/linux/master/include/uapi/linux/$i" -o "$i"
 
-    sed -i -e 's/__user //g' -e '/^#include <linux\/compiler.h>/ d' "$i"
+    sed -r -i -e 's/__user //g' -e '/^#include <linux\/compiler(_types)?.h>/ d' "$i"
 done