Skip to content

Commit 3456399

Browse files
Manish Chopradavem330
authored andcommitted
qlcnic: Fix ordering of stats in stats buffer.
o When TX queues are not allocated, driver does not fill TX queues stats in the buffer. However, it is also not advancing data pointer by TX queue stats length, which would misplace all successive stats data in the buffer and will result in mismatch between stats strings and it's values. o Fix this by advancing data pointer by TX queue stats length when queues are not allocated. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 6c0fd0d commit 3456399

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,8 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev,
13431343
tx_ring = &adapter->tx_ring[ring];
13441344
data = qlcnic_fill_tx_queue_stats(data, tx_ring);
13451345
qlcnic_update_stats(adapter);
1346+
} else {
1347+
data += QLCNIC_TX_STATS_LEN;
13461348
}
13471349
}
13481350

0 commit comments

Comments
 (0)