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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 4e463778bcfd..12990b1fe7e4 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -90,6 +90,8 @@ static struct ixgbe_stats ixgbe_gstrings_stats[] = {
90 {"rx_header_split", IXGBE_STAT(rx_hdr_split)}, 90 {"rx_header_split", IXGBE_STAT(rx_hdr_split)},
91 {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)}, 91 {"alloc_rx_page_failed", IXGBE_STAT(alloc_rx_page_failed)},
92 {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)}, 92 {"alloc_rx_buff_failed", IXGBE_STAT(alloc_rx_buff_failed)},
93 {"lro_aggregated", IXGBE_STAT(lro_aggregated)},
94 {"lro_flushed", IXGBE_STAT(lro_flushed)},
93}; 95};
94 96
95#define IXGBE_QUEUE_STATS_LEN \ 97#define IXGBE_QUEUE_STATS_LEN \
@@ -787,6 +789,7 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
787 int stat_count = sizeof(struct ixgbe_queue_stats) / sizeof(u64); 789 int stat_count = sizeof(struct ixgbe_queue_stats) / sizeof(u64);
788 int j, k; 790 int j, k;
789 int i; 791 int i;
792 u64 aggregated = 0, flushed = 0, no_desc = 0;
790 793
791 ixgbe_update_stats(adapter); 794 ixgbe_update_stats(adapter);
792 for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { 795 for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) {
@@ -801,11 +804,17 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
801 i += k; 804 i += k;
802 } 805 }
803 for (j = 0; j < adapter->num_rx_queues; j++) { 806 for (j = 0; j < adapter->num_rx_queues; j++) {
807 aggregated += adapter->rx_ring[j].lro_mgr.stats.aggregated;
808 flushed += adapter->rx_ring[j].lro_mgr.stats.flushed;
809 no_desc += adapter->rx_ring[j].lro_mgr.stats.no_desc;
804 queue_stat = (u64 *)&adapter->rx_ring[j].stats; 810 queue_stat = (u64 *)&adapter->rx_ring[j].stats;
805 for (k = 0; k < stat_count; k++) 811 for (k = 0; k < stat_count; k++)
806 data[i + k] = queue_stat[k]; 812 data[i + k] = queue_stat[k];
807 i += k; 813 i += k;
808 } 814 }
815 adapter->lro_aggregated = aggregated;
816 adapter->lro_flushed = flushed;
817 adapter->lro_no_desc = no_desc;
809} 818}
810 819
811static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, 820static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
@@ -973,6 +982,8 @@ static struct ethtool_ops ixgbe_ethtool_ops = {
973 .get_ethtool_stats = ixgbe_get_ethtool_stats, 982 .get_ethtool_stats = ixgbe_get_ethtool_stats,
974 .get_coalesce = ixgbe_get_coalesce, 983 .get_coalesce = ixgbe_get_coalesce,
975 .set_coalesce = ixgbe_set_coalesce, 984 .set_coalesce = ixgbe_set_coalesce,
985 .get_flags = ethtool_op_get_flags,
986 .set_flags = ethtool_op_set_flags,
976}; 987};
977 988
978void ixgbe_set_ethtool_ops(struct net_device *netdev) 989void ixgbe_set_ethtool_ops(struct net_device *netdev)