diff options
author | Thibaut VARENE <hacks@slashdirt.org> | 2017-08-04 12:32:04 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2017-09-01 09:30:35 +0200 |
commit | c30a70fc9fbc968fb0563feef0e661e46b65300f (patch) | |
tree | b9dae1dd8b6553935b26fd268058099638c36bb4 /target/linux/generic/files/include | |
parent | 0369e358916ef092a1644334f5dd1412051b68a4 (diff) | |
download | upstream-c30a70fc9fbc968fb0563feef0e661e46b65300f.tar.gz upstream-c30a70fc9fbc968fb0563feef0e661e46b65300f.tar.bz2 upstream-c30a70fc9fbc968fb0563feef0e661e46b65300f.zip |
generic: make switch_port_stats tx/rx_bytes long long
This generic structure defines tx_bytes and rx_bytes as unsigned long (u32),
while several devices would typically report unsigned long long (u64).
The code can work as is, but there's a chance that with a sufficiently fast
interface the overflow might happen too fast to be correctly noticed by the
consumers of this data.
This patch makes both field unsigned long long and updates the only known
consumer of this data: swconfig_leds.c
Signed-off-by: Thibaut VARENE <hacks@slashdirt.org>
Diffstat (limited to 'target/linux/generic/files/include')
-rw-r--r-- | target/linux/generic/files/include/linux/switch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/generic/files/include/linux/switch.h b/target/linux/generic/files/include/linux/switch.h index f8380b98c5..4e6238470d 100644 --- a/target/linux/generic/files/include/linux/switch.h +++ b/target/linux/generic/files/include/linux/switch.h @@ -59,8 +59,8 @@ struct switch_port_link { }; struct switch_port_stats { - unsigned long tx_bytes; - unsigned long rx_bytes; + unsigned long long tx_bytes; + unsigned long long rx_bytes; }; /** |