Commit f6af803f authored by Jesse Brandeburg's avatar Jesse Brandeburg Committed by Jeff Garzik

ixgbe: lro stats were not counted on first ethtool -Scall

Signed-off-by: default avatarJesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent c431f97e
...@@ -774,6 +774,14 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, ...@@ -774,6 +774,14 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
int j, k; int j, k;
int i; int i;
u64 aggregated = 0, flushed = 0, no_desc = 0; u64 aggregated = 0, flushed = 0, no_desc = 0;
for (i = 0; i < adapter->num_rx_queues; i++) {
aggregated += adapter->rx_ring[i].lro_mgr.stats.aggregated;
flushed += adapter->rx_ring[i].lro_mgr.stats.flushed;
no_desc += adapter->rx_ring[i].lro_mgr.stats.no_desc;
}
adapter->lro_aggregated = aggregated;
adapter->lro_flushed = flushed;
adapter->lro_no_desc = no_desc;
ixgbe_update_stats(adapter); ixgbe_update_stats(adapter);
for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) { for (i = 0; i < IXGBE_GLOBAL_STATS_LEN; i++) {
...@@ -788,17 +796,11 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev, ...@@ -788,17 +796,11 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
i += k; i += k;
} }
for (j = 0; j < adapter->num_rx_queues; j++) { for (j = 0; j < adapter->num_rx_queues; j++) {
aggregated += adapter->rx_ring[j].lro_mgr.stats.aggregated;
flushed += adapter->rx_ring[j].lro_mgr.stats.flushed;
no_desc += adapter->rx_ring[j].lro_mgr.stats.no_desc;
queue_stat = (u64 *)&adapter->rx_ring[j].stats; queue_stat = (u64 *)&adapter->rx_ring[j].stats;
for (k = 0; k < stat_count; k++) for (k = 0; k < stat_count; k++)
data[i + k] = queue_stat[k]; data[i + k] = queue_stat[k];
i += k; i += k;
} }
adapter->lro_aggregated = aggregated;
adapter->lro_flushed = flushed;
adapter->lro_no_desc = no_desc;
} }
static void ixgbe_get_strings(struct net_device *netdev, u32 stringset, static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment