aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_ethtool.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/igb_ethtool.c')
-rw-r--r--drivers/net/igb/igb_ethtool.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index ef209b5cd390..7db183093768 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -93,6 +93,11 @@ static const struct igb_stats igb_gstrings_stats[] = {
93 { "tx_smbus", IGB_STAT(stats.mgptc) }, 93 { "tx_smbus", IGB_STAT(stats.mgptc) },
94 { "rx_smbus", IGB_STAT(stats.mgprc) }, 94 { "rx_smbus", IGB_STAT(stats.mgprc) },
95 { "dropped_smbus", IGB_STAT(stats.mgpdc) }, 95 { "dropped_smbus", IGB_STAT(stats.mgpdc) },
96#ifdef CONFIG_IGB_LRO
97 { "lro_aggregated", IGB_STAT(lro_aggregated) },
98 { "lro_flushed", IGB_STAT(lro_flushed) },
99 { "lro_no_desc", IGB_STAT(lro_no_desc) },
100#endif
96}; 101};
97 102
98#define IGB_QUEUE_STATS_LEN \ 103#define IGB_QUEUE_STATS_LEN \
@@ -1917,6 +1922,18 @@ static void igb_get_ethtool_stats(struct net_device *netdev,
1917 int stat_count = sizeof(struct igb_queue_stats) / sizeof(u64); 1922 int stat_count = sizeof(struct igb_queue_stats) / sizeof(u64);
1918 int j; 1923 int j;
1919 int i; 1924 int i;
1925#ifdef CONFIG_IGB_LRO
1926 int aggregated = 0, flushed = 0, no_desc = 0;
1927
1928 for (i = 0; i < adapter->num_rx_queues; i++) {
1929 aggregated += adapter->rx_ring[i].lro_mgr.stats.aggregated;
1930 flushed += adapter->rx_ring[i].lro_mgr.stats.flushed;
1931 no_desc += adapter->rx_ring[i].lro_mgr.stats.no_desc;
1932 }
1933 adapter->lro_aggregated = aggregated;
1934 adapter->lro_flushed = flushed;
1935 adapter->lro_no_desc = no_desc;
1936#endif
1920 1937
1921 igb_update_stats(adapter); 1938 igb_update_stats(adapter);
1922 for (i = 0; i < IGB_GLOBAL_STATS_LEN; i++) { 1939 for (i = 0; i < IGB_GLOBAL_STATS_LEN; i++) {