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>
struct delayed_work sw_led_work;
u32 port_mask;
u32 port_link;
- unsigned long port_traffic[SWCONFIG_LED_NUM_PORTS];
+ unsigned long long port_traffic[SWCONFIG_LED_NUM_PORTS];
u8 link_speed[SWCONFIG_LED_NUM_PORTS];
};
};
struct switch_port_stats {
- unsigned long tx_bytes;
- unsigned long rx_bytes;
+ unsigned long long tx_bytes;
+ unsigned long long rx_bytes;
};
/**