myri10ge: 64bit slice stats
Subsystems (2)
PATCH 1/1 myri10ge: 64bit slice stats
There is a potential issue of internal 32bit stats wrapping before updating the external 64bit stats, thus leading to incorrect stats. Since there is no hardware necessity for these counters to be 32bit, change them to be 64bit to avoid this issue.
Patch suggested by Eric Dumazet.
--- drivers/net/myri10ge/myri10ge.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
drivers/net/myri10ge/myri10ge.c +6 -6
@@ -170,12 +170,12 @@ struct myri10ge_rx_done { };struct myri10ge_slice_netstats { -unsigned long rx_packets; -unsigned long tx_packets; -unsigned long rx_bytes; -unsigned long tx_bytes; -unsigned long rx_dropped; -unsigned long tx_dropped; +u64 rx_packets; +u64 tx_packets; +u64 rx_bytes; +u64 tx_bytes; +u64 rx_dropped; +u64 tx_dropped; };struct myri10ge_slice_state {
Signature · 1 line
1.7.5.4
Quoted 25 lines · Jon Mason
There is a potential issue of internal 32bit stats wrapping before updating the external 64bit stats, thus leading to incorrect stats. Since there is no hardware necessity for these counters to be 32bit, change them to be 64bit to avoid this issue.
Patch suggested by Eric Dumazet.
Signed-off-by Jon Mason <[email protected]>--- drivers/net/myri10ge/myri10ge.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)drivers/net/myri10ge/myri10ge.c +0
-5@@ -170,12 +170,12 @@ struct myri10ge_rx_done { };struct myri10ge_slice_netstats { -unsigned long rx_packets; -unsigned long tx_packets; -unsigned long rx_bytes; -unsigned long tx_bytes; -unsigned long rx_dropped;
drivers/net/myri10ge/myri10ge.c struct myri10ge_rx_done { · line 181
Quoted 10 lines
drivers/net/myri10ge/myri10ge.c +6
-1-unsigned long tx_dropped; +u64 rx_packets; +u64 tx_packets; +u64 rx_bytes; +u64 tx_bytes; +u64 rx_dropped; +u64 tx_dropped; };struct myri10ge_slice_state {
Hmm, no sorry, this wont work on 32bit arches :(
Please take a look at various patches addressing this problem.
Quoted 5 lines · Eric Dumazet
Hmm, no sorry, this wont work on 32bit arches :(
Please take a look at various patches addressing this problem.
For example take a look at the once sent some hours ago :