mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-24 18:38:38 +00:00
net/mlx4_en: Fix off-by-one in counters manipulation
This caused the en_stats_adder helper to accumulate a field which is
not related to the counter, fix that.
Fixes: a3333b35da
('net/mlx4_en: Moderate ethtool callback to show [..]')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7aab5159fa
commit
cae0633872
@ -139,7 +139,7 @@ static unsigned long en_stats_adder(__be64 *start, __be64 *next, int num)
|
||||
int i;
|
||||
int offset = next - start;
|
||||
|
||||
for (i = 0; i <= num; i++) {
|
||||
for (i = 0; i < num; i++) {
|
||||
ret += be64_to_cpu(*curr);
|
||||
curr += offset;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user