aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_link.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_link.h')
-rw-r--r--include/linux/if_link.h108
1 files changed, 108 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index d94963b379d..85c812db5a3 100644
--- a/include/linux/if_link.h
+++ b/include/linux/if_link.h
@@ -37,6 +37,38 @@ struct rtnl_link_stats {
37 __u32 tx_compressed; 37 __u32 tx_compressed;
38}; 38};
39 39
40struct rtnl_link_stats64 {
41 __u64 rx_packets; /* total packets received */
42 __u64 tx_packets; /* total packets transmitted */
43 __u64 rx_bytes; /* total bytes received */
44 __u64 tx_bytes; /* total bytes transmitted */
45 __u64 rx_errors; /* bad packets received */
46 __u64 tx_errors; /* packet transmit problems */
47 __u64 rx_dropped; /* no space in linux buffers */
48 __u64 tx_dropped; /* no space available in linux */
49 __u64 multicast; /* multicast packets received */
50 __u64 collisions;
51
52 /* detailed rx_errors: */
53 __u64 rx_length_errors;
54 __u64 rx_over_errors; /* receiver ring buff overflow */
55 __u64 rx_crc_errors; /* recved pkt with crc error */
56 __u64 rx_frame_errors; /* recv'd frame alignment error */
57 __u64 rx_fifo_errors; /* recv'r fifo overrun */
58 __u64 rx_missed_errors; /* receiver missed packet */
59
60 /* detailed tx_errors */
61 __u64 tx_aborted_errors;
62 __u64 tx_carrier_errors;
63 __u64 tx_fifo_errors;
64 __u64 tx_heartbeat_errors;
65 __u64 tx_window_errors;
66
67 /* for cslip etc */
68 __u64 rx_compressed;
69 __u64 tx_compressed;
70};
71
40/* The struct should be in sync with struct ifmap */ 72/* The struct should be in sync with struct ifmap */
41struct rtnl_link_ifmap { 73struct rtnl_link_ifmap {
42 __u64 mem_start; 74 __u64 mem_start;
@@ -80,6 +112,9 @@ enum {
80 IFLA_IFALIAS, 112 IFLA_IFALIAS,
81 IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */ 113 IFLA_NUM_VF, /* Number of VFs if device is SR-IOV PF */
82 IFLA_VFINFO_LIST, 114 IFLA_VFINFO_LIST,
115 IFLA_STATS64,
116 IFLA_VF_PORTS,
117 IFLA_PORT_SELF,
83 __IFLA_MAX 118 __IFLA_MAX
84}; 119};
85 120
@@ -241,4 +276,77 @@ struct ifla_vf_info {
241 __u32 qos; 276 __u32 qos;
242 __u32 tx_rate; 277 __u32 tx_rate;
243}; 278};
279
280/* VF ports management section
281 *
282 * Nested layout of set/get msg is:
283 *
284 * [IFLA_NUM_VF]
285 * [IFLA_VF_PORTS]
286 * [IFLA_VF_PORT]
287 * [IFLA_PORT_*], ...
288 * [IFLA_VF_PORT]
289 * [IFLA_PORT_*], ...
290 * ...
291 * [IFLA_PORT_SELF]
292 * [IFLA_PORT_*], ...
293 */
294
295enum {
296 IFLA_VF_PORT_UNSPEC,
297 IFLA_VF_PORT, /* nest */
298 __IFLA_VF_PORT_MAX,
299};
300
301#define IFLA_VF_PORT_MAX (__IFLA_VF_PORT_MAX - 1)
302
303enum {
304 IFLA_PORT_UNSPEC,
305 IFLA_PORT_VF, /* __u32 */
306 IFLA_PORT_PROFILE, /* string */
307 IFLA_PORT_VSI_TYPE, /* 802.1Qbg (pre-)standard VDP */
308 IFLA_PORT_INSTANCE_UUID, /* binary UUID */
309 IFLA_PORT_HOST_UUID, /* binary UUID */
310 IFLA_PORT_REQUEST, /* __u8 */
311 IFLA_PORT_RESPONSE, /* __u16, output only */
312 __IFLA_PORT_MAX,
313};
314
315#define IFLA_PORT_MAX (__IFLA_PORT_MAX - 1)
316
317#define PORT_PROFILE_MAX 40
318#define PORT_UUID_MAX 16
319#define PORT_SELF_VF -1
320
321enum {
322 PORT_REQUEST_PREASSOCIATE = 0,
323 PORT_REQUEST_PREASSOCIATE_RR,
324 PORT_REQUEST_ASSOCIATE,
325 PORT_REQUEST_DISASSOCIATE,
326};
327
328enum {
329 PORT_VDP_RESPONSE_SUCCESS = 0,
330 PORT_VDP_RESPONSE_INVALID_FORMAT,
331 PORT_VDP_RESPONSE_INSUFFICIENT_RESOURCES,
332 PORT_VDP_RESPONSE_UNUSED_VTID,
333 PORT_VDP_RESPONSE_VTID_VIOLATION,
334 PORT_VDP_RESPONSE_VTID_VERSION_VIOALTION,
335 PORT_VDP_RESPONSE_OUT_OF_SYNC,
336 /* 0x08-0xFF reserved for future VDP use */
337 PORT_PROFILE_RESPONSE_SUCCESS = 0x100,
338 PORT_PROFILE_RESPONSE_INPROGRESS,
339 PORT_PROFILE_RESPONSE_INVALID,
340 PORT_PROFILE_RESPONSE_BADSTATE,
341 PORT_PROFILE_RESPONSE_INSUFFICIENT_RESOURCES,
342 PORT_PROFILE_RESPONSE_ERROR,
343};
344
345struct ifla_port_vsi {
346 __u8 vsi_mgr_id;
347 __u8 vsi_type_id[3];
348 __u8 vsi_type_version;
349 __u8 pad[3];
350};
351
244#endif /* _LINUX_IF_LINK_H */ 352#endif /* _LINUX_IF_LINK_H */