Blame SOURCES/0014-update-UAPI-header-copies.patch

c96cf6
From 708dee5555dc4849bc03038048b9b9d08404f18e Mon Sep 17 00:00:00 2001
c96cf6
From: Jakub Kicinski <kuba@kernel.org>
c96cf6
Date: Thu, 10 Sep 2020 12:09:14 -0700
c96cf6
Subject: [PATCH 14/17] update UAPI header copies
c96cf6
c96cf6
Update to kernel commit 4f6a5caf187f.
c96cf6
c96cf6
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
c96cf6
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
c96cf6
(cherry picked from commit 1be081a983c94ab2eaa81686fbb9bcd707a2bac6)
c96cf6
---
c96cf6
 uapi/linux/ethtool.h         |  17 +++
c96cf6
 uapi/linux/ethtool_netlink.h |  55 +++++++++
c96cf6
 uapi/linux/if_link.h         | 227 ++++++++++++++++++++++++++++++++---
c96cf6
 uapi/linux/rtnetlink.h       |  46 +++----
c96cf6
 4 files changed, 305 insertions(+), 40 deletions(-)
c96cf6
c96cf6
diff --git a/uapi/linux/ethtool.h b/uapi/linux/ethtool.h
c96cf6
index 6074caa2f220..355e718a99fd 100644
c96cf6
--- a/uapi/linux/ethtool.h
c96cf6
+++ b/uapi/linux/ethtool.h
c96cf6
@@ -597,6 +597,7 @@ struct ethtool_pauseparam {
c96cf6
  * @ETH_SS_SOF_TIMESTAMPING: SOF_TIMESTAMPING_* flags
c96cf6
  * @ETH_SS_TS_TX_TYPES: timestamping Tx types
c96cf6
  * @ETH_SS_TS_RX_FILTERS: timestamping Rx filters
c96cf6
+ * @ETH_SS_UDP_TUNNEL_TYPES: UDP tunnel types
c96cf6
  */
c96cf6
 enum ethtool_stringset {
c96cf6
 	ETH_SS_TEST		= 0,
c96cf6
@@ -614,6 +615,7 @@ enum ethtool_stringset {
c96cf6
 	ETH_SS_SOF_TIMESTAMPING,
c96cf6
 	ETH_SS_TS_TX_TYPES,
c96cf6
 	ETH_SS_TS_RX_FILTERS,
c96cf6
+	ETH_SS_UDP_TUNNEL_TYPES,
c96cf6
 
c96cf6
 	/* add new constants above here */
c96cf6
 	ETH_SS_COUNT
c96cf6
@@ -1528,6 +1530,21 @@ enum ethtool_link_mode_bit_indices {
c96cf6
 	ETHTOOL_LINK_MODE_400000baseDR8_Full_BIT	 = 72,
c96cf6
 	ETHTOOL_LINK_MODE_400000baseCR8_Full_BIT	 = 73,
c96cf6
 	ETHTOOL_LINK_MODE_FEC_LLRS_BIT			 = 74,
c96cf6
+	ETHTOOL_LINK_MODE_100000baseKR_Full_BIT		 = 75,
c96cf6
+	ETHTOOL_LINK_MODE_100000baseSR_Full_BIT		 = 76,
c96cf6
+	ETHTOOL_LINK_MODE_100000baseLR_ER_FR_Full_BIT	 = 77,
c96cf6
+	ETHTOOL_LINK_MODE_100000baseCR_Full_BIT		 = 78,
c96cf6
+	ETHTOOL_LINK_MODE_100000baseDR_Full_BIT		 = 79,
c96cf6
+	ETHTOOL_LINK_MODE_200000baseKR2_Full_BIT	 = 80,
c96cf6
+	ETHTOOL_LINK_MODE_200000baseSR2_Full_BIT	 = 81,
c96cf6
+	ETHTOOL_LINK_MODE_200000baseLR2_ER2_FR2_Full_BIT = 82,
c96cf6
+	ETHTOOL_LINK_MODE_200000baseDR2_Full_BIT	 = 83,
c96cf6
+	ETHTOOL_LINK_MODE_200000baseCR2_Full_BIT	 = 84,
c96cf6
+	ETHTOOL_LINK_MODE_400000baseKR4_Full_BIT	 = 85,
c96cf6
+	ETHTOOL_LINK_MODE_400000baseSR4_Full_BIT	 = 86,
c96cf6
+	ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT = 87,
c96cf6
+	ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT	 = 88,
c96cf6
+	ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT	 = 89,
c96cf6
 	/* must be last entry */
c96cf6
 	__ETHTOOL_LINK_MODE_MASK_NBITS
c96cf6
 };
c96cf6
diff --git a/uapi/linux/ethtool_netlink.h b/uapi/linux/ethtool_netlink.h
c96cf6
index b18e7bc539f2..c1b4d67d35d1 100644
c96cf6
--- a/uapi/linux/ethtool_netlink.h
c96cf6
+++ b/uapi/linux/ethtool_netlink.h
c96cf6
@@ -41,6 +41,7 @@ enum {
c96cf6
 	ETHTOOL_MSG_TSINFO_GET,
c96cf6
 	ETHTOOL_MSG_CABLE_TEST_ACT,
c96cf6
 	ETHTOOL_MSG_CABLE_TEST_TDR_ACT,
c96cf6
+	ETHTOOL_MSG_TUNNEL_INFO_GET,
c96cf6
 
c96cf6
 	/* add new constants above here */
c96cf6
 	__ETHTOOL_MSG_USER_CNT,
c96cf6
@@ -554,6 +555,60 @@ enum {
c96cf6
 	ETHTOOL_A_CABLE_TEST_TDR_NTF_MAX = __ETHTOOL_A_CABLE_TEST_TDR_NTF_CNT - 1
c96cf6
 };
c96cf6
 
c96cf6
+/* TUNNEL INFO */
c96cf6
+
c96cf6
+enum {
c96cf6
+	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN,
c96cf6
+	ETHTOOL_UDP_TUNNEL_TYPE_GENEVE,
c96cf6
+	ETHTOOL_UDP_TUNNEL_TYPE_VXLAN_GPE,
c96cf6
+
c96cf6
+	__ETHTOOL_UDP_TUNNEL_TYPE_CNT
c96cf6
+};
c96cf6
+
c96cf6
+enum {
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_ENTRY_UNSPEC,
c96cf6
+
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_ENTRY_PORT,		/* be16 */
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_ENTRY_TYPE,		/* u32 */
c96cf6
+
c96cf6
+	/* add new constants above here */
c96cf6
+	__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT,
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_ENTRY_MAX = (__ETHTOOL_A_TUNNEL_UDP_ENTRY_CNT - 1)
c96cf6
+};
c96cf6
+
c96cf6
+enum {
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE_UNSPEC,
c96cf6
+
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE_SIZE,		/* u32 */
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE_TYPES,		/* bitset */
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE_ENTRY,		/* nest - _UDP_ENTRY_* */
c96cf6
+
c96cf6
+	/* add new constants above here */
c96cf6
+	__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT,
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE_MAX = (__ETHTOOL_A_TUNNEL_UDP_TABLE_CNT - 1)
c96cf6
+};
c96cf6
+
c96cf6
+enum {
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_UNSPEC,
c96cf6
+
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_TABLE,			/* nest - _UDP_TABLE_* */
c96cf6
+
c96cf6
+	/* add new constants above here */
c96cf6
+	__ETHTOOL_A_TUNNEL_UDP_CNT,
c96cf6
+	ETHTOOL_A_TUNNEL_UDP_MAX = (__ETHTOOL_A_TUNNEL_UDP_CNT - 1)
c96cf6
+};
c96cf6
+
c96cf6
+enum {
c96cf6
+	ETHTOOL_A_TUNNEL_INFO_UNSPEC,
c96cf6
+	ETHTOOL_A_TUNNEL_INFO_HEADER,			/* nest - _A_HEADER_* */
c96cf6
+
c96cf6
+	ETHTOOL_A_TUNNEL_INFO_UDP_PORTS,		/* nest - _UDP_TABLE */
c96cf6
+
c96cf6
+	/* add new constants above here */
c96cf6
+	__ETHTOOL_A_TUNNEL_INFO_CNT,
c96cf6
+	ETHTOOL_A_TUNNEL_INFO_MAX = (__ETHTOOL_A_TUNNEL_INFO_CNT - 1)
c96cf6
+};
c96cf6
+
c96cf6
 /* generic netlink info */
c96cf6
 #define ETHTOOL_GENL_NAME "ethtool"
c96cf6
 #define ETHTOOL_GENL_VERSION 1
c96cf6
diff --git a/uapi/linux/if_link.h b/uapi/linux/if_link.h
c96cf6
index a8901a39a345..9d96890f9742 100644
c96cf6
--- a/uapi/linux/if_link.h
c96cf6
+++ b/uapi/linux/if_link.h
c96cf6
@@ -40,26 +40,197 @@ struct rtnl_link_stats {
c96cf6
 	__u32	rx_nohandler;		/* dropped, no handler found	*/
c96cf6
 };
c96cf6
 
c96cf6
-/* The main device statistics structure */
c96cf6
+/**
c96cf6
+ * struct rtnl_link_stats64 - The main device statistics structure.
c96cf6
+ *
c96cf6
+ * @rx_packets: Number of good packets received by the interface.
c96cf6
+ *   For hardware interfaces counts all good packets received from the device
c96cf6
+ *   by the host, including packets which host had to drop at various stages
c96cf6
+ *   of processing (even in the driver).
c96cf6
+ *
c96cf6
+ * @tx_packets: Number of packets successfully transmitted.
c96cf6
+ *   For hardware interfaces counts packets which host was able to successfully
c96cf6
+ *   hand over to the device, which does not necessarily mean that packets
c96cf6
+ *   had been successfully transmitted out of the device, only that device
c96cf6
+ *   acknowledged it copied them out of host memory.
c96cf6
+ *
c96cf6
+ * @rx_bytes: Number of good received bytes, corresponding to @rx_packets.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices should count the length of Ethernet Frames
c96cf6
+ *   excluding the FCS.
c96cf6
+ *
c96cf6
+ * @tx_bytes: Number of good transmitted bytes, corresponding to @tx_packets.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices should count the length of Ethernet Frames
c96cf6
+ *   excluding the FCS.
c96cf6
+ *
c96cf6
+ * @rx_errors: Total number of bad packets received on this network device.
c96cf6
+ *   This counter must include events counted by @rx_length_errors,
c96cf6
+ *   @rx_crc_errors, @rx_frame_errors and other errors not otherwise
c96cf6
+ *   counted.
c96cf6
+ *
c96cf6
+ * @tx_errors: Total number of transmit problems.
c96cf6
+ *   This counter must include events counter by @tx_aborted_errors,
c96cf6
+ *   @tx_carrier_errors, @tx_fifo_errors, @tx_heartbeat_errors,
c96cf6
+ *   @tx_window_errors and other errors not otherwise counted.
c96cf6
+ *
c96cf6
+ * @rx_dropped: Number of packets received but not processed,
c96cf6
+ *   e.g. due to lack of resources or unsupported protocol.
c96cf6
+ *   For hardware interfaces this counter should not include packets
c96cf6
+ *   dropped by the device which are counted separately in
c96cf6
+ *   @rx_missed_errors (since procfs folds those two counters together).
c96cf6
+ *
c96cf6
+ * @tx_dropped: Number of packets dropped on their way to transmission,
c96cf6
+ *   e.g. due to lack of resources.
c96cf6
+ *
c96cf6
+ * @multicast: Multicast packets received.
c96cf6
+ *   For hardware interfaces this statistic is commonly calculated
c96cf6
+ *   at the device level (unlike @rx_packets) and therefore may include
c96cf6
+ *   packets which did not reach the host.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter may be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.21 aMulticastFramesReceivedOK
c96cf6
+ *
c96cf6
+ * @collisions: Number of collisions during packet transmissions.
c96cf6
+ *
c96cf6
+ * @rx_length_errors: Number of packets dropped due to invalid length.
c96cf6
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter should be equivalent to a sum
c96cf6
+ *   of the following attributes:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.23 aInRangeLengthErrors
c96cf6
+ *    - 30.3.1.1.24 aOutOfRangeLengthField
c96cf6
+ *    - 30.3.1.1.25 aFrameTooLongErrors
c96cf6
+ *
c96cf6
+ * @rx_over_errors: Receiver FIFO overflow event counter.
c96cf6
+ *
c96cf6
+ *   Historically the count of overflow events. Such events may be
c96cf6
+ *   reported in the receive descriptors or via interrupts, and may
c96cf6
+ *   not correspond one-to-one with dropped packets.
c96cf6
+ *
c96cf6
+ *   The recommended interpretation for high speed interfaces is -
c96cf6
+ *   number of packets dropped because they did not fit into buffers
c96cf6
+ *   provided by the host, e.g. packets larger than MTU or next buffer
c96cf6
+ *   in the ring was not available for a scatter transfer.
c96cf6
+ *
c96cf6
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   This statistics was historically used interchangeably with
c96cf6
+ *   @rx_fifo_errors.
c96cf6
+ *
c96cf6
+ *   This statistic corresponds to hardware events and is not commonly used
c96cf6
+ *   on software devices.
c96cf6
+ *
c96cf6
+ * @rx_crc_errors: Number of packets received with a CRC error.
c96cf6
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter must be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.6 aFrameCheckSequenceErrors
c96cf6
+ *
c96cf6
+ * @rx_frame_errors: Receiver frame alignment errors.
c96cf6
+ *   Part of aggregate "frame" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter should be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.7 aAlignmentErrors
c96cf6
+ *
c96cf6
+ * @rx_fifo_errors: Receiver FIFO error counter.
c96cf6
+ *
c96cf6
+ *   Historically the count of overflow events. Those events may be
c96cf6
+ *   reported in the receive descriptors or via interrupts, and may
c96cf6
+ *   not correspond one-to-one with dropped packets.
c96cf6
+ *
c96cf6
+ *   This statistics was used interchangeably with @rx_over_errors.
c96cf6
+ *   Not recommended for use in drivers for high speed interfaces.
c96cf6
+ *
c96cf6
+ *   This statistic is used on software devices, e.g. to count software
c96cf6
+ *   packet queue overflow (can) or sequencing errors (GRE).
c96cf6
+ *
c96cf6
+ * @rx_missed_errors: Count of packets missed by the host.
c96cf6
+ *   Folded into the "drop" counter in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   Counts number of packets dropped by the device due to lack
c96cf6
+ *   of buffer space. This usually indicates that the host interface
c96cf6
+ *   is slower than the network interface, or host is not keeping up
c96cf6
+ *   with the receive packet rate.
c96cf6
+ *
c96cf6
+ *   This statistic corresponds to hardware events and is not used
c96cf6
+ *   on software devices.
c96cf6
+ *
c96cf6
+ * @tx_aborted_errors:
c96cf6
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
c96cf6
+ *   For IEEE 802.3 devices capable of half-duplex operation this counter
c96cf6
+ *   must be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.11 aFramesAbortedDueToXSColls
c96cf6
+ *
c96cf6
+ *   High speed interfaces may use this counter as a general device
c96cf6
+ *   discard counter.
c96cf6
+ *
c96cf6
+ * @tx_carrier_errors: Number of frame transmission errors due to loss
c96cf6
+ *   of carrier during transmission.
c96cf6
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter must be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.13 aCarrierSenseErrors
c96cf6
+ *
c96cf6
+ * @tx_fifo_errors: Number of frame transmission errors due to device
c96cf6
+ *   FIFO underrun / underflow. This condition occurs when the device
c96cf6
+ *   begins transmission of a frame but is unable to deliver the
c96cf6
+ *   entire frame to the transmitter in time for transmission.
c96cf6
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ * @tx_heartbeat_errors: Number of Heartbeat / SQE Test errors for
c96cf6
+ *   old half-duplex Ethernet.
c96cf6
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices possibly equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.2.1.4 aSQETestErrors
c96cf6
+ *
c96cf6
+ * @tx_window_errors: Number of frame transmission errors due
c96cf6
+ *   to late collisions (for Ethernet - after the first 64B of transmission).
c96cf6
+ *   Part of aggregate "carrier" errors in `/proc/net/dev`.
c96cf6
+ *
c96cf6
+ *   For IEEE 802.3 devices this counter must be equivalent to:
c96cf6
+ *
c96cf6
+ *    - 30.3.1.1.10 aLateCollisions
c96cf6
+ *
c96cf6
+ * @rx_compressed: Number of correctly received compressed packets.
c96cf6
+ *   This counters is only meaningful for interfaces which support
c96cf6
+ *   packet compression (e.g. CSLIP, PPP).
c96cf6
+ *
c96cf6
+ * @tx_compressed: Number of transmitted compressed packets.
c96cf6
+ *   This counters is only meaningful for interfaces which support
c96cf6
+ *   packet compression (e.g. CSLIP, PPP).
c96cf6
+ *
c96cf6
+ * @rx_nohandler: Number of packets received on the interface
c96cf6
+ *   but dropped by the networking stack because the device is
c96cf6
+ *   not designated to receive packets (e.g. backup link in a bond).
c96cf6
+ */
c96cf6
 struct rtnl_link_stats64 {
c96cf6
-	__u64	rx_packets;		/* total packets received	*/
c96cf6
-	__u64	tx_packets;		/* total packets transmitted	*/
c96cf6
-	__u64	rx_bytes;		/* total bytes received 	*/
c96cf6
-	__u64	tx_bytes;		/* total bytes transmitted	*/
c96cf6
-	__u64	rx_errors;		/* bad packets received		*/
c96cf6
-	__u64	tx_errors;		/* packet transmit problems	*/
c96cf6
-	__u64	rx_dropped;		/* no space in linux buffers	*/
c96cf6
-	__u64	tx_dropped;		/* no space available in linux	*/
c96cf6
-	__u64	multicast;		/* multicast packets received	*/
c96cf6
+	__u64	rx_packets;
c96cf6
+	__u64	tx_packets;
c96cf6
+	__u64	rx_bytes;
c96cf6
+	__u64	tx_bytes;
c96cf6
+	__u64	rx_errors;
c96cf6
+	__u64	tx_errors;
c96cf6
+	__u64	rx_dropped;
c96cf6
+	__u64	tx_dropped;
c96cf6
+	__u64	multicast;
c96cf6
 	__u64	collisions;
c96cf6
 
c96cf6
 	/* detailed rx_errors: */
c96cf6
 	__u64	rx_length_errors;
c96cf6
-	__u64	rx_over_errors;		/* receiver ring buff overflow	*/
c96cf6
-	__u64	rx_crc_errors;		/* recved pkt with crc error	*/
c96cf6
-	__u64	rx_frame_errors;	/* recv'd frame alignment error */
c96cf6
-	__u64	rx_fifo_errors;		/* recv'r fifo overrun		*/
c96cf6
-	__u64	rx_missed_errors;	/* receiver missed packet	*/
c96cf6
+	__u64	rx_over_errors;
c96cf6
+	__u64	rx_crc_errors;
c96cf6
+	__u64	rx_frame_errors;
c96cf6
+	__u64	rx_fifo_errors;
c96cf6
+	__u64	rx_missed_errors;
c96cf6
 
c96cf6
 	/* detailed tx_errors */
c96cf6
 	__u64	tx_aborted_errors;
c96cf6
@@ -71,8 +242,7 @@ struct rtnl_link_stats64 {
c96cf6
 	/* for cslip etc */
c96cf6
 	__u64	rx_compressed;
c96cf6
 	__u64	tx_compressed;
c96cf6
-
c96cf6
-	__u64	rx_nohandler;		/* dropped, no handler found	*/
c96cf6
+	__u64	rx_nohandler;
c96cf6
 };
c96cf6
 
c96cf6
 /* The struct should be in sync with struct ifmap */
c96cf6
@@ -170,12 +340,22 @@ enum {
c96cf6
 	IFLA_PROP_LIST,
c96cf6
 	IFLA_ALT_IFNAME, /* Alternative ifname */
c96cf6
 	IFLA_PERM_ADDRESS,
c96cf6
+	IFLA_PROTO_DOWN_REASON,
c96cf6
 	__IFLA_MAX
c96cf6
 };
c96cf6
 
c96cf6
 
c96cf6
 #define IFLA_MAX (__IFLA_MAX - 1)
c96cf6
 
c96cf6
+enum {
c96cf6
+	IFLA_PROTO_DOWN_REASON_UNSPEC,
c96cf6
+	IFLA_PROTO_DOWN_REASON_MASK,	/* u32, mask for reason bits */
c96cf6
+	IFLA_PROTO_DOWN_REASON_VALUE,   /* u32, reason bit value */
c96cf6
+
c96cf6
+	__IFLA_PROTO_DOWN_REASON_CNT,
c96cf6
+	IFLA_PROTO_DOWN_REASON_MAX = __IFLA_PROTO_DOWN_REASON_CNT - 1
c96cf6
+};
c96cf6
+
c96cf6
 /* backwards compatibility for userspace */
c96cf6
 #define IFLA_RTA(r)  ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
c96cf6
 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
c96cf6
@@ -342,6 +522,7 @@ enum {
c96cf6
 	IFLA_BRPORT_ISOLATED,
c96cf6
 	IFLA_BRPORT_BACKUP_PORT,
c96cf6
 	IFLA_BRPORT_MRP_RING_OPEN,
c96cf6
+	IFLA_BRPORT_MRP_IN_OPEN,
c96cf6
 	__IFLA_BRPORT_MAX
c96cf6
 };
c96cf6
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
c96cf6
@@ -904,7 +1085,14 @@ enum {
c96cf6
 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
c96cf6
 
c96cf6
 
c96cf6
-/* HSR section */
c96cf6
+/* HSR/PRP section, both uses same interface */
c96cf6
+
c96cf6
+/* Different redundancy protocols for hsr device */
c96cf6
+enum {
c96cf6
+	HSR_PROTOCOL_HSR,
c96cf6
+	HSR_PROTOCOL_PRP,
c96cf6
+	HSR_PROTOCOL_MAX,
c96cf6
+};
c96cf6
 
c96cf6
 enum {
c96cf6
 	IFLA_HSR_UNSPEC,
c96cf6
@@ -914,6 +1102,9 @@ enum {
c96cf6
 	IFLA_HSR_SUPERVISION_ADDR,	/* Supervision frame multicast addr */
c96cf6
 	IFLA_HSR_SEQ_NR,
c96cf6
 	IFLA_HSR_VERSION,		/* HSR version */
c96cf6
+	IFLA_HSR_PROTOCOL,		/* Indicate different protocol than
c96cf6
+					 * HSR. For example PRP.
c96cf6
+					 */
c96cf6
 	__IFLA_HSR_MAX,
c96cf6
 };
c96cf6
 
c96cf6
diff --git a/uapi/linux/rtnetlink.h b/uapi/linux/rtnetlink.h
c96cf6
index bcb1ba4d0146..5ad84e663d01 100644
c96cf6
--- a/uapi/linux/rtnetlink.h
c96cf6
+++ b/uapi/linux/rtnetlink.h
c96cf6
@@ -257,12 +257,12 @@ enum {
c96cf6
 
c96cf6
 /* rtm_protocol */
c96cf6
 
c96cf6
-#define RTPROT_UNSPEC	0
c96cf6
-#define RTPROT_REDIRECT	1	/* Route installed by ICMP redirects;
c96cf6
-				   not used by current IPv4 */
c96cf6
-#define RTPROT_KERNEL	2	/* Route installed by kernel		*/
c96cf6
-#define RTPROT_BOOT	3	/* Route installed during boot		*/
c96cf6
-#define RTPROT_STATIC	4	/* Route installed by administrator	*/
c96cf6
+#define RTPROT_UNSPEC		0
c96cf6
+#define RTPROT_REDIRECT		1	/* Route installed by ICMP redirects;
c96cf6
+					   not used by current IPv4 */
c96cf6
+#define RTPROT_KERNEL		2	/* Route installed by kernel		*/
c96cf6
+#define RTPROT_BOOT		3	/* Route installed during boot		*/
c96cf6
+#define RTPROT_STATIC		4	/* Route installed by administrator	*/
c96cf6
 
c96cf6
 /* Values of protocol >= RTPROT_STATIC are not interpreted by kernel;
c96cf6
    they are just passed from user and back as is.
c96cf6
@@ -271,22 +271,23 @@ enum {
c96cf6
    avoid conflicts.
c96cf6
  */
c96cf6
 
c96cf6
-#define RTPROT_GATED	8	/* Apparently, GateD */
c96cf6
-#define RTPROT_RA	9	/* RDISC/ND router advertisements */
c96cf6
-#define RTPROT_MRT	10	/* Merit MRT */
c96cf6
-#define RTPROT_ZEBRA	11	/* Zebra */
c96cf6
-#define RTPROT_BIRD	12	/* BIRD */
c96cf6
-#define RTPROT_DNROUTED	13	/* DECnet routing daemon */
c96cf6
-#define RTPROT_XORP	14	/* XORP */
c96cf6
-#define RTPROT_NTK	15	/* Netsukuku */
c96cf6
-#define RTPROT_DHCP	16      /* DHCP client */
c96cf6
-#define RTPROT_MROUTED	17      /* Multicast daemon */
c96cf6
-#define RTPROT_BABEL	42      /* Babel daemon */
c96cf6
-#define RTPROT_BGP	186     /* BGP Routes */
c96cf6
-#define RTPROT_ISIS	187     /* ISIS Routes */
c96cf6
-#define RTPROT_OSPF	188     /* OSPF Routes */
c96cf6
-#define RTPROT_RIP	189     /* RIP Routes */
c96cf6
-#define RTPROT_EIGRP	192     /* EIGRP Routes */
c96cf6
+#define RTPROT_GATED		8	/* Apparently, GateD */
c96cf6
+#define RTPROT_RA		9	/* RDISC/ND router advertisements */
c96cf6
+#define RTPROT_MRT		10	/* Merit MRT */
c96cf6
+#define RTPROT_ZEBRA		11	/* Zebra */
c96cf6
+#define RTPROT_BIRD		12	/* BIRD */
c96cf6
+#define RTPROT_DNROUTED		13	/* DECnet routing daemon */
c96cf6
+#define RTPROT_XORP		14	/* XORP */
c96cf6
+#define RTPROT_NTK		15	/* Netsukuku */
c96cf6
+#define RTPROT_DHCP		16	/* DHCP client */
c96cf6
+#define RTPROT_MROUTED		17	/* Multicast daemon */
c96cf6
+#define RTPROT_KEEPALIVED	18	/* Keepalived daemon */
c96cf6
+#define RTPROT_BABEL		42	/* Babel daemon */
c96cf6
+#define RTPROT_BGP		186	/* BGP Routes */
c96cf6
+#define RTPROT_ISIS		187	/* ISIS Routes */
c96cf6
+#define RTPROT_OSPF		188	/* OSPF Routes */
c96cf6
+#define RTPROT_RIP		189	/* RIP Routes */
c96cf6
+#define RTPROT_EIGRP		192	/* EIGRP Routes */
c96cf6
 
c96cf6
 /* rtm_scope
c96cf6
 
c96cf6
@@ -775,6 +776,7 @@ enum {
c96cf6
 #define RTEXT_FILTER_BRVLAN	(1 << 1)
c96cf6
 #define RTEXT_FILTER_BRVLAN_COMPRESSED	(1 << 2)
c96cf6
 #define	RTEXT_FILTER_SKIP_STATS	(1 << 3)
c96cf6
+#define RTEXT_FILTER_MRP	(1 << 4)
c96cf6
 
c96cf6
 /* End of information exported to user level */
c96cf6
 
c96cf6
-- 
c96cf6
2.26.2
c96cf6