]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Thu, 1 Sep 2022 02:42:52 +0000 (20:42 -0600)
committerDavid Ahern <dsahern@kernel.org>
Thu, 1 Sep 2022 02:42:52 +0000 (20:42 -0600)
Update kernel headers to commit:
    cb45a8bf4693 ("net: axienet: Switch to 64-bit RX/TX statistics")

Signed-off-by: David Ahern <dsahern@kernel.org>
20 files changed:
include/uapi/linux/bpf.h
include/uapi/linux/genetlink.h
include/uapi/linux/if_alg.h
include/uapi/linux/if_macsec.h
include/uapi/linux/if_tun.h
include/uapi/linux/inet_diag.h
include/uapi/linux/ip.h
include/uapi/linux/magic.h
include/uapi/linux/netfilter/x_tables.h
include/uapi/linux/netfilter_ipv4/ip_tables.h
include/uapi/linux/netfilter_ipv6/ip6_tables.h
include/uapi/linux/netlink.h
include/uapi/linux/pkt_cls.h
include/uapi/linux/rtnetlink.h
include/uapi/linux/sctp.h
include/uapi/linux/seg6.h
include/uapi/linux/seg6_iptunnel.h
include/uapi/linux/virtio_config.h
include/uapi/linux/virtio_net.h
include/uapi/linux/xfrm.h

