1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 #ifndef _UAPI_LINUX_IF_LINK_H
3 #define _UAPI_LINUX_IF_LINK_H
5 #include <linux/types.h>
6 #include <linux/netlink.h>
8 /* This struct should be in sync with struct rtnl_link_stats64 */
9 struct rtnl_link_stats {
10 __u32 rx_packets; /* total packets received */
11 __u32 tx_packets; /* total packets transmitted */
12 __u32 rx_bytes; /* total bytes received */
13 __u32 tx_bytes; /* total bytes transmitted */
14 __u32 rx_errors; /* bad packets received */
15 __u32 tx_errors; /* packet transmit problems */
16 __u32 rx_dropped; /* no space in linux buffers */
17 __u32 tx_dropped; /* no space available in linux */
18 __u32 multicast; /* multicast packets received */
21 /* detailed rx_errors: */
22 __u32 rx_length_errors;
23 __u32 rx_over_errors; /* receiver ring buff overflow */
24 __u32 rx_crc_errors; /* recved pkt with crc error */
25 __u32 rx_frame_errors; /* recv'd frame alignment error */
26 __u32 rx_fifo_errors; /* recv'r fifo overrun */
27 __u32 rx_missed_errors; /* receiver missed packet */
29 /* detailed tx_errors */
30 __u32 tx_aborted_errors;
31 __u32 tx_carrier_errors;
33 __u32 tx_heartbeat_errors;
34 __u32 tx_window_errors;
40 __u32 rx_nohandler; /* dropped, no handler found */
43 /* The main device statistics structure */
44 struct rtnl_link_stats64 {
45 __u64 rx_packets; /* total packets received */
46 __u64 tx_packets; /* total packets transmitted */
47 __u64 rx_bytes; /* total bytes received */
48 __u64 tx_bytes; /* total bytes transmitted */
49 __u64 rx_errors; /* bad packets received */
50 __u64 tx_errors; /* packet transmit problems */
51 __u64 rx_dropped; /* no space in linux buffers */
52 __u64 tx_dropped; /* no space available in linux */
53 __u64 multicast; /* multicast packets received */
56 /* detailed rx_errors: */
57 __u64 rx_length_errors;
58 __u64 rx_over_errors; /* receiver ring buff overflow */
59 __u64 rx_crc_errors; /* recved pkt with crc error */
60 __u64 rx_frame_errors; /* recv'd frame alignment error */
61 __u64 rx_fifo_errors; /* recv'r fifo overrun */
62 __u64 rx_missed_errors; /* receiver missed packet */
64 /* detailed tx_errors */
65 __u64 tx_aborted_errors;
66 __u64 tx_carrier_errors;
68 __u64 tx_heartbeat_errors;
69 __u64 tx_window_errors;
75 __u64 rx_nohandler; /* dropped, no handler found */
78 /* The struct should be in sync with struct ifmap */
79 struct rtnl_link_ifmap {
90 * Contains nested attributes for address family specific attributes.
91 * Each address family may create a attribute with the address family
92 * number as type and create its own attribute structure in it.
97 * [IFLA_INET_CONF] = ...,
100 * [IFLA_INET6_FLAGS] = ...,
101 * [IFLA_INET6_CONF] = ...,
116 #define IFLA_COST IFLA_COST
118 #define IFLA_PRIORITY IFLA_PRIORITY
120 #define IFLA_MASTER IFLA_MASTER
121 IFLA_WIRELESS, /* Wireless Extension event - see wireless.h */
122 #define IFLA_WIRELESS IFLA_WIRELESS
123 IFLA_PROTINFO, /* Protocol specific information for a link */
124 #define IFLA_PROTINFO IFLA_PROTINFO
126 #define IFLA_TXQLEN IFLA_TXQLEN
128 #define IFLA_MAP IFLA_MAP
130 #define IFLA_WEIGHT IFLA_WEIGHT
134 #define IFLA_LINKINFO IFLA_LINKINFO
137 IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
143 IFLA_GROUP, /* Group the device belongs to */
145 IFLA_EXT_MASK, /* Extended info mask, VFs, etc */
146 IFLA_PROMISCUITY, /* Promiscuity count: > 0 means acts PROMISC */
147 #define IFLA_PROMISCUITY IFLA_PROMISCUITY
152 IFLA_CARRIER_CHANGES,
164 IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, /* new alias */
165 IFLA_CARRIER_UP_COUNT,
166 IFLA_CARRIER_DOWN_COUNT,
171 IFLA_ALT_IFNAME, /* Alternative ifname */
177 #define IFLA_MAX (__IFLA_MAX - 1)
179 /* backwards compatibility for userspace */
181 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
182 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
191 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
198 IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
199 more not changeable by user. They describe link media
200 characteristics and set by device driver.
203 - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
204 - If neither of these three flags are set;
205 the interface is NBMA.
207 - IFF_MULTICAST does not mean anything special:
208 multicasts can be used on all not-NBMA links.
209 IFF_MULTICAST means that this media uses special encapsulation
210 for multicast frames. Apparently, all IFF_POINTOPOINT and
211 IFF_BROADCAST devices are able to use multicasts too.
215 For usual devices it is equal ifi_index.
216 If it is a "virtual interface" (f.e. tunnel), ifi_link
217 can point to real physical interface (f.e. for bandwidth calculations),
218 or maybe 0, what means, that real media is unknown (usual
219 for IPIP tunnels, when route to endpoint is allowed to change)
222 /* Subtype attributes for IFLA_PROTINFO */
225 IFLA_INET6_FLAGS, /* link flags */
226 IFLA_INET6_CONF, /* sysctl parameters */
227 IFLA_INET6_STATS, /* statistics */
228 IFLA_INET6_MCAST, /* MC things. What of them? */
229 IFLA_INET6_CACHEINFO, /* time values and max reasm size */
230 IFLA_INET6_ICMP6STATS, /* statistics (icmpv6) */
231 IFLA_INET6_TOKEN, /* device token */
232 IFLA_INET6_ADDR_GEN_MODE, /* implicit address generator mode */
236 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
238 enum in6_addr_gen_mode {
239 IN6_ADDR_GEN_MODE_EUI64,
240 IN6_ADDR_GEN_MODE_NONE,
241 IN6_ADDR_GEN_MODE_STABLE_PRIVACY,
242 IN6_ADDR_GEN_MODE_RANDOM,
249 IFLA_BR_FORWARD_DELAY,
255 IFLA_BR_VLAN_FILTERING,
256 IFLA_BR_VLAN_PROTOCOL,
257 IFLA_BR_GROUP_FWD_MASK,
261 IFLA_BR_ROOT_PATH_COST,
262 IFLA_BR_TOPOLOGY_CHANGE,
263 IFLA_BR_TOPOLOGY_CHANGE_DETECTED,
266 IFLA_BR_TOPOLOGY_CHANGE_TIMER,
270 IFLA_BR_MCAST_ROUTER,
271 IFLA_BR_MCAST_SNOOPING,
272 IFLA_BR_MCAST_QUERY_USE_IFADDR,
273 IFLA_BR_MCAST_QUERIER,
274 IFLA_BR_MCAST_HASH_ELASTICITY,
275 IFLA_BR_MCAST_HASH_MAX,
276 IFLA_BR_MCAST_LAST_MEMBER_CNT,
277 IFLA_BR_MCAST_STARTUP_QUERY_CNT,
278 IFLA_BR_MCAST_LAST_MEMBER_INTVL,
279 IFLA_BR_MCAST_MEMBERSHIP_INTVL,
280 IFLA_BR_MCAST_QUERIER_INTVL,
281 IFLA_BR_MCAST_QUERY_INTVL,
282 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL,
283 IFLA_BR_MCAST_STARTUP_QUERY_INTVL,
284 IFLA_BR_NF_CALL_IPTABLES,
285 IFLA_BR_NF_CALL_IP6TABLES,
286 IFLA_BR_NF_CALL_ARPTABLES,
287 IFLA_BR_VLAN_DEFAULT_PVID,
289 IFLA_BR_VLAN_STATS_ENABLED,
290 IFLA_BR_MCAST_STATS_ENABLED,
291 IFLA_BR_MCAST_IGMP_VERSION,
292 IFLA_BR_MCAST_MLD_VERSION,
293 IFLA_BR_VLAN_STATS_PER_PORT,
294 IFLA_BR_MULTI_BOOLOPT,
298 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
300 struct ifla_bridge_id {
302 __u8 addr[6]; /* ETH_ALEN */
312 IFLA_BRPORT_STATE, /* Spanning tree state */
313 IFLA_BRPORT_PRIORITY, /* " priority */
314 IFLA_BRPORT_COST, /* " cost */
315 IFLA_BRPORT_MODE, /* mode (hairpin) */
316 IFLA_BRPORT_GUARD, /* bpdu guard */
317 IFLA_BRPORT_PROTECT, /* root port protection */
318 IFLA_BRPORT_FAST_LEAVE, /* multicast fast leave */
319 IFLA_BRPORT_LEARNING, /* mac learning */
320 IFLA_BRPORT_UNICAST_FLOOD, /* flood unicast traffic */
321 IFLA_BRPORT_PROXYARP, /* proxy ARP */
322 IFLA_BRPORT_LEARNING_SYNC, /* mac learning sync from device */
323 IFLA_BRPORT_PROXYARP_WIFI, /* proxy ARP for Wi-Fi */
324 IFLA_BRPORT_ROOT_ID, /* designated root */
325 IFLA_BRPORT_BRIDGE_ID, /* designated bridge */
326 IFLA_BRPORT_DESIGNATED_PORT,
327 IFLA_BRPORT_DESIGNATED_COST,
330 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK,
331 IFLA_BRPORT_CONFIG_PENDING,
332 IFLA_BRPORT_MESSAGE_AGE_TIMER,
333 IFLA_BRPORT_FORWARD_DELAY_TIMER,
334 IFLA_BRPORT_HOLD_TIMER,
336 IFLA_BRPORT_MULTICAST_ROUTER,
338 IFLA_BRPORT_MCAST_FLOOD,
339 IFLA_BRPORT_MCAST_TO_UCAST,
340 IFLA_BRPORT_VLAN_TUNNEL,
341 IFLA_BRPORT_BCAST_FLOOD,
342 IFLA_BRPORT_GROUP_FWD_MASK,
343 IFLA_BRPORT_NEIGH_SUPPRESS,
344 IFLA_BRPORT_ISOLATED,
345 IFLA_BRPORT_BACKUP_PORT,
348 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
350 struct ifla_cacheinfo {
352 __u32 tstamp; /* ipv6InterfaceTable updated timestamp */
353 __u32 reachable_time;
362 IFLA_INFO_SLAVE_KIND,
363 IFLA_INFO_SLAVE_DATA,
367 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
375 IFLA_VLAN_EGRESS_QOS,
376 IFLA_VLAN_INGRESS_QOS,
381 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
383 struct ifla_vlan_flags {
389 IFLA_VLAN_QOS_UNSPEC,
390 IFLA_VLAN_QOS_MAPPING,
394 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
396 struct ifla_vlan_qos_mapping {
401 /* MACVLAN section */
406 IFLA_MACVLAN_MACADDR_MODE,
407 IFLA_MACVLAN_MACADDR,
408 IFLA_MACVLAN_MACADDR_DATA,
409 IFLA_MACVLAN_MACADDR_COUNT,
413 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
416 MACVLAN_MODE_PRIVATE = 1, /* don't talk to other macvlans */
417 MACVLAN_MODE_VEPA = 2, /* talk to other ports through ext bridge */
418 MACVLAN_MODE_BRIDGE = 4, /* talk to bridge ports directly */
419 MACVLAN_MODE_PASSTHRU = 8,/* take over the underlying device */
420 MACVLAN_MODE_SOURCE = 16,/* use source MAC address list to assign */
423 enum macvlan_macaddr_mode {
426 MACVLAN_MACADDR_FLUSH,
430 #define MACVLAN_FLAG_NOPROMISC 1
439 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
442 IFLA_VRF_PORT_UNSPEC,
447 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
455 IFLA_MACSEC_CIPHER_SUITE,
457 IFLA_MACSEC_ENCODING_SA,
463 IFLA_MACSEC_REPLAY_PROTECT,
464 IFLA_MACSEC_VALIDATION,
469 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
479 #define IFLA_XFRM_MAX (__IFLA_XFRM_MAX - 1)
481 enum macsec_validation_type {
482 MACSEC_VALIDATE_DISABLED = 0,
483 MACSEC_VALIDATE_CHECK = 1,
484 MACSEC_VALIDATE_STRICT = 2,
485 __MACSEC_VALIDATE_END,
486 MACSEC_VALIDATE_MAX = __MACSEC_VALIDATE_END - 1,
489 enum macsec_offload {
490 MACSEC_OFFLOAD_OFF = 0,
491 MACSEC_OFFLOAD_PHY = 1,
492 __MACSEC_OFFLOAD_END,
493 MACSEC_OFFLOAD_MAX = __MACSEC_OFFLOAD_END - 1,
504 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
513 #define IPVLAN_F_PRIVATE 0x01
514 #define IPVLAN_F_VEPA 0x02
520 IFLA_VXLAN_GROUP, /* group or remote address */
528 IFLA_VXLAN_PORT_RANGE, /* source port */
533 IFLA_VXLAN_PORT, /* destination port */
537 IFLA_VXLAN_UDP_ZERO_CSUM6_TX,
538 IFLA_VXLAN_UDP_ZERO_CSUM6_RX,
539 IFLA_VXLAN_REMCSUM_TX,
540 IFLA_VXLAN_REMCSUM_RX,
542 IFLA_VXLAN_REMCSUM_NOPARTIAL,
543 IFLA_VXLAN_COLLECT_METADATA,
546 IFLA_VXLAN_TTL_INHERIT,
550 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
552 struct ifla_vxlan_port_range {
562 VXLAN_DF_MAX = __VXLAN_DF_END - 1,
572 IFLA_GENEVE_PORT, /* destination port */
573 IFLA_GENEVE_COLLECT_METADATA,
575 IFLA_GENEVE_UDP_CSUM,
576 IFLA_GENEVE_UDP_ZERO_CSUM6_TX,
577 IFLA_GENEVE_UDP_ZERO_CSUM6_RX,
579 IFLA_GENEVE_TTL_INHERIT,
583 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
585 enum ifla_geneve_df {
590 GENEVE_DF_MAX = __GENEVE_DF_END - 1,
599 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
612 IFLA_GTP_PDP_HASHSIZE,
616 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
618 /* Bonding section */
623 IFLA_BOND_ACTIVE_SLAVE,
627 IFLA_BOND_USE_CARRIER,
628 IFLA_BOND_ARP_INTERVAL,
629 IFLA_BOND_ARP_IP_TARGET,
630 IFLA_BOND_ARP_VALIDATE,
631 IFLA_BOND_ARP_ALL_TARGETS,
633 IFLA_BOND_PRIMARY_RESELECT,
634 IFLA_BOND_FAIL_OVER_MAC,
635 IFLA_BOND_XMIT_HASH_POLICY,
636 IFLA_BOND_RESEND_IGMP,
637 IFLA_BOND_NUM_PEER_NOTIF,
638 IFLA_BOND_ALL_SLAVES_ACTIVE,
640 IFLA_BOND_LP_INTERVAL,
641 IFLA_BOND_PACKETS_PER_SLAVE,
642 IFLA_BOND_AD_LACP_RATE,
645 IFLA_BOND_AD_ACTOR_SYS_PRIO,
646 IFLA_BOND_AD_USER_PORT_KEY,
647 IFLA_BOND_AD_ACTOR_SYSTEM,
648 IFLA_BOND_TLB_DYNAMIC_LB,
649 IFLA_BOND_PEER_NOTIF_DELAY,
653 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
656 IFLA_BOND_AD_INFO_UNSPEC,
657 IFLA_BOND_AD_INFO_AGGREGATOR,
658 IFLA_BOND_AD_INFO_NUM_PORTS,
659 IFLA_BOND_AD_INFO_ACTOR_KEY,
660 IFLA_BOND_AD_INFO_PARTNER_KEY,
661 IFLA_BOND_AD_INFO_PARTNER_MAC,
662 __IFLA_BOND_AD_INFO_MAX,
665 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
668 IFLA_BOND_SLAVE_UNSPEC,
669 IFLA_BOND_SLAVE_STATE,
670 IFLA_BOND_SLAVE_MII_STATUS,
671 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT,
672 IFLA_BOND_SLAVE_PERM_HWADDR,
673 IFLA_BOND_SLAVE_QUEUE_ID,
674 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
675 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
676 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
677 __IFLA_BOND_SLAVE_MAX,
680 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
682 /* SR-IOV virtual function management section */
690 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
694 IFLA_VF_MAC, /* Hardware queue specific attributes */
695 IFLA_VF_VLAN, /* VLAN ID and QoS */
696 IFLA_VF_TX_RATE, /* Max TX Bandwidth Allocation */
697 IFLA_VF_SPOOFCHK, /* Spoof Checking on/off switch */
698 IFLA_VF_LINK_STATE, /* link state enable/disable/auto switch */
699 IFLA_VF_RATE, /* Min and Max TX Bandwidth Allocation */
700 IFLA_VF_RSS_QUERY_EN, /* RSS Redirection Table and Hash Key query
703 IFLA_VF_STATS, /* network device statistics */
704 IFLA_VF_TRUST, /* Trust VF */
705 IFLA_VF_IB_NODE_GUID, /* VF Infiniband node GUID */
706 IFLA_VF_IB_PORT_GUID, /* VF Infiniband port GUID */
707 IFLA_VF_VLAN_LIST, /* nested list of vlans, option for QinQ */
708 IFLA_VF_BROADCAST, /* VF broadcast */
712 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
716 __u8 mac[32]; /* MAX_ADDR_LEN */
719 struct ifla_vf_broadcast {
723 struct ifla_vf_vlan {
725 __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
730 IFLA_VF_VLAN_INFO_UNSPEC,
731 IFLA_VF_VLAN_INFO, /* VLAN ID, QoS and VLAN protocol */
732 __IFLA_VF_VLAN_INFO_MAX,
735 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
736 #define MAX_VLAN_LIST_LEN 1
738 struct ifla_vf_vlan_info {
740 __u32 vlan; /* 0 - 4095, 0 disables VLAN filter */
742 __be16 vlan_proto; /* VLAN protocol either 802.1Q or 802.1ad */
745 struct ifla_vf_tx_rate {
747 __u32 rate; /* Max TX bandwidth in Mbps, 0 disables throttling */
750 struct ifla_vf_rate {
752 __u32 min_tx_rate; /* Min Bandwidth in Mbps */
753 __u32 max_tx_rate; /* Max Bandwidth in Mbps */
756 struct ifla_vf_spoofchk {
761 struct ifla_vf_guid {
767 IFLA_VF_LINK_STATE_AUTO, /* link state of the uplink */
768 IFLA_VF_LINK_STATE_ENABLE, /* link always up */
769 IFLA_VF_LINK_STATE_DISABLE, /* link always down */
770 __IFLA_VF_LINK_STATE_MAX,
773 struct ifla_vf_link_state {
778 struct ifla_vf_rss_query_en {
784 IFLA_VF_STATS_RX_PACKETS,
785 IFLA_VF_STATS_TX_PACKETS,
786 IFLA_VF_STATS_RX_BYTES,
787 IFLA_VF_STATS_TX_BYTES,
788 IFLA_VF_STATS_BROADCAST,
789 IFLA_VF_STATS_MULTICAST,
791 IFLA_VF_STATS_RX_DROPPED,
792 IFLA_VF_STATS_TX_DROPPED,
796 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
798 struct ifla_vf_trust {
803 /* VF ports management section
805 * Nested layout of set/get msg is:
820 IFLA_VF_PORT, /* nest */
824 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
828 IFLA_PORT_VF, /* __u32 */
829 IFLA_PORT_PROFILE, /* string */
830 IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */
831 IFLA_PORT_INSTANCE_UUID, /* binary UUID */
832 IFLA_PORT_HOST_UUID, /* binary UUID */
833 IFLA_PORT_REQUEST, /* __u8 */
834 IFLA_PORT_RESPONSE, /* __u16, output only */
838 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
840 #define PORT_PROFILE_MAX 40
841 #define PORT_UUID_MAX 16
842 #define PORT_SELF_VF -1
845 PORT_REQUEST_PREASSOCIATE = 0,
846 PORT_REQUEST_PREASSOCIATE_RR,
847 PORT_REQUEST_ASSOCIATE,
848 PORT_REQUEST_DISASSOCIATE,
852 PORT_VDP_RESPONSE_SUCCESS = 0,
853 PORT_VDP_RESPONSE_INVALID_FORMAT,
854 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
855 PORT_VDP_RESPONSE_UNUSED_VTID,
856 PORT_VDP_RESPONSE_VTID_VIOLATION,
857 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
858 PORT_VDP_RESPONSE_OUT_OF_SYNC,
859 /* 0x08-0xFF reserved for future VDP use */
860 PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
861 PORT_PROFILE_RESPONSE_INPROGRESS,
862 PORT_PROFILE_RESPONSE_INVALID,
863 PORT_PROFILE_RESPONSE_BADSTATE,
864 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
865 PORT_PROFILE_RESPONSE_ERROR,
868 struct ifla_port_vsi {
871 __u8 vsi_type_version;
887 IPOIB_MODE_DATAGRAM = 0, /* using unreliable datagram QPs */
888 IPOIB_MODE_CONNECTED = 1, /* using connected QPs */
891 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
900 IFLA_HSR_MULTICAST_SPEC, /* Last byte of supervision addr */
901 IFLA_HSR_SUPERVISION_ADDR, /* Supervision frame multicast addr */
903 IFLA_HSR_VERSION, /* HSR version */
907 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
911 struct if_stats_msg {
919 /* A stats attribute can be netdev specific or a global stat.
920 * For netdev stats, lets use the prefix IFLA_STATS_LINK_*
923 IFLA_STATS_UNSPEC, /* also used as 64bit pad attribute */
925 IFLA_STATS_LINK_XSTATS,
926 IFLA_STATS_LINK_XSTATS_SLAVE,
927 IFLA_STATS_LINK_OFFLOAD_XSTATS,
932 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
934 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
936 /* These are embedded into IFLA_STATS_LINK_XSTATS:
937 * [IFLA_STATS_LINK_XSTATS]
938 * -> [LINK_XSTATS_TYPE_xxx]
939 * -> [rtnl link type specific attributes]
942 LINK_XSTATS_TYPE_UNSPEC,
943 LINK_XSTATS_TYPE_BRIDGE,
944 LINK_XSTATS_TYPE_BOND,
945 __LINK_XSTATS_TYPE_MAX
947 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
949 /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */
951 IFLA_OFFLOAD_XSTATS_UNSPEC,
952 IFLA_OFFLOAD_XSTATS_CPU_HIT, /* struct rtnl_link_stats64 */
953 __IFLA_OFFLOAD_XSTATS_MAX
955 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
959 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
960 #define XDP_FLAGS_SKB_MODE (1U << 1)
961 #define XDP_FLAGS_DRV_MODE (1U << 2)
962 #define XDP_FLAGS_HW_MODE (1U << 3)
963 #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \
964 XDP_FLAGS_DRV_MODE | \
966 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \
969 /* These are stored into IFLA_XDP_ATTACHED on dump. */
971 XDP_ATTACHED_NONE = 0,
984 IFLA_XDP_DRV_PROG_ID,
985 IFLA_XDP_SKB_PROG_ID,
990 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
994 IFLA_EVENT_REBOOT, /* internal reset / reboot */
995 IFLA_EVENT_FEATURES, /* change in offload features */
996 IFLA_EVENT_BONDING_FAILOVER, /* change in active slave */
997 IFLA_EVENT_NOTIFY_PEERS, /* re-sent grat. arp/ndisc */
998 IFLA_EVENT_IGMP_RESEND, /* re-sent IGMP JOIN */
999 IFLA_EVENT_BONDING_OPTIONS, /* change in bonding options */
1012 IFLA_TUN_MULTI_QUEUE,
1013 IFLA_TUN_NUM_QUEUES,
1014 IFLA_TUN_NUM_DISABLED_QUEUES,
1018 #define IFLA_TUN_MAX (__IFLA_TUN_MAX - 1)
1022 #define RMNET_FLAGS_INGRESS_DEAGGREGATION (1U << 0)
1023 #define RMNET_FLAGS_INGRESS_MAP_COMMANDS (1U << 1)
1024 #define RMNET_FLAGS_INGRESS_MAP_CKSUMV4 (1U << 2)
1025 #define RMNET_FLAGS_EGRESS_MAP_CKSUMV4 (1U << 3)
1034 #define IFLA_RMNET_MAX (__IFLA_RMNET_MAX - 1)
1036 struct ifla_rmnet_flags {
1041 #endif /* _UAPI_LINUX_IF_LINK_H */