aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_link.h
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-11 04:57:29 -0500
committerDavid S. Miller <davem@davemloft.net>2010-03-17 00:23:22 -0400
commit10708f37ae729baba9b67bd134c3720709d4ae62 (patch)
treefa3e20c31e7d6907668d45eee702d02d646cae8f /include/linux/if_link.h
parent6ce1a6df6efbbeaa262a225a1a439ebc30a75d2e (diff)
net: core: add IFLA_STATS64 support
`ip -s link` shows interface counters truncated to 32 bit. This is because interface statistics are transported only in 32-bit quantity to userspace. This commit adds a new IFLA_STATS64 attribute that exports them in full 64 bit. References: http://lkml.indiana.edu/hypermail/linux/kernel/0307.3/0215.html Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_link.h')
-rw-r--r--include/linux/if_link.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/if_link.h b/include/linux/if_link.h
index c9bf92cd7653..cfd420ba72df 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;
@@ -83,6 +115,7 @@ enum {
83 IFLA_VF_VLAN, 115 IFLA_VF_VLAN,
84 IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */ 116 IFLA_VF_TX_RATE, /* TX Bandwidth Allocation */
85 IFLA_VFINFO, 117 IFLA_VFINFO,
118 IFLA_STATS64,
86 __IFLA_MAX 119 __IFLA_MAX
87}; 120};
88 121