naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0001-Update-kernel-headers.patch

07a51b
From 4cd2ea662ae3255713a7de44e496e6ed32ade0c9 Mon Sep 17 00:00:00 2001
07a51b
From: Andrea Claudi <aclaudi@redhat.com>
07a51b
Date: Thu, 16 Apr 2020 12:41:48 +0200
07a51b
Subject: [PATCH] Update kernel headers
07a51b
07a51b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1770671
07a51b
Upstream Status: iproute2.git commit e3af717a8d410
07a51b
07a51b
commit e3af717a8d410c97d9e0b985219ab8fc9ff18b79
07a51b
Author: David Ahern <dsahern@gmail.com>
07a51b
Date:   Sun Aug 18 11:48:02 2019 -0700
07a51b
07a51b
    Update kernel headers
07a51b
07a51b
    Update kernel headers to commit:
07a51b
        d83d508b74c4 ("Merge branch 'stmmac-next'")
07a51b
07a51b
    Signed-off-by: David Ahern <dsahern@gmail.com>
07a51b
---
07a51b
 include/uapi/linux/bpf.h         | 37 ++++++++++++++++++-
07a51b
 include/uapi/linux/can/netlink.h |  6 ++--
07a51b
 include/uapi/linux/devlink.h     | 62 ++++++++++++++++++++++++++++++++
07a51b
 include/uapi/linux/if_bridge.h   |  1 +
07a51b
 4 files changed, 102 insertions(+), 4 deletions(-)
07a51b
07a51b
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
07a51b
index 1e08475275702..79701d3e66f0b 100644
07a51b
--- a/include/uapi/linux/bpf.h
07a51b
+++ b/include/uapi/linux/bpf.h
07a51b
@@ -134,6 +134,7 @@ enum bpf_map_type {
07a51b
 	BPF_MAP_TYPE_QUEUE,
07a51b
 	BPF_MAP_TYPE_STACK,
07a51b
 	BPF_MAP_TYPE_SK_STORAGE,
07a51b
+	BPF_MAP_TYPE_DEVMAP_HASH,
07a51b
 };
07a51b
 
07a51b
 /* Note that tracing related programs such as
07a51b
@@ -2713,6 +2714,33 @@ union bpf_attr {
07a51b
  *		**-EPERM** if no permission to send the *sig*.
07a51b
  *
07a51b
  *		**-EAGAIN** if bpf program can try again.
07a51b
+ *
07a51b
+ * s64 bpf_tcp_gen_syncookie(struct bpf_sock *sk, void *iph, u32 iph_len, struct tcphdr *th, u32 th_len)
07a51b
+ *	Description
07a51b
+ *		Try to issue a SYN cookie for the packet with corresponding
07a51b
+ *		IP/TCP headers, *iph* and *th*, on the listening socket in *sk*.
07a51b
+ *
07a51b
+ *		*iph* points to the start of the IPv4 or IPv6 header, while
07a51b
+ *		*iph_len* contains **sizeof**\ (**struct iphdr**) or
07a51b
+ *		**sizeof**\ (**struct ip6hdr**).
07a51b
+ *
07a51b
+ *		*th* points to the start of the TCP header, while *th_len*
07a51b
+ *		contains the length of the TCP header.
07a51b
+ *
07a51b
+ *	Return
07a51b
+ *		On success, lower 32 bits hold the generated SYN cookie in
07a51b
+ *		followed by 16 bits which hold the MSS value for that cookie,
07a51b
+ *		and the top 16 bits are unused.
07a51b
+ *
07a51b
+ *		On failure, the returned value is one of the following:
07a51b
+ *
07a51b
+ *		**-EINVAL** SYN cookie cannot be issued due to error
07a51b
+ *
07a51b
+ *		**-ENOENT** SYN cookie should not be issued (no SYN flood)
07a51b
+ *
07a51b
+ *		**-EOPNOTSUPP** kernel configuration does not enable SYN cookies
07a51b
+ *
07a51b
+ *		**-EPROTONOSUPPORT** IP packet version is not 4 or 6
07a51b
  */
07a51b
 #define __BPF_FUNC_MAPPER(FN)		\
07a51b
 	FN(unspec),			\
