diff options
author | Jesse Brandeburg <jesse.brandeburg@intel.com> | 2008-09-11 22:59:29 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-09-24 18:54:58 -0400 |
commit | f6af803f0b7c8e46d72156b042e105b4d481b6c3 (patch) | |
tree | 7eaa4777155b9d17e49b9beedcd8628aac4e1ad0 /drivers/net/ixgbe/ixgbe_ethtool.c | |
parent | c431f97ef96026e6da7032a871a0789cf5a2eaea (diff) |
ixgbe: lro stats were not counted on first ethtool -Scall
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 928b97cc1700..4701abf3a59b 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
@@ -774,6 +774,14 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
774 | int j, k; | 774 | int j, k; |
775 | int i; | 775 | int i; |
776 | u64 aggregated = 0, flushed = 0, no_desc = 0; | 776 | u64 aggregated = 0, flushed = 0, no_desc = 0; |
777 | for (i = 0; i < adapter->num_rx_queues; i++) { | ||
778 | aggregated += adapter->rx_ring[i].lro_mgr.stats.aggregated; | ||
779 | flushed += adapter->rx_ring[i].lro_mgr.stats.flushed; | ||
780 | no_desc += adapter->rx_ring[i].lro_mgr.stats.no_desc; | ||
781 | } | ||
782 | adapter->lro_aggregated = aggregated; | ||
783 | adapter->lro_flushed = flushed; | ||
784 | adapter->lro_no_desc = no_desc; | ||
777 | 785 | ||
778 | ixgbe_update_stats(adapter); | 786 | ixgbe_update_stats(adapter); |
779 | for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { | 787 | for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { |
@@ -788,17 +796,11 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, | |||
788 | i += k; | 796 | i += k; |
789 | } | 797 | } |
790 | for (j = 0; j < adapter->num_rx_queues; j++) { | 798 | for (j = 0; j < adapter->num_rx_queues; j++) { |
791 | aggregated += adapter->rx_ring[j].lro_mgr.stats.aggregated; | ||
792 | flushed += adapter->rx_ring[j].lro_mgr.stats.flushed; | ||
793 | no_desc += adapter->rx_ring[j].lro_mgr.stats.no_desc; | ||
794 | queue_stat = (u64 *)&adapter->rx_ring[j].stats; | 799 | queue_stat = (u64 *)&adapter->rx_ring[j].stats; |
795 | for (k = 0; k < stat_count; k++) | 800 | for (k = 0; k < stat_count; k++) |
796 | data[i + k] = queue_stat[k]; | 801 | data[i + k] = queue_stat[k]; |
797 | i += k; | 802 | i += k; |
798 | } | 803 | } |
799 | adapter->lro_aggregated = aggregated; | ||
800 | adapter->lro_flushed = flushed; | ||
801 | adapter->lro_no_desc = no_desc; | ||
802 | } | 804 | } |
803 | 805 | ||
804 | static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, | 806 | static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, |