]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
uapi: update to 7.1-rc1
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 27 Apr 2026 17:49:17 +0000 (10:49 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 27 Apr 2026 18:39:56 +0000 (11:39 -0700)
Update headers from rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h
include/uapi/linux/btf.h
include/uapi/linux/const.h
include/uapi/linux/devlink.h
include/uapi/linux/if_link.h

index 14c80da5df87f43cfde6b7c1367e8e6c92a48737..2ae9d05cb4e156bf220c9763991c4260c8a03b9c 100644 (file)
@@ -4645,7 +4645,9 @@ union bpf_attr {
  *     Description
  *             Discard reserved ring buffer sample, pointed to by *data*.
  *             If **BPF_RB_NO_WAKEUP** is specified in *flags*, no notification
- *             of new data availability is sent.
+ *             of new data availability is sent. Discarded records remain in
+ *             the ring buffer until consumed by user space, so a later submit
+ *             using adaptive wakeup might not wake up the consumer.
  *             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
index ffba4eb1416876386eb5c110284bbf5728eeed7d..30e2084d3a8e2024f368fd2d537fb60a84a3ffd3 100644 (file)
@@ -8,6 +8,16 @@
 #define BTF_MAGIC      0xeB9F
 #define BTF_VERSION    1
 
+/*
+ * BTF layout section consists of a struct btf_layout for each known
+ * kind at BTF encoding time.
+ */
+struct btf_layout {
+       __u8 info_sz;           /* size of singular element after btf_type */
+       __u8 elem_sz;           /* size of each of btf_vlen(t) elements */
+       __u16 flags;            /* currently unused */
+};
+
 struct btf_header {
        __u16   magic;
        __u8    version;
@@ -19,6 +29,8 @@ struct btf_header {
        __u32   type_len;       /* length of type section       */
        __u32   str_off;        /* offset of string section     */
        __u32   str_len;        /* length of string section     */
+       __u32   layout_off;     /* offset of layout section     */
+       __u32   layout_len;     /* length of layout section     */
 };
 
 /* Max # of type identifier */
index 95ede2334204048d49b228284e9fbc1561337a16..c6a9d0c9835cae62a97209ca393ee2b8e930469f 100644 (file)
 
 #define __KERNEL_DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d))
 
+/*
+ * Divide positive or negative dividend by positive or negative divisor
+ * and round to closest integer. Result is undefined for negative
+ * divisors if the dividend variable type is unsigned and for negative
+ * dividends if the divisor variable type is unsigned.
+ */
+#define __KERNEL_DIV_ROUND_CLOSEST(x, divisor)         \
+({                                                     \
+       __typeof__(x) __x = x;                          \
+       __typeof__(divisor) __d = divisor;              \
+                                                       \
+       (((__typeof__(x))-1) > 0 ||                     \
+        ((__typeof__(divisor))-1) > 0 ||               \
+        (((__x) > 0) == ((__d) > 0))) ?                \
+               (((__x) + ((__d) / 2)) / (__d)) :       \
+               (((__x) - ((__d) / 2)) / (__d));        \
+})
+
 #endif /* _LINUX_CONST_H */
index 8040b9f58a8aa9bf73058762b22845cc178102de..7f5c3e32c2371a11c03de002a8eb25403306fbc9 100644 (file)
@@ -645,6 +645,7 @@ enum devlink_attr {
        DEVLINK_ATTR_PARAM_RESET_DEFAULT,       /* flag */
 
        DEVLINK_ATTR_INDEX,                     /* uint */
+       DEVLINK_ATTR_RESOURCE_SCOPE_MASK,       /* u32 */
 
        /* Add new attributes above here, update the spec in
         * Documentation/netlink/specs/devlink.yaml and re-generate
@@ -704,6 +705,16 @@ enum devlink_resource_unit {
        DEVLINK_RESOURCE_UNIT_ENTRY,
 };
 
+enum devlink_resource_scope {
+       DEVLINK_RESOURCE_SCOPE_DEV_BIT,
+       DEVLINK_RESOURCE_SCOPE_PORT_BIT,
+};
+
+#define DEVLINK_RESOURCE_SCOPE_DEV \
+       _BITUL(DEVLINK_RESOURCE_SCOPE_DEV_BIT)
+#define DEVLINK_RESOURCE_SCOPE_PORT \
+       _BITUL(DEVLINK_RESOURCE_SCOPE_PORT_BIT)
+
 enum devlink_port_fn_attr_cap {
        DEVLINK_PORT_FN_ATTR_CAP_ROCE_BIT,
        DEVLINK_PORT_FN_ATTR_CAP_MIGRATABLE_BIT,
index c0c22b7b6dd1fd7e375d42620de5bdcfea0f9a14..a8c64be26f2caa7f56f10f5c393f253a05c50547 100644 (file)
@@ -742,6 +742,11 @@ enum in6_addr_gen_mode {
  * @IFLA_BR_FDB_MAX_LEARNED
  *   Set the number of max dynamically learned FDB entries for the current
  *   bridge.
+ *
+ * @IFLA_BR_STP_MODE
+ *   Set the STP mode for the bridge, which controls how the bridge
+ *   selects between userspace and kernel STP. The valid values are
+ *   documented below in the ``BR_STP_MODE_*`` constants.
  */
 enum {
        IFLA_BR_UNSPEC,
@@ -794,11 +799,45 @@ enum {
        IFLA_BR_MCAST_QUERIER_STATE,
        IFLA_BR_FDB_N_LEARNED,
        IFLA_BR_FDB_MAX_LEARNED,
+       IFLA_BR_STP_MODE,
        __IFLA_BR_MAX,
 };
 
 #define IFLA_BR_MAX    (__IFLA_BR_MAX - 1)
 
+/**
+ * DOC: Bridge STP mode values
+ *
+ * @BR_STP_MODE_AUTO
+ *   Default. The kernel invokes the ``/sbin/bridge-stp`` helper to hand
+ *   the bridge to a userspace STP daemon (e.g. mstpd). Only attempted in
+ *   the initial network namespace; in other namespaces this falls back to
+ *   kernel STP.
+ *
+ * @BR_STP_MODE_USER
+ *   Directly enable userspace STP (``BR_USER_STP``) without invoking the
+ *   ``/sbin/bridge-stp`` helper. Works in any network namespace.
+ *   Userspace is responsible for ensuring an STP daemon manages the
+ *   bridge.
+ *
+ * @BR_STP_MODE_KERNEL
+ *   Directly enable kernel STP (``BR_KERNEL_STP``) without invoking the
+ *   helper.
+ *
+ * The mode controls how the bridge selects between userspace and kernel
+ * STP when STP is enabled via ``IFLA_BR_STP_STATE``. It can only be
+ * changed while STP is disabled (``IFLA_BR_STP_STATE`` == 0), returns
+ * ``-EBUSY`` otherwise. The default value is ``BR_STP_MODE_AUTO``.
+ */
+enum br_stp_mode {
+       BR_STP_MODE_AUTO,
+       BR_STP_MODE_USER,
+       BR_STP_MODE_KERNEL,
+       __BR_STP_MODE_MAX
+};
+
+#define BR_STP_MODE_MAX (__BR_STP_MODE_MAX - 1)
+
 struct ifla_bridge_id {
        __u8    prio[2];
        __u8    addr[6]; /* ETH_ALEN */
@@ -1294,6 +1333,11 @@ enum netkit_mode {
        NETKIT_L3,
 };
 
+enum netkit_pairing {
+       NETKIT_DEVICE_PAIR,
+       NETKIT_DEVICE_SINGLE,
+};
+
 /* NETKIT_SCRUB_NONE leaves clearing skb->{mark,priority} up to
  * the BPF program if attached. This also means the latter can
  * consume the two fields if they were populated earlier.
@@ -1318,6 +1362,7 @@ enum {
        IFLA_NETKIT_PEER_SCRUB,
        IFLA_NETKIT_HEADROOM,
        IFLA_NETKIT_TAILROOM,
+       IFLA_NETKIT_PAIRING,
        __IFLA_NETKIT_MAX,
 };
 #define IFLA_NETKIT_MAX        (__IFLA_NETKIT_MAX - 1)