07a51b
@@ -2824,7 +2852,8 @@ union bpf_attr {
07a51b
 	FN(strtoul),			\
07a51b
 	FN(sk_storage_get),		\
07a51b
 	FN(sk_storage_delete),		\
07a51b
-	FN(send_signal),
07a51b
+	FN(send_signal),		\
07a51b
+	FN(tcp_gen_syncookie),
07a51b
 
07a51b
 /* integer value in 'imm' field of BPF_CALL instruction selects which helper
07a51b
  * function eBPF program intends to call
07a51b
@@ -3507,6 +3536,10 @@ enum bpf_task_fd_type {
07a51b
 	BPF_FD_TYPE_URETPROBE,		/* filename + offset */
07a51b
 };
07a51b
 
07a51b
+#define BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG		(1U << 0)
07a51b
+#define BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL		(1U << 1)
07a51b
+#define BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP		(1U << 2)
07a51b
+
07a51b
 struct bpf_flow_keys {
07a51b
 	__u16	nhoff;
07a51b
 	__u16	thoff;
07a51b
@@ -3528,6 +3561,8 @@ struct bpf_flow_keys {
07a51b
 			__u32	ipv6_dst[4];	/* in6_addr; network order */
07a51b
 		};
07a51b
 	};
07a51b
+	__u32	flags;
07a51b
+	__be32	flow_label;
07a51b
 };
07a51b
 
