Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 103497
b: refs/heads/master
c: e21ed35
h: refs/heads/master
i:
  103495: eb6f2c8
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Garzik committed Jul 11, 2008
1 parent 21bdb87 commit d4530f0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 661086df6cf35f62d0aec09ccb9164eb2baaaecd
refs/heads/master: e21ed3538f1946ea623caf28f1c44ede50224275
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/igb.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ struct igb_ring {
union {
/* TX */
struct {
struct igb_queue_stats tx_stats;
bool detect_tx_hung;
};
/* RX */
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ static const struct igb_stats igb_gstrings_stats[] = {
};

#define IGB_QUEUE_STATS_LEN \
((((((struct igb_adapter *)netdev->priv)->num_rx_queues > 1) ? \
((struct igb_adapter *)netdev->priv)->num_rx_queues : 0) + \
(((((struct igb_adapter *)netdev->priv)->num_tx_queues > 1) ? \
((struct igb_adapter *)netdev->priv)->num_tx_queues : 0))) * \
((((struct igb_adapter *)netdev->priv)->num_rx_queues + \
((struct igb_adapter *)netdev->priv)->num_tx_queues) * \
(sizeof(struct igb_queue_stats) / sizeof(u64)))
#define IGB_GLOBAL_STATS_LEN \
sizeof(igb_gstrings_stats) / sizeof(struct igb_stats)
Expand Down Expand Up @@ -1842,6 +1840,13 @@ static void igb_get_ethtool_stats(struct net_device *netdev,
data[i] = (igb_gstrings_stats[i].sizeof_stat ==
sizeof(u64)) ? *(u64 *)p : *(u32 *)p;
}
for (j = 0; j < adapter->num_tx_queues; j++) {
int k;
queue_stat = (u64 *)&adapter->tx_ring[j].tx_stats;
for (k = 0; k < stat_count; k++)
data[i + k] = queue_stat[k];
i += k;
}
for (j = 0; j < adapter->num_rx_queues; j++) {
int k;
queue_stat = (u64 *)&adapter->rx_ring[j].rx_stats;
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3431,6 +3431,8 @@ static bool igb_clean_tx_irq(struct igb_ring *tx_ring)
}
tx_ring->total_bytes += total_bytes;
tx_ring->total_packets += total_packets;
tx_ring->tx_stats.bytes += total_bytes;
tx_ring->tx_stats.packets += total_packets;
adapter->net_stats.tx_bytes += total_bytes;
adapter->net_stats.tx_packets += total_packets;
return retval;
Expand Down

0 comments on commit d4530f0

Please sign in to comment.