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

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