07a51b
 struct bpf_func_info {
07a51b
diff --git a/include/uapi/linux/can/netlink.h b/include/uapi/linux/can/netlink.h
07a51b
index f0c5e58b8ee76..c1f62640e87bc 100644
07a51b
--- a/include/uapi/linux/can/netlink.h
07a51b
+++ b/include/uapi/linux/can/netlink.h
07a51b
@@ -40,15 +40,15 @@ struct can_bittiming {
07a51b
 };
07a51b
 
07a51b
 /*
07a51b
- * CAN harware-dependent bit-timing constant
07a51b
+ * CAN hardware-dependent bit-timing constant
07a51b
  *
07a51b
  * Used for calculating and checking bit-timing parameters
07a51b
  */
07a51b
 struct can_bittiming_const {
07a51b
 	char name[16];		/* Name of the CAN controller hardware */
07a51b
-	__u32 tseg1_min;	/* Time segement 1 = prop_seg + phase_seg1 */
07a51b
+	__u32 tseg1_min;	/* Time segment 1 = prop_seg + phase_seg1 */
07a51b
 	__u32 tseg1_max;
07a51b
-	__u32 tseg2_min;	/* Time segement 2 = phase_seg2 */
07a51b
+	__u32 tseg2_min;	/* Time segment 2 = phase_seg2 */
07a51b
 	__u32 tseg2_max;
07a51b
 	__u32 sjw_max;		/* Synchronisation jump width */
07a51b
 	__u32 brp_min;		/* Bit-rate prescaler */
07a51b
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
07a51b
index fc195cbd66f45..3fb683bee6ba1 100644
07a51b
--- a/include/uapi/linux/devlink.h
07a51b
+++ b/include/uapi/linux/devlink.h
07a51b
@@ -107,6 +107,16 @@ enum devlink_command {
07a51b
 	DEVLINK_CMD_FLASH_UPDATE_END,		/* notification only */
07a51b
 	DEVLINK_CMD_FLASH_UPDATE_STATUS,	/* notification only */
07a51b
 
07a51b
+	DEVLINK_CMD_TRAP_GET,		/* can dump */
07a51b
+	DEVLINK_CMD_TRAP_SET,
07a51b
+	DEVLINK_CMD_TRAP_NEW,
07a51b
+	DEVLINK_CMD_TRAP_DEL,
07a51b
+
07a51b
+	DEVLINK_CMD_TRAP_GROUP_GET,	/* can dump */
07a51b
+	DEVLINK_CMD_TRAP_GROUP_SET,
07a51b
+	DEVLINK_CMD_TRAP_GROUP_NEW,
07a51b
+	DEVLINK_CMD_TRAP_GROUP_DEL,
07a51b
+
07a51b
 	/* add new commands above here */
07a51b
 	__DEVLINK_CMD_MAX,
07a51b
 	DEVLINK_CMD_MAX = __DEVLINK_CMD_MAX - 1
07a51b
@@ -194,6 +204,47 @@ enum devlink_param_fw_load_policy_value {
07a51b
 	DEVLINK_PARAM_FW_LOAD_POLICY_VALUE_FLASH,
07a51b
 };
07a51b
 
07a51b
+enum {
07a51b
+	DEVLINK_ATTR_STATS_RX_PACKETS,		/* u64 */
07a51b
+	DEVLINK_ATTR_STATS_RX_BYTES,		/* u64 */
07a51b
+
07a51b
+	__DEVLINK_ATTR_STATS_MAX,
07a51b
+	DEVLINK_ATTR_STATS_MAX = __DEVLINK_ATTR_STATS_MAX - 1
07a51b
+};
07a51b
+
07a51b
+/**
07a51b
+ * enum devlink_trap_action - Packet trap action.
07a51b
+ * @DEVLINK_TRAP_ACTION_DROP: Packet is dropped by the device and a copy is not
07a51b
+ *                            sent to the CPU.
07a51b
+ * @DEVLINK_TRAP_ACTION_TRAP: The sole copy of the packet is sent to the CPU.
07a51b
+ */
07a51b
+enum devlink_trap_action {
07a51b
+	DEVLINK_TRAP_ACTION_DROP,
07a51b
+	DEVLINK_TRAP_ACTION_TRAP,
07a51b
+};
07a51b
+
07a51b
+/**
07a51b
+ * enum devlink_trap_type - Packet trap type.
07a51b
+ * @DEVLINK_TRAP_TYPE_DROP: Trap reason is a drop. Trapped packets are only
07a51b
+ *                          processed by devlink and not injected to the
07a51b
+ *                          kernel's Rx path.
07a51b
+ * @DEVLINK_TRAP_TYPE_EXCEPTION: Trap reason is an exception. Packet was not
07a51b
+ *                               forwarded as intended due to an exception
07a51b
+ *                               (e.g., missing neighbour entry) and trapped to
07a51b
+ *                               control plane for resolution. Trapped packets
07a51b
+ *                               are processed by devlink and injected to
07a51b
+ *                               the kernel's Rx path.
07a51b
+ */
07a51b
+enum devlink_trap_type {
07a51b
+	DEVLINK_TRAP_TYPE_DROP,
07a51b
+	DEVLINK_TRAP_TYPE_EXCEPTION,
07a51b
+};
07a51b
+
07a51b
+enum {
07a51b
+	/* Trap can report input port as metadata */
07a51b
+	DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT,
07a51b
+};
07a51b
+
07a51b
 enum devlink_attr {
07a51b
 	/* don't change the order or add anything between, this is ABI! */
07a51b
 	DEVLINK_ATTR_UNSPEC,
07a51b
@@ -348,6 +399,17 @@ enum devlink_attr {
07a51b
 	DEVLINK_ATTR_PORT_PCI_PF_NUMBER,	/* u16 */
07a51b
 	DEVLINK_ATTR_PORT_PCI_VF_NUMBER,	/* u16 */
07a51b
 
07a51b
+	DEVLINK_ATTR_STATS,				/* nested */
07a51b
+
07a51b
+	DEVLINK_ATTR_TRAP_NAME,				/* string */
07a51b
+	/* enum devlink_trap_action */
07a51b
+	DEVLINK_ATTR_TRAP_ACTION,			/* u8 */
07a51b
+	/* enum devlink_trap_type */
07a51b
+	DEVLINK_ATTR_TRAP_TYPE,				/* u8 */
07a51b
+	DEVLINK_ATTR_TRAP_GENERIC,			/* flag */
07a51b
+	DEVLINK_ATTR_TRAP_METADATA,			/* nested */
07a51b
+	DEVLINK_ATTR_TRAP_GROUP_NAME,			/* string */
07a51b
+
07a51b
 	/* add new attributes above here, update the policy in devlink.c */
07a51b
 
07a51b
 	__DEVLINK_ATTR_MAX,
07a51b
diff --git a/include/uapi/linux/if_bridge.h b/include/uapi/linux/if_bridge.h
07a51b
index 04f763cf53029..31fc51bdedb3c 100644
07a51b
--- a/include/uapi/linux/if_bridge.h
07a51b
+++ b/include/uapi/linux/if_bridge.h
07a51b
@@ -237,6 +237,7 @@ struct br_mdb_entry {
07a51b
 #define MDB_PERMANENT 1
07a51b
 	__u8 state;
07a51b
 #define MDB_FLAGS_OFFLOAD	(1 << 0)
07a51b
+#define MDB_FLAGS_FAST_LEAVE	(1 << 1)
07a51b
 	__u8 flags;
07a51b
 	__u16 vid;
07a51b
 	struct {
07a51b
-- 
07a51b
2.25.4
07a51b