]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
uapi: update headers
authorStephen Hemminger <stephen@networkplumber.org>
Sat, 5 Oct 2024 16:05:28 +0000 (09:05 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Sat, 5 Oct 2024 16:05:28 +0000 (09:05 -0700)
Current headers from 6.12-rc1

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/uapi/linux/bpf.h
include/uapi/linux/const.h
include/uapi/linux/fib_rules.h
include/uapi/linux/libc-compat.h
rdma/include/uapi/rdma/rdma_netlink.h
vdpa/include/uapi/linux/vdpa.h

index a825d1659cba261c14101159aabfb8d2346ed79e..b9139231c3f74f2bb5ab7b34485c1d1d0b1397d0 100644 (file)
@@ -5519,11 +5519,12 @@ union bpf_attr {
  *             **-EOPNOTSUPP** if the hash calculation failed or **-EINVAL** if
  *             invalid arguments are passed.
  *
- * void *bpf_kptr_xchg(void *map_value, void *ptr)
+ * void *bpf_kptr_xchg(void *dst, void *ptr)
  *     Description
- *             Exchange kptr at pointer *map_value* with *ptr*, and return the
- *             old value. *ptr* can be NULL, otherwise it must be a referenced
- *             pointer which will be released when this helper is called.
+ *             Exchange kptr at pointer *dst* with *ptr*, and return the old value.
+ *             *dst* can be map value or local kptr. *ptr* can be NULL, otherwise
+ *             it must be a referenced pointer which will be released when this helper
+ *             is called.
  *     Return
  *             The old value of kptr (which can be NULL). The returned pointer
  *             if not NULL, is a reference which must be released using its
@@ -7513,4 +7514,13 @@ struct bpf_iter_num {
        __u64 __opaque[1];
 } __attribute__((aligned(8)));
 
+/*
+ * Flags to control BPF kfunc behaviour.
+ *     - BPF_F_PAD_ZEROS: Pad destination buffer with zeros. (See the respective
+ *       helper documentation for details.)
+ */
+enum bpf_kfunc_flags {
+       BPF_F_PAD_ZEROS = (1ULL << 0),
+};
+
 #endif /* __LINUX_BPF_H__ */
index 1eb84b5087f8a1d1c1c8f44b5fcc246e04a5a76e..2122610de7f97a8f0129bbd3e6d6f72e4b405414 100644 (file)
 #define _BITUL(x)      (_UL(1) << (x))
 #define _BITULL(x)     (_ULL(1) << (x))
 
+#if !defined(__ASSEMBLY__)
+/*
+ * Missing __asm__ support
+ *
+ * __BIT128() would not work in the __asm__ code, as it shifts an
+ * 'unsigned __init128' data type as direct representation of
+ * 128 bit constants is not supported in the gcc compiler, as
+ * they get silently truncated.
+ *
+ * TODO: Please revisit this implementation when gcc compiler
+ * starts representing 128 bit constants directly like long
+ * and unsigned long etc. Subsequently drop the comment for
+ * GENMASK_U128() which would then start supporting __asm__ code.
+ */
+#define _BIT128(x)     ((unsigned __int128)(1) << (x))
+#endif
+
 #define __ALIGN_KERNEL(x, a)           __ALIGN_KERNEL_MASK(x, (__typeof__(x))(a) - 1)
 #define __ALIGN_KERNEL_MASK(x, mask)   (((x) + (mask)) & ~(mask))
 
index 232df14e1287a3297716f0c16a0632194a189d50..a6924dd3aff1701fe0d30d7bdea8a0b4997a9c69 100644 (file)
@@ -67,6 +67,7 @@ enum {
        FRA_IP_PROTO,   /* ip proto */
        FRA_SPORT_RANGE, /* sport */
        FRA_DPORT_RANGE, /* dport */
+       FRA_DSCP,       /* dscp */
        __FRA_MAX
 };
 
index a1599911e7a942322aed41c6aa730caaa66075e9..e25cd3f486328ea7961d925fadf395f1fe13464e 100644 (file)
 
 #endif /* _NETINET_IN_H */
 
-/* Coordinate with glibc netipx/ipx.h header. */
-#if defined(__NETIPX_IPX_H)
-
-#define __UAPI_DEF_SOCKADDR_IPX                        0
-#define __UAPI_DEF_IPX_ROUTE_DEFINITION                0
-#define __UAPI_DEF_IPX_INTERFACE_DEFINITION    0
-#define __UAPI_DEF_IPX_CONFIG_DATA             0
-#define __UAPI_DEF_IPX_ROUTE_DEF               0
-
-#else /* defined(__NETIPX_IPX_H) */
-
-#define __UAPI_DEF_SOCKADDR_IPX                        1
-#define __UAPI_DEF_IPX_ROUTE_DEFINITION                1
-#define __UAPI_DEF_IPX_INTERFACE_DEFINITION    1
-#define __UAPI_DEF_IPX_CONFIG_DATA             1
-#define __UAPI_DEF_IPX_ROUTE_DEF               1
-
-#endif /* defined(__NETIPX_IPX_H) */
-
 /* Definitions for xattr.h */
 #if defined(_SYS_XATTR_H)
 #define __UAPI_DEF_XATTR               0
 #define __UAPI_DEF_IP6_MTUINFO         1
 #endif
 
-/* Definitions for ipx.h */
-#ifndef __UAPI_DEF_SOCKADDR_IPX
-#define __UAPI_DEF_SOCKADDR_IPX                        1
-#endif
-#ifndef __UAPI_DEF_IPX_ROUTE_DEFINITION
-#define __UAPI_DEF_IPX_ROUTE_DEFINITION                1
-#endif
-#ifndef __UAPI_DEF_IPX_INTERFACE_DEFINITION
-#define __UAPI_DEF_IPX_INTERFACE_DEFINITION    1
-#endif
-#ifndef __UAPI_DEF_IPX_CONFIG_DATA
-#define __UAPI_DEF_IPX_CONFIG_DATA             1
-#endif
-#ifndef __UAPI_DEF_IPX_ROUTE_DEF
-#define __UAPI_DEF_IPX_ROUTE_DEF               1
-#endif
-
 /* Definitions for xattr.h */
 #ifndef __UAPI_DEF_XATTR
 #define __UAPI_DEF_XATTR               1
index a6aadb1effb12f8cb04d879b738b1fef7917ce15..aaa78e93553a31b1fd4fd8717eb680b983cf6aa6 100644 (file)
@@ -15,6 +15,7 @@ enum {
 enum {
        RDMA_NL_GROUP_IWPM = 2,
        RDMA_NL_GROUP_LS,
+       RDMA_NL_GROUP_NOTIFY,
        RDMA_NL_NUM_GROUPS
 };
 
@@ -305,6 +306,8 @@ enum rdma_nldev_command {
 
        RDMA_NLDEV_CMD_DELDEV,
 
+       RDMA_NLDEV_CMD_MONITOR,
+
        RDMA_NLDEV_NUM_OPS
 };
 
@@ -574,6 +577,9 @@ enum rdma_nldev_attr {
 
        RDMA_NLDEV_ATTR_NAME_ASSIGN_TYPE,       /* u8 */
 
+       RDMA_NLDEV_ATTR_EVENT_TYPE,             /* u8 */
+
+       RDMA_NLDEV_SYS_ATTR_MONITOR_MODE,       /* u8 */
        /*
         * Always the end
         */
@@ -624,4 +630,14 @@ enum rdma_nl_name_assign_type {
        RDMA_NAME_ASSIGN_TYPE_USER = 1, /* Provided by user-space */
 };
 
+/*
+ * Supported rdma monitoring event types.
+ */
+enum rdma_nl_notify_event_type {
+       RDMA_REGISTER_EVENT,
+       RDMA_UNREGISTER_EVENT,
+       RDMA_NETDEV_ATTACH_EVENT,
+       RDMA_NETDEV_DETACH_EVENT,
+};
+
 #endif /* _RDMA_NETLINK_H */
index 265347b90195d92b1a71b3d179658f56ffb639a4..3983c07f193dfdc98b235cfa34a1be8ad92f9e3b 100644 (file)
@@ -19,6 +19,7 @@ enum vdpa_command {
        VDPA_CMD_DEV_GET,               /* can dump */
        VDPA_CMD_DEV_CONFIG_GET,        /* can dump */
        VDPA_CMD_DEV_VSTATS_GET,
+       VDPA_CMD_DEV_ATTR_SET,
 };
 
 enum vdpa_attr {