diff options
author | 2015-02-26 20:35:05 +0000 | |
---|---|---|
committer | 2015-03-04 15:40:54 -0500 | |
commit | 4398f9c817028b3b654923b3b614ea174cbc2c67 (patch) | |
tree | 9d96b086dfaacd00f69528cfa57d54acdf01cf2b /net/switchdev/switchdev.c | |
parent | sh_eth: Optionally log RX and TX status for each completed descriptor (diff) | |
download | linux-dev-4398f9c817028b3b654923b3b614ea174cbc2c67.tar.xz linux-dev-4398f9c817028b3b654923b3b614ea174cbc2c67.zip |
sh_eth: Mitigate lost statistics updates
The statistics registers have write-clear behaviour, which means we
will lose any increment between the read and write. Mitigate this by
only clearing when we read a non-zero value, so we will never falsely
report a total of zero. This also saves time as we only handle
error statistics here and they won't often be incremented.
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions