]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Fri, 3 May 2024 15:18:43 +0000 (15:18 +0000)
committerDavid Ahern <dsahern@kernel.org>
Fri, 3 May 2024 15:18:43 +0000 (15:18 +0000)
Update kernel headers to commit:
    5829614a7b3b ("Merge branch 'net-sysctl-sentinel'")

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

index 869abfd950884d7cfff9f02c2bd092a1dbeccc43..603e8019ba20812ccf53ec71772fa2f1c9e345ca 100644 (file)
@@ -1135,6 +1135,7 @@ enum bpf_link_type {
        BPF_LINK_TYPE_TCX = 11,
        BPF_LINK_TYPE_UPROBE_MULTI = 12,
        BPF_LINK_TYPE_NETKIT = 13,
+       BPF_LINK_TYPE_SOCKMAP = 14,
        __MAX_BPF_LINK_TYPE,
 };
 
@@ -3394,6 +3395,10 @@ union bpf_attr {
  *                     for the nexthop. If the src addr cannot be derived,
  *                     **BPF_FIB_LKUP_RET_NO_SRC_ADDR** is returned. In this
  *                     case, *params*->dmac and *params*->smac are not set either.
+ *             **BPF_FIB_LOOKUP_MARK**
+ *                     Use the mark present in *params*->mark for the fib lookup.
+ *                     This option should not be used with BPF_FIB_LOOKUP_DIRECT,
+ *                     as it only has meaning for full lookups.
  *
  *             *ctx* is either **struct xdp_md** for XDP programs or
  *             **struct sk_buff** tc cls_act programs.
@@ -5022,7 +5027,7 @@ union bpf_attr {
  *             bytes will be copied to *dst*
  *     Return
  *             The **hash_algo** is returned on success,
- *             **-EOPNOTSUP** if IMA is disabled or **-EINVAL** if
+ *             **-EOPNOTSUPP** if IMA is disabled or **-EINVAL** if
  *             invalid arguments are passed.
  *
  * struct socket *bpf_sock_from_file(struct file *file)
@@ -5508,7 +5513,7 @@ union bpf_attr {
  *             bytes will be copied to *dst*
  *     Return
  *             The **hash_algo** is returned on success,
- *             **-EOPNOTSUP** if the hash calculation failed or **-EINVAL** if
+ *             **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
  *             invalid arguments are passed.
  *
  * void *bpf_kptr_xchg(void *map_value, void *ptr)
@@ -6720,6 +6725,10 @@ struct bpf_link_info {
                        __u32 ifindex;
                        __u32 attach_type;
                } netkit;
+               struct {
+                       __u32 map_id;
+                       __u32 attach_type;
+               } sockmap;
        };
 } __attribute__((aligned(8)));
 
@@ -6938,6 +6947,8 @@ enum {
                                         * socket transition to LISTEN state.
                                         */
        BPF_SOCK_OPS_RTT_CB,            /* Called on every RTT.
+                                        * Arg1: measured RTT input (mrtt)
+                                        * Arg2: updated srtt
                                         */
        BPF_SOCK_OPS_PARSE_HDR_OPT_CB,  /* Parse the header option.
                                         * It will be called to handle
@@ -7120,6 +7131,7 @@ enum {
        BPF_FIB_LOOKUP_SKIP_NEIGH = (1U << 2),
        BPF_FIB_LOOKUP_TBID    = (1U << 3),
        BPF_FIB_LOOKUP_SRC     = (1U << 4),
+       BPF_FIB_LOOKUP_MARK    = (1U << 5),
 };
 
 enum {
@@ -7152,7 +7164,7 @@ struct bpf_fib_lookup {
 
                /* output: MTU value */
                __u16   mtu_result;
-       };
+       } __attribute__((packed, aligned(2)));
        /* input: L3 device index for lookup
         * output: device index from FIB lookup
         */
@@ -7197,8 +7209,19 @@ struct bpf_fib_lookup {
                __u32   tbid;
        };
 
