]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Update kernel headers
authorDavid Ahern <dsahern@kernel.org>
Sun, 3 Mar 2024 22:24:26 +0000 (22:24 +0000)
committerDavid Ahern <dsahern@kernel.org>
Sun, 3 Mar 2024 22:24:26 +0000 (22:24 +0000)
Update kernel headers to commit
    4b2765ae410a ("Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")

Signed-off-by: David Ahern <dsahern@kernel.org>
include/uapi/linux/bpf.h
include/uapi/linux/can.h
include/uapi/linux/in6.h
include/uapi/linux/ioam6_genl.h
include/uapi/linux/tc_act/tc_pedit.h

index dbf58b4171ddb33fcc875c75f5fe560d6e88c2a4..5156982e055437a88cf87b1eaf91f426d8cc2fe2 100644 (file)
@@ -77,12 +77,29 @@ struct bpf_insn {
        __s32   imm;            /* signed immediate constant */
 };
 
-/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry */
+/* Deprecated: use struct bpf_lpm_trie_key_u8 (when the "data" member is needed for
+ * byte access) or struct bpf_lpm_trie_key_hdr (when using an alternative type for
+ * the trailing flexible array member) instead.
+ */
 struct bpf_lpm_trie_key {
        __u32   prefixlen;      /* up to 32 for AF_INET, 128 for AF_INET6 */
        __u8    data[0];        /* Arbitrary size */
 };
 
+/* Header for bpf_lpm_trie_key structs */
+struct bpf_lpm_trie_key_hdr {
+       __u32   prefixlen;
+};
+
+/* Key of an a BPF_MAP_TYPE_LPM_TRIE entry, with trailing byte array. */
+struct bpf_lpm_trie_key_u8 {
+       union {
+               struct bpf_lpm_trie_key_hdr     hdr;
+               __u32                           prefixlen;
+       };
+       __u8    data[];         /* Arbitrary size */
+};
+
 struct bpf_cgroup_storage_key {
        __u64   cgroup_inode_id;        /* cgroup inode id */
        __u32   attach_type;            /* program attach type (enum bpf_attach_type) */
@@ -617,7 +634,11 @@ union bpf_iter_link_info {
  *             to NULL to begin the batched operation. After each subsequent
  *             **BPF_MAP_LOOKUP_BATCH**, the caller should pass the resultant
  *             *out_batch* as the *in_batch* for the next operation to
- *             continue iteration from the current point.
+ *             continue iteration from the current point. Both *in_batch* and
+ *             *out_batch* must point to memory large enough to hold a key,
+ *             except for maps of type **BPF_MAP_TYPE_{HASH, PERCPU_HASH,
+ *             LRU_HASH, LRU_PERCPU_HASH}**, for which batch parameters
+ *             must be at least 4 bytes wide regardless of key size.
  *
  *             The *keys* and *values* are output parameters which must point
  *             to memory large enough to hold *count* items based on the key
index 23d5bf4a561b11122403cee4e4303659703d6e97..229a77ffab075fe3d2eb9226b88d5638d03af741 100644 (file)
@@ -193,9 +193,14 @@ struct canfd_frame {
 #define CANXL_XLF 0x80 /* mandatory CAN XL frame flag (must always be set!) */
 #define CANXL_SEC 0x01 /* Simple Extended Content (security/segmentation) */
 
+/* the 8-bit VCID is optionally placed in the canxl_frame.prio element */
+#define CANXL_VCID_OFFSET 16 /* bit offset of VCID in prio element */
+#define CANXL_VCID_VAL_MASK 0xFFUL /* VCID is an 8-bit value */
+#define CANXL_VCID_MASK (CANXL_VCID_VAL_MASK << CANXL_VCID_OFFSET)
+
 /**
  * struct canxl_frame - CAN with e'X'tended frame 'L'ength frame structure
- * @prio:  11 bit arbitration priority with zero'ed CAN_*_FLAG flags
+ * @prio:  11 bit arbitration priority with zero'ed CAN_*_FLAG flags / VCID
  * @flags: additional flags for CAN XL
  * @sdt:   SDU (service data unit) type
  * @len:   frame payload length in byte (CANXL_MIN_DLEN .. CANXL_MAX_DLEN)
@@ -205,7 +210,7 @@ struct canfd_frame {
  * @prio shares the same position as @can_id from struct can[fd]_frame.
  */
 struct canxl_frame {
-       canid_t prio;  /* 11 bit priority for arbitration (canid_t) */
+       canid_t prio;  /* 11 bit priority for arbitration / 8 bit VCID */
        __u8    flags; /* additional flags for CAN XL */
        __u8    sdt;   /* SDU (service data unit) type */
        __u16   len;   /* frame payload length in byte */
index a17363e043bdace46d4abc014e4640466ef618dc..776fb41c50e40294d7d6a5656fdb99a8b34bcd3e 100644 (file)
@@ -145,7 +145,7 @@ struct in6_flowlabel_req {
 #define IPV6_TLV_PADN          1
 #define IPV6_TLV_ROUTERALERT   5
 #define IPV6_TLV_CALIPSO       7       /* RFC 5570 */
-#define IPV6_TLV_IOAM          49      /* TEMPORARY IANA allocation for IOAM */
+#define IPV6_TLV_IOAM          49      /* RFC 9486 */
 #define IPV6_TLV_JUMBO         194
 #define IPV6_TLV_HAO           201     /* home address option */
 
index 6043d9f60db826a20df9c12519409707e60ac99a..3f89b530c890c3f2f60008812bfb2473cfa39a90 100644 (file)
@@ -49,4 +49,24 @@ enum {
 
 #define IOAM6_CMD_MAX (__IOAM6_CMD_MAX - 1)
 
+#define IOAM6_GENL_EV_GRP_NAME "ioam6_events"
+
+enum ioam6_event_type {
+       IOAM6_EVENT_UNSPEC,
+       IOAM6_EVENT_TRACE,
+};
+
+enum ioam6_event_attr {
+       IOAM6_EVENT_ATTR_UNSPEC,
+
+       IOAM6_EVENT_ATTR_TRACE_NAMESPACE,       /* u16 */
+       IOAM6_EVENT_ATTR_TRACE_NODELEN,         /* u8 */
+       IOAM6_EVENT_ATTR_TRACE_TYPE,            /* u32 */
+       IOAM6_EVENT_ATTR_TRACE_DATA,            /* Binary */
+
+       __IOAM6_EVENT_ATTR_MAX
+};
+
+#define IOAM6_EVENT_ATTR_MAX (__IOAM6_EVENT_ATTR_MAX - 1)
+
 #endif /* _LINUX_IOAM6_GENL_H */
index f3e61b04fa01b4f728c74a8ef0589040f8e62349..f5cab7fc96ab1ea1516beeedff20b279c3cfa4d7 100644 (file)
@@ -62,7 +62,7 @@ struct tc_pedit_sel {
        tc_gen;
        unsigned char           nkeys;
        unsigned char           flags;
-       struct tc_pedit_key     keys[0];
+       struct tc_pedit_key     keys[] __counted_by(nkeys);
 };
 
 #define tc_pedit tc_pedit_sel