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_CARRIER_UP_COUNT
,
165 IFLA_CARRIER_DOWN_COUNT
,
171 #define IFLA_MAX (__IFLA_MAX - 1)
173 /* backwards compatibility for userspace */
175 #define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
176 #define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
185 #define IFLA_INET_MAX (__IFLA_INET_MAX - 1)
192 IFF_LOOPBACK, IFF_BROADCAST and IFF_POINTOPOINT are
193 more not changeable by user. They describe link media
194 characteristics and set by device driver.
197 - Combination IFF_BROADCAST|IFF_POINTOPOINT is invalid
198 - If neither of these three flags are set;
199 the interface is NBMA.
201 - IFF_MULTICAST does not mean anything special:
202 multicasts can be used on all not-NBMA links.
203 IFF_MULTICAST means that this media uses special encapsulation
204 for multicast frames. Apparently, all IFF_POINTOPOINT and
205 IFF_BROADCAST devices are able to use multicasts too.
209 For usual devices it is equal ifi_index.
210 If it is a "virtual interface" (f.e. tunnel), ifi_link
211 can point to real physical interface (f.e. for bandwidth calculations),
212 or maybe 0, what means, that real media is unknown (usual
213 for IPIP tunnels, when route to endpoint is allowed to change)
216 /* Subtype attributes for IFLA_PROTINFO */
219 IFLA_INET6_FLAGS
, /* link flags */
220 IFLA_INET6_CONF
, /* sysctl parameters */
221 IFLA_INET6_STATS
, /* statistics */
222 IFLA_INET6_MCAST
, /* MC things. What of them? */
223 IFLA_INET6_CACHEINFO
, /* time values and max reasm size */
224 IFLA_INET6_ICMP6STATS
, /* statistics (icmpv6) */
225 IFLA_INET6_TOKEN
, /* device token */
226 IFLA_INET6_ADDR_GEN_MODE
, /* implicit address generator mode */
230 #define IFLA_INET6_MAX (__IFLA_INET6_MAX - 1)
232 enum in6_addr_gen_mode
{
233 IN6_ADDR_GEN_MODE_EUI64
,
234 IN6_ADDR_GEN_MODE_NONE
,
235 IN6_ADDR_GEN_MODE_STABLE_PRIVACY
,
236 IN6_ADDR_GEN_MODE_RANDOM
,
243 IFLA_BR_FORWARD_DELAY
,
249 IFLA_BR_VLAN_FILTERING
,
250 IFLA_BR_VLAN_PROTOCOL
,
251 IFLA_BR_GROUP_FWD_MASK
,
255 IFLA_BR_ROOT_PATH_COST
,
256 IFLA_BR_TOPOLOGY_CHANGE
,
257 IFLA_BR_TOPOLOGY_CHANGE_DETECTED
,
260 IFLA_BR_TOPOLOGY_CHANGE_TIMER
,
264 IFLA_BR_MCAST_ROUTER
,
265 IFLA_BR_MCAST_SNOOPING
,
266 IFLA_BR_MCAST_QUERY_USE_IFADDR
,
267 IFLA_BR_MCAST_QUERIER
,
268 IFLA_BR_MCAST_HASH_ELASTICITY
,
269 IFLA_BR_MCAST_HASH_MAX
,
270 IFLA_BR_MCAST_LAST_MEMBER_CNT
,
271 IFLA_BR_MCAST_STARTUP_QUERY_CNT
,
272 IFLA_BR_MCAST_LAST_MEMBER_INTVL
,
273 IFLA_BR_MCAST_MEMBERSHIP_INTVL
,
274 IFLA_BR_MCAST_QUERIER_INTVL
,
275 IFLA_BR_MCAST_QUERY_INTVL
,
276 IFLA_BR_MCAST_QUERY_RESPONSE_INTVL
,
277 IFLA_BR_MCAST_STARTUP_QUERY_INTVL
,
278 IFLA_BR_NF_CALL_IPTABLES
,
279 IFLA_BR_NF_CALL_IP6TABLES
,
280 IFLA_BR_NF_CALL_ARPTABLES
,
281 IFLA_BR_VLAN_DEFAULT_PVID
,
283 IFLA_BR_VLAN_STATS_ENABLED
,
284 IFLA_BR_MCAST_STATS_ENABLED
,
285 IFLA_BR_MCAST_IGMP_VERSION
,
286 IFLA_BR_MCAST_MLD_VERSION
,
290 #define IFLA_BR_MAX (__IFLA_BR_MAX - 1)
292 struct ifla_bridge_id
{
294 __u8 addr
[6]; /* ETH_ALEN */
304 IFLA_BRPORT_STATE
, /* Spanning tree state */
305 IFLA_BRPORT_PRIORITY
, /* " priority */
306 IFLA_BRPORT_COST
, /* " cost */
307 IFLA_BRPORT_MODE
, /* mode (hairpin) */
308 IFLA_BRPORT_GUARD
, /* bpdu guard */
309 IFLA_BRPORT_PROTECT
, /* root port protection */
310 IFLA_BRPORT_FAST_LEAVE
, /* multicast fast leave */
311 IFLA_BRPORT_LEARNING
, /* mac learning */
312 IFLA_BRPORT_UNICAST_FLOOD
, /* flood unicast traffic */
313 IFLA_BRPORT_PROXYARP
, /* proxy ARP */
314 IFLA_BRPORT_LEARNING_SYNC
, /* mac learning sync from device */
315 IFLA_BRPORT_PROXYARP_WIFI
, /* proxy ARP for Wi-Fi */
316 IFLA_BRPORT_ROOT_ID
, /* designated root */
317 IFLA_BRPORT_BRIDGE_ID
, /* designated bridge */
318 IFLA_BRPORT_DESIGNATED_PORT
,
319 IFLA_BRPORT_DESIGNATED_COST
,
322 IFLA_BRPORT_TOPOLOGY_CHANGE_ACK
,
323 IFLA_BRPORT_CONFIG_PENDING
,
324 IFLA_BRPORT_MESSAGE_AGE_TIMER
,
325 IFLA_BRPORT_FORWARD_DELAY_TIMER
,
326 IFLA_BRPORT_HOLD_TIMER
,
328 IFLA_BRPORT_MULTICAST_ROUTER
,
330 IFLA_BRPORT_MCAST_FLOOD
,
331 IFLA_BRPORT_MCAST_TO_UCAST
,
332 IFLA_BRPORT_VLAN_TUNNEL
,
333 IFLA_BRPORT_BCAST_FLOOD
,
334 IFLA_BRPORT_GROUP_FWD_MASK
,
335 IFLA_BRPORT_NEIGH_SUPPRESS
,
338 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
340 struct ifla_cacheinfo
{
342 __u32 tstamp
; /* ipv6InterfaceTable updated timestamp */
343 __u32 reachable_time
;
352 IFLA_INFO_SLAVE_KIND
,
353 IFLA_INFO_SLAVE_DATA
,
357 #define IFLA_INFO_MAX (__IFLA_INFO_MAX - 1)
365 IFLA_VLAN_EGRESS_QOS
,
366 IFLA_VLAN_INGRESS_QOS
,
371 #define IFLA_VLAN_MAX (__IFLA_VLAN_MAX - 1)
373 struct ifla_vlan_flags
{
379 IFLA_VLAN_QOS_UNSPEC
,
380 IFLA_VLAN_QOS_MAPPING
,
384 #define IFLA_VLAN_QOS_MAX (__IFLA_VLAN_QOS_MAX - 1)
386 struct ifla_vlan_qos_mapping
{
391 /* MACVLAN section */
396 IFLA_MACVLAN_MACADDR_MODE
,
397 IFLA_MACVLAN_MACADDR
,
398 IFLA_MACVLAN_MACADDR_DATA
,
399 IFLA_MACVLAN_MACADDR_COUNT
,
403 #define IFLA_MACVLAN_MAX (__IFLA_MACVLAN_MAX - 1)
406 MACVLAN_MODE_PRIVATE
= 1, /* don't talk to other macvlans */
407 MACVLAN_MODE_VEPA
= 2, /* talk to other ports through ext bridge */
408 MACVLAN_MODE_BRIDGE
= 4, /* talk to bridge ports directly */
409 MACVLAN_MODE_PASSTHRU
= 8,/* take over the underlying device */
410 MACVLAN_MODE_SOURCE
= 16,/* use source MAC address list to assign */
413 enum macvlan_macaddr_mode
{
416 MACVLAN_MACADDR_FLUSH
,
420 #define MACVLAN_FLAG_NOPROMISC 1
429 #define IFLA_VRF_MAX (__IFLA_VRF_MAX - 1)
432 IFLA_VRF_PORT_UNSPEC
,
437 #define IFLA_VRF_PORT_MAX (__IFLA_VRF_PORT_MAX - 1)
445 IFLA_MACSEC_CIPHER_SUITE
,
447 IFLA_MACSEC_ENCODING_SA
,
453 IFLA_MACSEC_REPLAY_PROTECT
,
454 IFLA_MACSEC_VALIDATION
,
459 #define IFLA_MACSEC_MAX (__IFLA_MACSEC_MAX - 1)
461 enum macsec_validation_type
{
462 MACSEC_VALIDATE_DISABLED
= 0,
463 MACSEC_VALIDATE_CHECK
= 1,
464 MACSEC_VALIDATE_STRICT
= 2,
465 __MACSEC_VALIDATE_END
,
466 MACSEC_VALIDATE_MAX
= __MACSEC_VALIDATE_END
- 1,
477 #define IFLA_IPVLAN_MAX (__IFLA_IPVLAN_MAX - 1)
486 #define IPVLAN_F_PRIVATE 0x01
487 #define IPVLAN_F_VEPA 0x02
493 IFLA_VXLAN_GROUP
, /* group or remote address */
501 IFLA_VXLAN_PORT_RANGE
, /* source port */
506 IFLA_VXLAN_PORT
, /* destination port */
510 IFLA_VXLAN_UDP_ZERO_CSUM6_TX
,
511 IFLA_VXLAN_UDP_ZERO_CSUM6_RX
,
512 IFLA_VXLAN_REMCSUM_TX
,
513 IFLA_VXLAN_REMCSUM_RX
,
515 IFLA_VXLAN_REMCSUM_NOPARTIAL
,
516 IFLA_VXLAN_COLLECT_METADATA
,
521 #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1)
523 struct ifla_vxlan_port_range
{
535 IFLA_GENEVE_PORT
, /* destination port */
536 IFLA_GENEVE_COLLECT_METADATA
,
538 IFLA_GENEVE_UDP_CSUM
,
539 IFLA_GENEVE_UDP_ZERO_CSUM6_TX
,
540 IFLA_GENEVE_UDP_ZERO_CSUM6_RX
,
544 #define IFLA_GENEVE_MAX (__IFLA_GENEVE_MAX - 1)
552 #define IFLA_PPP_MAX (__IFLA_PPP_MAX - 1)
565 IFLA_GTP_PDP_HASHSIZE
,
569 #define IFLA_GTP_MAX (__IFLA_GTP_MAX - 1)
571 /* Bonding section */
576 IFLA_BOND_ACTIVE_SLAVE
,
580 IFLA_BOND_USE_CARRIER
,
581 IFLA_BOND_ARP_INTERVAL
,
582 IFLA_BOND_ARP_IP_TARGET
,
583 IFLA_BOND_ARP_VALIDATE
,
584 IFLA_BOND_ARP_ALL_TARGETS
,
586 IFLA_BOND_PRIMARY_RESELECT
,
587 IFLA_BOND_FAIL_OVER_MAC
,
588 IFLA_BOND_XMIT_HASH_POLICY
,
589 IFLA_BOND_RESEND_IGMP
,
590 IFLA_BOND_NUM_PEER_NOTIF
,
591 IFLA_BOND_ALL_SLAVES_ACTIVE
,
593 IFLA_BOND_LP_INTERVAL
,
594 IFLA_BOND_PACKETS_PER_SLAVE
,
595 IFLA_BOND_AD_LACP_RATE
,
598 IFLA_BOND_AD_ACTOR_SYS_PRIO
,
599 IFLA_BOND_AD_USER_PORT_KEY
,
600 IFLA_BOND_AD_ACTOR_SYSTEM
,
601 IFLA_BOND_TLB_DYNAMIC_LB
,
605 #define IFLA_BOND_MAX (__IFLA_BOND_MAX - 1)
608 IFLA_BOND_AD_INFO_UNSPEC
,
609 IFLA_BOND_AD_INFO_AGGREGATOR
,
610 IFLA_BOND_AD_INFO_NUM_PORTS
,
611 IFLA_BOND_AD_INFO_ACTOR_KEY
,
612 IFLA_BOND_AD_INFO_PARTNER_KEY
,
613 IFLA_BOND_AD_INFO_PARTNER_MAC
,
614 __IFLA_BOND_AD_INFO_MAX
,
617 #define IFLA_BOND_AD_INFO_MAX (__IFLA_BOND_AD_INFO_MAX - 1)
620 IFLA_BOND_SLAVE_UNSPEC
,
621 IFLA_BOND_SLAVE_STATE
,
622 IFLA_BOND_SLAVE_MII_STATUS
,
623 IFLA_BOND_SLAVE_LINK_FAILURE_COUNT
,
624 IFLA_BOND_SLAVE_PERM_HWADDR
,
625 IFLA_BOND_SLAVE_QUEUE_ID
,
626 IFLA_BOND_SLAVE_AD_AGGREGATOR_ID
,
627 IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE
,
628 IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE
,
629 __IFLA_BOND_SLAVE_MAX
,
632 #define IFLA_BOND_SLAVE_MAX (__IFLA_BOND_SLAVE_MAX - 1)
634 /* SR-IOV virtual function management section */
642 #define IFLA_VF_INFO_MAX (__IFLA_VF_INFO_MAX - 1)
646 IFLA_VF_MAC
, /* Hardware queue specific attributes */
647 IFLA_VF_VLAN
, /* VLAN ID and QoS */
648 IFLA_VF_TX_RATE
, /* Max TX Bandwidth Allocation */
649 IFLA_VF_SPOOFCHK
, /* Spoof Checking on/off switch */
650 IFLA_VF_LINK_STATE
, /* link state enable/disable/auto switch */
651 IFLA_VF_RATE
, /* Min and Max TX Bandwidth Allocation */
652 IFLA_VF_RSS_QUERY_EN
, /* RSS Redirection Table and Hash Key query
655 IFLA_VF_STATS
, /* network device statistics */
656 IFLA_VF_TRUST
, /* Trust VF */
657 IFLA_VF_IB_NODE_GUID
, /* VF Infiniband node GUID */
658 IFLA_VF_IB_PORT_GUID
, /* VF Infiniband port GUID */
659 IFLA_VF_VLAN_LIST
, /* nested list of vlans, option for QinQ */
663 #define IFLA_VF_MAX (__IFLA_VF_MAX - 1)
667 __u8 mac
[32]; /* MAX_ADDR_LEN */
670 struct ifla_vf_vlan
{
672 __u32 vlan
; /* 0 - 4095, 0 disables VLAN filter */
677 IFLA_VF_VLAN_INFO_UNSPEC
,
678 IFLA_VF_VLAN_INFO
, /* VLAN ID, QoS and VLAN protocol */
679 __IFLA_VF_VLAN_INFO_MAX
,
682 #define IFLA_VF_VLAN_INFO_MAX (__IFLA_VF_VLAN_INFO_MAX - 1)
683 #define MAX_VLAN_LIST_LEN 1
685 struct ifla_vf_vlan_info
{
687 __u32 vlan
; /* 0 - 4095, 0 disables VLAN filter */
689 __be16 vlan_proto
; /* VLAN protocol either 802.1Q or 802.1ad */
692 struct ifla_vf_tx_rate
{
694 __u32 rate
; /* Max TX bandwidth in Mbps, 0 disables throttling */
697 struct ifla_vf_rate
{
699 __u32 min_tx_rate
; /* Min Bandwidth in Mbps */
700 __u32 max_tx_rate
; /* Max Bandwidth in Mbps */
703 struct ifla_vf_spoofchk
{
708 struct ifla_vf_guid
{
714 IFLA_VF_LINK_STATE_AUTO
, /* link state of the uplink */
715 IFLA_VF_LINK_STATE_ENABLE
, /* link always up */
716 IFLA_VF_LINK_STATE_DISABLE
, /* link always down */
717 __IFLA_VF_LINK_STATE_MAX
,
720 struct ifla_vf_link_state
{
725 struct ifla_vf_rss_query_en
{
731 IFLA_VF_STATS_RX_PACKETS
,
732 IFLA_VF_STATS_TX_PACKETS
,
733 IFLA_VF_STATS_RX_BYTES
,
734 IFLA_VF_STATS_TX_BYTES
,
735 IFLA_VF_STATS_BROADCAST
,
736 IFLA_VF_STATS_MULTICAST
,
738 IFLA_VF_STATS_RX_DROPPED
,
739 IFLA_VF_STATS_TX_DROPPED
,
743 #define IFLA_VF_STATS_MAX (__IFLA_VF_STATS_MAX - 1)
745 struct ifla_vf_trust
{
750 /* VF ports management section
752 * Nested layout of set/get msg is:
767 IFLA_VF_PORT
, /* nest */
771 #define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
775 IFLA_PORT_VF
, /* __u32 */
776 IFLA_PORT_PROFILE
, /* string */
777 IFLA_PORT_VSI_TYPE
, /* 802.1Qbg (pre-)standard VDP */
778 IFLA_PORT_INSTANCE_UUID
, /* binary UUID */
779 IFLA_PORT_HOST_UUID
, /* binary UUID */
780 IFLA_PORT_REQUEST
, /* __u8 */
781 IFLA_PORT_RESPONSE
, /* __u16, output only */
785 #define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
787 #define PORT_PROFILE_MAX 40
788 #define PORT_UUID_MAX 16
789 #define PORT_SELF_VF -1
792 PORT_REQUEST_PREASSOCIATE
= 0,
793 PORT_REQUEST_PREASSOCIATE_RR
,
794 PORT_REQUEST_ASSOCIATE
,
795 PORT_REQUEST_DISASSOCIATE
,
799 PORT_VDP_RESPONSE_SUCCESS
= 0,
800 PORT_VDP_RESPONSE_INVALID_FORMAT
,
801 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES
,
802 PORT_VDP_RESPONSE_UNUSED_VTID
,
803 PORT_VDP_RESPONSE_VTID_VIOLATION
,
804 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION
,
805 PORT_VDP_RESPONSE_OUT_OF_SYNC
,
806 /* 0x08-0xFF reserved for future VDP use */
807 PORT_PROFILE_RESPONSE_SUCCESS
= 0x100,
808 PORT_PROFILE_RESPONSE_INPROGRESS
,
809 PORT_PROFILE_RESPONSE_INVALID
,
810 PORT_PROFILE_RESPONSE_BADSTATE
,
811 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES
,
812 PORT_PROFILE_RESPONSE_ERROR
,
815 struct ifla_port_vsi
{
818 __u8 vsi_type_version
;
834 IPOIB_MODE_DATAGRAM
= 0, /* using unreliable datagram QPs */
835 IPOIB_MODE_CONNECTED
= 1, /* using connected QPs */
838 #define IFLA_IPOIB_MAX (__IFLA_IPOIB_MAX - 1)
847 IFLA_HSR_MULTICAST_SPEC
, /* Last byte of supervision addr */
848 IFLA_HSR_SUPERVISION_ADDR
, /* Supervision frame multicast addr */
850 IFLA_HSR_VERSION
, /* HSR version */
854 #define IFLA_HSR_MAX (__IFLA_HSR_MAX - 1)
858 struct if_stats_msg
{
866 /* A stats attribute can be netdev specific or a global stat.
867 * For netdev stats, lets use the prefix IFLA_STATS_LINK_*
870 IFLA_STATS_UNSPEC
, /* also used as 64bit pad attribute */
872 IFLA_STATS_LINK_XSTATS
,
873 IFLA_STATS_LINK_XSTATS_SLAVE
,
874 IFLA_STATS_LINK_OFFLOAD_XSTATS
,
879 #define IFLA_STATS_MAX (__IFLA_STATS_MAX - 1)
881 #define IFLA_STATS_FILTER_BIT(ATTR) (1 << (ATTR - 1))
883 /* These are embedded into IFLA_STATS_LINK_XSTATS:
884 * [IFLA_STATS_LINK_XSTATS]
885 * -> [LINK_XSTATS_TYPE_xxx]
886 * -> [rtnl link type specific attributes]
889 LINK_XSTATS_TYPE_UNSPEC
,
890 LINK_XSTATS_TYPE_BRIDGE
,
891 __LINK_XSTATS_TYPE_MAX
893 #define LINK_XSTATS_TYPE_MAX (__LINK_XSTATS_TYPE_MAX - 1)
895 /* These are stats embedded into IFLA_STATS_LINK_OFFLOAD_XSTATS */
897 IFLA_OFFLOAD_XSTATS_UNSPEC
,
898 IFLA_OFFLOAD_XSTATS_CPU_HIT
, /* struct rtnl_link_stats64 */
899 __IFLA_OFFLOAD_XSTATS_MAX
901 #define IFLA_OFFLOAD_XSTATS_MAX (__IFLA_OFFLOAD_XSTATS_MAX - 1)
905 #define XDP_FLAGS_UPDATE_IF_NOEXIST (1U << 0)
906 #define XDP_FLAGS_SKB_MODE (1U << 1)
907 #define XDP_FLAGS_DRV_MODE (1U << 2)
908 #define XDP_FLAGS_HW_MODE (1U << 3)
909 #define XDP_FLAGS_MODES (XDP_FLAGS_SKB_MODE | \
910 XDP_FLAGS_DRV_MODE | \
912 #define XDP_FLAGS_MASK (XDP_FLAGS_UPDATE_IF_NOEXIST | \
915 /* These are stored into IFLA_XDP_ATTACHED on dump. */
917 XDP_ATTACHED_NONE
= 0,
932 #define IFLA_XDP_MAX (__IFLA_XDP_MAX - 1)
936 IFLA_EVENT_REBOOT
, /* internal reset / reboot */
937 IFLA_EVENT_FEATURES
, /* change in offload features */
938 IFLA_EVENT_BONDING_FAILOVER
, /* change in active slave */
939 IFLA_EVENT_NOTIFY_PEERS
, /* re-sent grat. arp/ndisc */
940 IFLA_EVENT_IGMP_RESEND
, /* re-sent IGMP JOIN */
941 IFLA_EVENT_BONDING_OPTIONS
, /* change in bonding options */
944 #endif /* _UAPI_LINUX_IF_LINK_H */