- Make sure to load per-ring packet and byte counts using atomic(9), as they might be concurrently modified by transmit/receive tasks, and there is no mutex synchronizing them with the interrupt handler. - Rename a variable so that its value is more clear. - Make sure that bytes and bytes_per_packet are always initialized. It's possible to have tx_bytes != 0 && tx_packets == 0, or rx_bytes != 0 && rx_bytes == 0, due to the race mentioned above, in which case the state machine would test an uninitialized variable.
PR: 286819