index d98ed67c6964b092cc98f4079ba38bcab5008390..9744cc8acc29818c61fc45d42dffb48ff92bc6cb 100644 (file)
@@ -79,7 +79,7 @@ struct bpf_insn {
 /* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */
 struct bpf_lpm_trie_key {
        __u32   prefixlen;      /* up to 32 for AF_INET, 128 for AF_INET6 */
-       __u8    data[0];        /* Arbitrary size */
+       __u8    data[]; /* Arbitrary size */
 };
 
 struct bpf_cgroup_storage_key {
@@ -2573,10 +2573,12 @@ union bpf_attr {
  *             There are two supported modes at this time:
  *
  *             * **BPF_ADJ_ROOM_MAC**: Adjust room at the mac layer
- *               (room space is added or removed below the layer 2 header).
+ *               (room space is added or removed between the layer 2 and
+ *               layer 3 headers).
  *
  *             * **BPF_ADJ_ROOM_NET**: Adjust room at the network layer
- *               (room space is added or removed below the layer 3 header).
+ *               (room space is added or removed between the layer 3 and
+ *               layer 4 headers).
  *
  *             The following flags are supported at this time:
  *
@@ -3008,8 +3010,18 @@ union bpf_attr {
  *             **BPF_F_USER_STACK**
  *                     Collect a user space stack instead of a kernel stack.
  *             **BPF_F_USER_BUILD_ID**
- *                     Collect buildid+offset instead of ips for user stack,
- *                     only valid if **BPF_F_USER_STACK** is also specified.
+ *                     Collect (build_id, file_offset) instead of ips for user
+ *                     stack, only valid if **BPF_F_USER_STACK** is also
+ *                     specified.
+ *
+ *                     *file_offset* is an offset relative to the beginning
+ *                     of the executable or shared object file backing the vma
+ *                     which the *ip* falls in. It is *not* an offset relative
+ *                     to that object's base address. Accordingly, it must be
+ *                     adjusted by adding (sh_addr - sh_offset), where
+ *                     sh_{addr,offset} correspond to the executable section
+ *                     containing *file_offset* in the object, for comparisons
+ *                     to symbols' st_value to be valid.
  *
  *             **bpf_get_stack**\ () can collect up to
  *             **PERF_MAX_STACK_DEPTH** both kernel and user frames, subject
@@ -5331,6 +5343,18 @@ union bpf_attr {
  *             **-EACCES** if the SYN cookie is not valid.
  *
  *             **-EPROTONOSUPPORT** if CONFIG_IPV6 is not builtin.
+ *
+ * u64 bpf_ktime_get_tai_ns(void)
+ *     Description
+ *             A nonsettable system-wide clock derived from wall-clock time but
+ *             ignoring leap seconds.  This clock does not experience
+ *             discontinuities and backwards jumps caused by NTP inserting leap
+ *             seconds as CLOCK_REALTIME does.
+ *
+ *             See: **clock_gettime**\ (**CLOCK_TAI**)
+ *     Return
+ *             Current *ktime*.
+ *
  */
 #define __BPF_FUNC_MAPPER(FN)          \
        FN(unspec),                     \
@@ -5541,6 +5565,7 @@ union bpf_attr {
        FN(tcp_raw_gen_syncookie_ipv6), \
        FN(tcp_raw_check_syncookie_ipv4),       \
        FN(tcp_raw_check_syncookie_ipv6),       \
+       FN(ktime_get_tai_ns),           \
        /* */
 
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
index 9fa720ee87ae08ee1e8e18e6d95213b83023d446..e9b8117bdcf9853c174c9bed1dcaf6732283a961 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 /* __LINUX_GENERIC_NETLINK_H */
index dc52a11ba6d1585d44cb2351ff7268299885ba81..578b18aab82151ead815702c2ce07daa9f137d33 100644 (file)
@@ -42,7 +42,7 @@ struct sockaddr_alg_new {
 
 struct af_alg_iv {
        __u32   ivlen;
-       __u8    iv[0];
+       __u8    iv[];
 };
 
 /* Socket options */
index eee31cec76d2361b3c1dda36240b23ef490775d8..6edfea0a17a2e6005050ef18ecdf33df2935ac18 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 8489ae03744b1cdd013e82af292a3d469ef4299e..3e94e9e07816940584fdf1b865c7b05735162d28 100644 (file)
@@ -108,7 +108,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 /* __IF_TUN_H */
index ed1c3153b4f4864ed16794a6ee3d7bb1cb8d1443..d81cb69a26a9afa2f510f5b6cf4b6f20b11e7d21 100644 (file)
@@ -104,7 +104,7 @@ struct inet_diag_hostcond {
        __u8    family;
        __u8    prefix_len;
        int     port;
-       __be32  addr[0];
+       __be32  addr[];
 };
 
 struct inet_diag_markcond {
index 75c46c1bd361245a508a95a191341c0146a7a143..78b6c798602d7a2bb39294942e49fcca78fc6131 100644 (file)
@@ -112,13 +112,13 @@ struct ip_auth_hdr {
        __be16 reserved;
        __be32 spi;
        __be32 seq_no;          /* Sequence number */
-       __u8  auth_data[0];     /* Variable len but >=4. Mind the 64 bit alignment! */
+       __u8  auth_data[];      /* Variable len but >=4. Mind the 64 bit alignment! */
 };
 
 struct ip_esp_hdr {
        __be32 spi;
        __be32 seq_no;          /* Sequence number */
-       __u8  enc_data[0];      /* Variable len but >=8. Mind the 64 bit alignment! */
+       __u8  enc_data[];       /* Variable len but >=8. Mind the 64 bit alignment! */
 };
 
 struct ip_comp_hdr {
index f724129c04255602a1ba25a5c3f870f8b228081c..6325d1d0e90f5dcdc7bdc91d612f8fc4c7b40135 100644 (file)
 
 /* Since UDF 2.01 is ISO 13346 based... */
 #define UDF_SUPER_MAGIC                0x15013346
-#define BALLOON_KVM_MAGIC      0x13661366
-#define ZSMALLOC_MAGIC         0x58295829
 #define DMA_BUF_MAGIC          0x444d4142      /* "DMAB" */
 #define DEVMEM_MAGIC           0x454d444d      /* "DMEM" */
-#define Z3FOLD_MAGIC           0x33
-#define PPC_CMM_MAGIC          0xc7571590
 #define SECRETMEM_MAGIC                0x5345434d      /* "SECM" */
 
 #endif /* __LINUX_MAGIC_H__ */
index 89ee50d6cf7a5677f51aaef52b9ddd8fe36808ca..15e4a9cd32b70630ee09510d4bebf01dfabe508e 100644 (file)
@@ -28,7 +28,7 @@ struct xt_entry_match {
                __u16 match_size;
        } u;
 
-       unsigned char data[0];
+       unsigned char data[];
 };
 
 struct xt_entry_target {
@@ -119,7 +119,7 @@ struct xt_counters_info {
        unsigned int num_counters;
 
        /* The counters (actually `number' of these). */
-       struct xt_counters counters[0];
+       struct xt_counters counters[];
 };
 
 #define XT_INV_PROTO           0x40    /* Invert the sense of PROTO. */
index e1ce5b3a2ae95509cb4511848700df680a42ca5d..52024cbc980e6f80f6411e63974ac33d2cbd9006 100644 (file)
@@ -119,7 +119,7 @@ struct ipt_entry {
        struct xt_counters counters;
 
        /* The matches (if any), then the target. */
-       unsigned char elems[0];
+       unsigned char elems[];
 };
 
 /*
@@ -201,7 +201,7 @@ struct ipt_replace {
        struct xt_counters *counters;
 
        /* The entries (hang off end: not really an array). */
-       struct ipt_entry entries[0];
+       struct ipt_entry entries[];
 };
 
 /* The argument to IPT_SO_GET_ENTRIES. */
@@ -213,7 +213,7 @@ struct ipt_get_entries {
        unsigned int size;
 
        /* The entries. */
-       struct ipt_entry entrytable[0];
+       struct ipt_entry entrytable[];
 };
 
 /* Helper functions */
index 7bbead8c7f74b5e295e0f0f77421dc8a7efc9f54..68109ece60abbf655ec4313131b100b8d3795fbf 100644 (file)
@@ -241,7 +241,7 @@ struct ip6t_replace {
        struct xt_counters *counters;
 
        /* The entries (hang off end: not really an array). */
-       struct ip6t_entry entries[0];
+       struct ip6t_entry entries[];
 };
 
 /* The argument to IP6T_SO_GET_ENTRIES. */
@@ -253,7 +253,7 @@ struct ip6t_get_entries {
        unsigned int size;
 
        /* The entries. */
-       struct ip6t_entry entrytable[0];
+       struct ip6t_entry entrytable[];
 };
 
 /* Helper functions */
index 105b79f057448e4a9ee3f072bcc66af4b79172a5..497ee7b20266564e71c206d1637c7909431faca6 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 */
@@ -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
@@ -333,6 +347,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 c142c0f8ed8ac26516c2d62b47eeaec6454df624..877309d6ca3ce14ff1a13b10eed706a43ea2025a 100644 (file)
@@ -256,7 +256,7 @@ struct tc_u32_sel {
 
        short                   hoff;
        __be32                  hmask;
-       struct tc_u32_key       keys[0];
+       struct tc_u32_key       keys[];
 };
 
 struct tc_u32_mark {
@@ -268,7 +268,7 @@ struct tc_u32_mark {
 struct tc_u32_pcnt {
        __u64 rcnt;
        __u64 rhit;
-       __u64 kcnts[0];
+       __u64 kcnts[];
 };
 
 /* Flags */
index 8f874be7f01e518c3b793bc4b7216b2d722f47b6..f4a540c01b15609444d7c3ce8b67366e4ddee93f 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 */
index 53fdfafcc1535aa7a1d4849f68baf0c36d6f5365..c5f42903b22768639f413ca2358dd9e79157827a 100644 (file)
@@ -365,7 +365,7 @@ struct sctp_assoc_change {
        __u16 sac_outbound_streams;
        __u16 sac_inbound_streams;
        sctp_assoc_t sac_assoc_id;
-       __u8 sac_info[0];
+       __u8 sac_info[];
 };
 
 /*
@@ -436,7 +436,7 @@ struct sctp_remote_error {
        __u32 sre_length;
        __be16 sre_error;
        sctp_assoc_t sre_assoc_id;
-       __u8 sre_data[0];
+       __u8 sre_data[];
 };
 
 
@@ -453,7 +453,7 @@ struct sctp_send_failed {
        __u32 ssf_error;
        struct sctp_sndrcvinfo ssf_info;
        sctp_assoc_t ssf_assoc_id;
-       __u8 ssf_data[0];
+       __u8 ssf_data[];
 };
 
 struct sctp_send_failed_event {
@@ -463,7 +463,7 @@ struct sctp_send_failed_event {
        __u32 ssf_error;
        struct sctp_sndinfo ssfe_info;
        sctp_assoc_t ssf_assoc_id;
-       __u8 ssf_data[0];
+       __u8 ssf_data[];
 };
 
 /*
@@ -1023,7 +1023,7 @@ struct sctp_getaddrs_old {
 struct sctp_getaddrs {
        sctp_assoc_t            assoc_id; /*input*/
        __u32                   addr_num; /*output*/
-       __u8                    addrs[0]; /*output, variable size*/
+       __u8                    addrs[]; /*output, variable size*/
 };
 
 /* A socket user request obtained via SCTP_GET_ASSOC_STATS that retrieves
index 329163e4a08d270ec84bc917f94b4e1c9078e105..e888b002b6ed18cad7427208a6299aeab815dded 100644 (file)
@@ -30,7 +30,7 @@ struct ipv6_sr_hdr {
        __u8    flags;
        __u16   tag;
 
-       struct in6_addr segments[0];
+       struct in6_addr segments[];
 };
 
 #define SR6_FLAG1_PROTECTED    (1 << 6)
index f2e47aada287659084071ef0dfb06328b363d595..e1929d21c0b620e668f8e25d78e5bf04c077b137 100644 (file)
@@ -26,7 +26,7 @@ enum {
 
 struct seg6_iptunnel_encap {
        int mode;
-       struct ipv6_sr_hdr srh[0];
+       struct ipv6_sr_hdr srh[];
 };
 
 #define SEG6_IPTUN_ENCAP_SIZE(x) ((sizeof(*x)) + (((x)->srh->hdrlen + 1) << 3))
index 93574a0d0082d54a540ffb02d66525979a277b93..f010cc42a469e5eabc347ac1592abbbd6ea42cc4 100644 (file)
@@ -52,7 +52,7 @@
  * rest are per-device feature bits.
  */
 #define VIRTIO_TRANSPORT_F_START       28
-#define VIRTIO_TRANSPORT_F_END         38
+#define VIRTIO_TRANSPORT_F_END         41
 
 #ifndef VIRTIO_CONFIG_NO_LEGACY
 /* Do we get callbacks when the ring is completely used, even if we've
@@ -96,4 +96,9 @@
  * Does the device support Single Root I/O Virtualization?
  */
 #define VIRTIO_F_SR_IOV                        37
+
+/*
+ * This feature indicates that the driver can reset a queue individually.
+ */
+#define VIRTIO_F_RING_RESET            40
 #endif /* _LINUX_VIRTIO_CONFIG_H */
index ab08237ff2b835d34c4b9907482ac5ca1f8eb469..158bff97fb317ba86c0ad6f0781a37b011fe2a13 100644 (file)
@@ -56,7 +56,7 @@
 #define VIRTIO_NET_F_MQ        22      /* Device supports Receive Flow
                                         * Steering */
 #define VIRTIO_NET_F_CTRL_MAC_ADDR 23  /* Set MAC address */
-
+#define VIRTIO_NET_F_NOTF_COAL 53      /* Guest can handle notifications coalescing */
 #define VIRTIO_NET_F_HASH_REPORT  57   /* Supports hash report */
 #define VIRTIO_NET_F_RSS         60    /* Supports RSS RX steering */
 #define VIRTIO_NET_F_RSC_EXT     61    /* extended coalescing info */
@@ -355,4 +355,36 @@ struct virtio_net_hash_config {
 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS   5
 #define VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET        0
 
+/*
+ * Control notifications coalescing.
+ *
+ * Request the device to change the notifications coalescing parameters.
+ *
+ * Available with the VIRTIO_NET_F_NOTF_COAL feature bit.
+ */
+#define VIRTIO_NET_CTRL_NOTF_COAL              6
+/*
+ * Set the tx-usecs/tx-max-packets patameters.
+ * tx-usecs - Maximum number of usecs to delay a TX notification.
+ * tx-max-packets - Maximum number of packets to send before a TX notification.
+ */
+struct virtio_net_ctrl_coal_tx {
+       __le32 tx_max_packets;
+       __le32 tx_usecs;
+};
+
+#define VIRTIO_NET_CTRL_NOTF_COAL_TX_SET               0
+
+/*
+ * Set the rx-usecs/rx-max-packets patameters.
+ * rx-usecs - Maximum number of usecs to delay a RX notification.
+ * rx-max-frames - Maximum number of packets to receive before a RX notification.
+ */
+struct virtio_net_ctrl_coal_rx {
+       __le32 rx_max_packets;
+       __le32 rx_usecs;
+};
+
+#define VIRTIO_NET_CTRL_NOTF_COAL_RX_SET               1
+
 #endif /* _LINUX_VIRTIO_NET_H */
index 8f5f1d6e2fa52abbfa94e0c3fe22340bab94f55d..4809f9bee8783a1cfaacfaa94b32aee1bcd07e5d 100644 (file)
@@ -33,7 +33,7 @@ struct xfrm_sec_ctx {
        __u8    ctx_alg;
        __u16   ctx_len;
        __u32   ctx_sid;
-       char    ctx_str[0];
+       char    ctx_str[];
 };
 
 /* Security Context Domains of Interpretation */
@@ -96,7 +96,7 @@ struct xfrm_replay_state_esn {
        __u32           oseq_hi;
        __u32           seq_hi;
        __u32           replay_window;
-       __u32           bmp[0];
+       __u32           bmp[];
 };
 
 struct xfrm_algo {
@@ -296,7 +296,7 @@ enum xfrm_attr_type_t {
        XFRMA_ETIMER_THRESH,
        XFRMA_SRCADDR,          /* xfrm_address_t */
        XFRMA_COADDR,           /* xfrm_address_t */
-       XFRMA_LASTUSED,         /* unsigned long  */
+       XFRMA_LASTUSED,         /* __u64 */
        XFRMA_POLICY_TYPE,      /* struct xfrm_userpolicy_type */
        XFRMA_MIGRATE,
        XFRMA_ALG_AEAD,         /* struct xfrm_algo_aead */