aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c40
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index fa314cb005a4..987b41c8eb48 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -48,11 +48,13 @@ struct ixgbe_stats {
48 48
49#define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \ 49#define IXGBE_STAT(m) sizeof(((struct ixgbe_adapter *)0)->m), \
50 offsetof(struct ixgbe_adapter, m) 50 offsetof(struct ixgbe_adapter, m)
51#define IXGBE_NETDEV_STAT(m) sizeof(((struct net_device *)0)->m), \
52 offsetof(struct net_device, m)
51static struct ixgbe_stats ixgbe_gstrings_stats[] = { 53static struct ixgbe_stats ixgbe_gstrings_stats[] = {
52 {"rx_packets", IXGBE_STAT(net_stats.rx_packets)}, 54 {"rx_packets", IXGBE_NETDEV_STAT(stats.rx_packets)},
53 {"tx_packets", IXGBE_STAT(net_stats.tx_packets)}, 55 {"tx_packets", IXGBE_NETDEV_STAT(stats.tx_packets)},
54 {"rx_bytes", IXGBE_STAT(net_stats.rx_bytes)}, 56 {"rx_bytes", IXGBE_NETDEV_STAT(stats.rx_bytes)},
55 {"tx_bytes", IXGBE_STAT(net_stats.tx_bytes)}, 57 {"tx_bytes", IXGBE_NETDEV_STAT(stats.tx_bytes)},
56 {"rx_pkts_nic", IXGBE_STAT(stats.gprc)}, 58 {"rx_pkts_nic", IXGBE_STAT(stats.gprc)},
57 {"tx_pkts_nic", IXGBE_STAT(stats.gptc)}, 59 {"tx_pkts_nic", IXGBE_STAT(stats.gptc)},
58 {"rx_bytes_nic", IXGBE_STAT(stats.gorc)}, 60 {"rx_bytes_nic", IXGBE_STAT(stats.gorc)},
@@ -60,26 +62,26 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = {
60 {"lsc_int", IXGBE_STAT(lsc_int)}, 62 {"lsc_int", IXGBE_STAT(lsc_int)},
61 {"tx_busy", IXGBE_STAT(tx_busy)}, 63 {"tx_busy", IXGBE_STAT(tx_busy)},
62 {"non_eop_descs", IXGBE_STAT(non_eop_descs)}, 64 {"non_eop_descs", IXGBE_STAT(non_eop_descs)},
63 {"rx_errors", IXGBE_STAT(net_stats.rx_errors)}, 65 {"rx_errors", IXGBE_NETDEV_STAT(stats.rx_errors)},
64 {"tx_errors", IXGBE_STAT(net_stats.tx_errors)}, 66 {"tx_errors", IXGBE_NETDEV_STAT(stats.tx_errors)},
65 {"rx_dropped", IXGBE_STAT(net_stats.rx_dropped)}, 67 {"rx_dropped", IXGBE_NETDEV_STAT(stats.rx_dropped)},
66 {"tx_dropped", IXGBE_STAT(net_stats.tx_dropped)}, 68 {"tx_dropped", IXGBE_NETDEV_STAT(stats.tx_dropped)},
67 {"multicast", IXGBE_STAT(net_stats.multicast)}, 69 {"multicast", IXGBE_NETDEV_STAT(stats.multicast)},
68 {"broadcast", IXGBE_STAT(stats.bprc)}, 70 {"broadcast", IXGBE_STAT(stats.bprc)},
69 {"rx_no_buffer_count", IXGBE_STAT(stats.rnbc[0]) }, 71 {"rx_no_buffer_count", IXGBE_STAT(stats.rnbc[0]) },
70 {"collisions", IXGBE_STAT(net_stats.collisions)}, 72 {"collisions", IXGBE_NETDEV_STAT(stats.collisions)},
71 {"rx_over_errors", IXGBE_STAT(net_stats.rx_over_errors)}, 73 {"rx_over_errors", IXGBE_NETDEV_STAT(stats.rx_over_errors)},
72 {"rx_crc_errors", IXGBE_STAT(net_stats.rx_crc_errors)}, 74 {"rx_crc_errors", IXGBE_NETDEV_STAT(stats.rx_crc_errors)},
73 {"rx_frame_errors", IXGBE_STAT(net_stats.rx_frame_errors)}, 75 {"rx_frame_errors", IXGBE_NETDEV_STAT(stats.rx_frame_errors)},
74 {"hw_rsc_count", IXGBE_STAT(rsc_count)}, 76 {"hw_rsc_count", IXGBE_STAT(rsc_count)},
75 {"fdir_match", IXGBE_STAT(stats.fdirmatch)}, 77 {"fdir_match", IXGBE_STAT(stats.fdirmatch)},
76 {"fdir_miss", IXGBE_STAT(stats.fdirmiss)}, 78 {"fdir_miss", IXGBE_STAT(stats.fdirmiss)},
77 {"rx_fifo_errors", IXGBE_STAT(net_stats.rx_fifo_errors)}, 79 {"rx_fifo_errors", IXGBE_NETDEV_STAT(stats.rx_fifo_errors)},
78 {"rx_missed_errors", IXGBE_STAT(net_stats.rx_missed_errors)}, 80 {"rx_missed_errors", IXGBE_NETDEV_STAT(stats.rx_missed_errors)},
79 {"tx_aborted_errors", IXGBE_STAT(net_stats.tx_aborted_errors)}, 81 {"tx_aborted_errors", IXGBE_NETDEV_STAT(stats.tx_aborted_errors)},
80 {"tx_carrier_errors", IXGBE_STAT(net_stats.tx_carrier_errors)}, 82 {"tx_carrier_errors", IXGBE_NETDEV_STAT(stats.tx_carrier_errors)},
81 {"tx_fifo_errors", IXGBE_STAT(net_stats.tx_fifo_errors)}, 83 {"tx_fifo_errors", IXGBE_NETDEV_STAT(stats.tx_fifo_errors)},
82 {"tx_heartbeat_errors", IXGBE_STAT(net_stats.tx_heartbeat_errors)}, 84 {"tx_heartbeat_errors", IXGBE_NETDEV_STAT(stats.tx_heartbeat_errors)},
83 {"tx_timeout_count", IXGBE_STAT(tx_timeout_count)}, 85 {"tx_timeout_count", IXGBE_STAT(tx_timeout_count)},
84 {"tx_restart_queue", IXGBE_STAT(restart_queue)}, 86 {"tx_restart_queue", IXGBE_STAT(restart_queue)},
85 {"rx_long_length_errors", IXGBE_STAT(stats.roc)}, 87 {"rx_long_length_errors", IXGBE_STAT(stats.roc)},