lib/dim: add KUnit test for dim_calc_stats()

Add a KUnit suite for the DIM library that checks the packet, byte,
event and completion rates computed by dim_calc_stats(), including
counter wraparound and windows whose byte or packet count times
USEC_PER_MSEC does not fit in 32 bits. The latter cases fail on 32-bit
architectures without the previous commit.

Assisted-by: LLM
Signed-off-by: Shashank Mohan Jain <jain.sm@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Shashank Mohan Jain 2026-09-27 10:47:43 +05:30 • committed by David S. Miller
commit 636035157a
3 changed files with 143 additions and 0 deletions