Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150499
b: refs/heads/master
c: 3ea73af
h: refs/heads/master
i:
  150497: 88f8ab3
  150495: ced861d
v: v3
  • Loading branch information
Jesper Dangaard Brouer authored and David S. Miller committed May 27, 2009
1 parent 6563c44 commit 060adc9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c0ab70ab9cc849af59ef6592bd652a938b21c79
refs/heads/master: 3ea73afafb8cd237a823ec5d0a0a2f2396b03b33
1 change: 1 addition & 0 deletions trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ static const struct igb_stats igb_gstrings_stats[] = {
{ "rx_crc_errors", IGB_STAT(stats.crcerrs) },
{ "rx_frame_errors", IGB_STAT(net_stats.rx_frame_errors) },
{ "rx_no_buffer_count", IGB_STAT(stats.rnbc) },
{ "rx_queue_drop_packet_count", IGB_STAT(net_stats.rx_fifo_errors) },
{ "rx_missed_errors", IGB_STAT(stats.mpc) },
{ "tx_aborted_errors", IGB_STAT(stats.ecol) },
{ "tx_carrier_errors", IGB_STAT(stats.tncrs) },
Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3590,6 +3590,7 @@ void igb_update_stats(struct igb_adapter *adapter)

if (hw->mac.type != e1000_82575) {
u32 rqdpc_tmp;
u64 rqdpc_total = 0;
int i;
/* Read out drops stats per RX queue. Notice RQDPC (Receive
* Queue Drop Packet Count) stats only gets incremented, if
Expand All @@ -3602,9 +3603,18 @@ void igb_update_stats(struct igb_adapter *adapter)
for (i = 0; i < adapter->num_rx_queues; i++) {
rqdpc_tmp = rd32(E1000_RQDPC(i)) & 0xFFF;
adapter->rx_ring[i].rx_stats.drops += rqdpc_tmp;
rqdpc_total += adapter->rx_ring[i].rx_stats.drops;
}
adapter->net_stats.rx_fifo_errors = rqdpc_total;
}

/* Note RNBC (Receive No Buffers Count) is an not an exact
* drop count as the hardware FIFO might save the day. Thats
* one of the reason for saving it in rx_fifo_errors, as its
* potentially not a true drop.
*/
adapter->net_stats.rx_fifo_errors += adapter->stats.rnbc;

/* RLEC on some newer hardware can be incorrect so build
* our own version based on RUC and ROC */
adapter->net_stats.rx_errors = adapter->stats.rxerrc +
Expand Down

0 comments on commit 060adc9

Please sign in to comment.