-       __u8    smac[6];     /* ETH_ALEN */
-       __u8    dmac[6];     /* ETH_ALEN */
+       union {
+               /* input */
+               struct {
+                       __u32   mark;   /* policy routing */
+                       /* 2 4-byte holes for input */
+               };
+
+               /* output: source and dest mac */
+               struct {
+                       __u8    smac[6];        /* ETH_ALEN */
+                       __u8    dmac[6];        /* ETH_ALEN */
+               };
+       };
 };
 
 struct bpf_redir_neigh {
@@ -7285,6 +7308,10 @@ struct bpf_timer {
        __u64 __opaque[2];
 } __attribute__((aligned(8)));
 
+struct bpf_wq {
+       __u64 __opaque[2];
+} __attribute__((aligned(8)));
+
 struct bpf_dynptr {
        __u64 __opaque[2];
 } __attribute__((aligned(8)));
index ff4ceeafc452825263cf2ff8bbd3c1c08f57db0d..7584f6921e7aca519567d0ae3caa7ceee4168e51 100644 (file)
@@ -1769,6 +1769,7 @@ enum {
        IFLA_HSR_PROTOCOL,              /* Indicate different protocol than
                                         * HSR. For example PRP.
                                         */
+       IFLA_HSR_INTERLINK,             /* HSR interlink network device */
        __IFLA_HSR_MAX,
 };
 
index 5775077dc6e44b5cf086c6bd1343fc2393c83b27..845f499538482fa60c7851dea50c7d67bc38c85c 100644 (file)
@@ -56,6 +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_DEVICE_STATS 50   /* Device can provide device-level statistics. */
 #define VIRTIO_NET_F_VQ_NOTF_COAL 52   /* Device supports virtqueue notification coalescing */
 #define VIRTIO_NET_F_NOTF_COAL 53      /* Device supports notifications coalescing */
 #define VIRTIO_NET_F_GUEST_USO4        54      /* Guest can handle USOv4 in. */
@@ -406,4 +407,146 @@ struct  virtio_net_ctrl_coal_vq {
        struct virtio_net_ctrl_coal coal;
 };
 
+/*
+ * Device Statistics
+ */
+#define VIRTIO_NET_CTRL_STATS         8
+#define VIRTIO_NET_CTRL_STATS_QUERY   0
+#define VIRTIO_NET_CTRL_STATS_GET     1
+
+struct virtio_net_stats_capabilities {
+
+#define VIRTIO_NET_STATS_TYPE_CVQ       (1ULL << 32)
+
+#define VIRTIO_NET_STATS_TYPE_RX_BASIC  (1ULL << 0)
+#define VIRTIO_NET_STATS_TYPE_RX_CSUM   (1ULL << 1)
+#define VIRTIO_NET_STATS_TYPE_RX_GSO    (1ULL << 2)
+#define VIRTIO_NET_STATS_TYPE_RX_SPEED  (1ULL << 3)
+
+#define VIRTIO_NET_STATS_TYPE_TX_BASIC  (1ULL << 16)
+#define VIRTIO_NET_STATS_TYPE_TX_CSUM   (1ULL << 17)
+#define VIRTIO_NET_STATS_TYPE_TX_GSO    (1ULL << 18)
+#define VIRTIO_NET_STATS_TYPE_TX_SPEED  (1ULL << 19)
+
+       __le64 supported_stats_types[1];
+};
+
+struct virtio_net_ctrl_queue_stats {
+       struct {
+               __le16 vq_index;
+               __le16 reserved[3];
+               __le64 types_bitmap[1];
+       } stats[1];
+};
+
+struct virtio_net_stats_reply_hdr {
+#define VIRTIO_NET_STATS_TYPE_REPLY_CVQ       32
+
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_BASIC  0
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_CSUM   1
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_GSO    2
+#define VIRTIO_NET_STATS_TYPE_REPLY_RX_SPEED  3
+
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_BASIC  16
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_CSUM   17
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_GSO    18
+#define VIRTIO_NET_STATS_TYPE_REPLY_TX_SPEED  19
+       __u8 type;
+       __u8 reserved;
+       __le16 vq_index;
+       __le16 reserved1;
+       __le16 size;
+};
+
+struct virtio_net_stats_cvq {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 command_num;
+       __le64 ok_num;
+};
+
+struct virtio_net_stats_rx_basic {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 rx_notifications;
+
+       __le64 rx_packets;
+       __le64 rx_bytes;
+
+       __le64 rx_interrupts;
+
+       __le64 rx_drops;
+       __le64 rx_drop_overruns;
+};
+
+struct virtio_net_stats_tx_basic {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 tx_notifications;
+
+       __le64 tx_packets;
+       __le64 tx_bytes;
+
+       __le64 tx_interrupts;
+
+       __le64 tx_drops;
+       __le64 tx_drop_malformed;
+};
+
+struct virtio_net_stats_rx_csum {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 rx_csum_valid;
+       __le64 rx_needs_csum;
+       __le64 rx_csum_none;
+       __le64 rx_csum_bad;
+};
+
+struct virtio_net_stats_tx_csum {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 tx_csum_none;
+       __le64 tx_needs_csum;
+};
+
+struct virtio_net_stats_rx_gso {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 rx_gso_packets;
+       __le64 rx_gso_bytes;
+       __le64 rx_gso_packets_coalesced;
+       __le64 rx_gso_bytes_coalesced;
+};
+
+struct virtio_net_stats_tx_gso {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       __le64 tx_gso_packets;
+       __le64 tx_gso_bytes;
+       __le64 tx_gso_segments;
+       __le64 tx_gso_segments_bytes;
+       __le64 tx_gso_packets_noseg;
+       __le64 tx_gso_bytes_noseg;
+};
+
+struct virtio_net_stats_rx_speed {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       /* rx_{packets,bytes}_allowance_exceeded are too long. So rename to
+        * short name.
+        */
+       __le64 rx_ratelimit_packets;
+       __le64 rx_ratelimit_bytes;
+};
+
+struct virtio_net_stats_tx_speed {
+       struct virtio_net_stats_reply_hdr hdr;
+
+       /* tx_{packets,bytes}_allowance_exceeded are too long. So rename to
+        * short name.
+        */
+       __le64 tx_ratelimit_packets;
+       __le64 tx_ratelimit_bytes;
+};
+
 #endif /* _LINUX_VIRTIO_NET_H */