naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone

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

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