Re: [PATCH net] linux/dim: Do nothing if no time delta between samples

From: Leon Romanovsky
Date: Mon May 08 2023 - 02:13:32 EST


On Sun, May 07, 2023 at 04:57:43PM +0300, Tariq Toukan wrote:
> From: Roy Novich <royno@xxxxxxxxxx>
>
> Add return value for dim_calc_stats. This is an indication for the
> caller if curr_stats was assigned by the function. Avoid using
> curr_stats uninitialized over {rdma/net}_dim, when no time delta between
> samples. Coverity reported this potential use of an uninitialized
> variable.
>
> Fixes: 4c4dbb4a7363 ("net/mlx5e: Move dynamic interrupt coalescing code to include/linux")
> Fixes: cb3c7fd4f839 ("net/mlx5e: Support adaptive RX coalescing")
> Signed-off-by: Roy Novich <royno@xxxxxxxxxx>
> Reviewed-by: Aya Levin <ayal@xxxxxxxxxx>
> Reviewed-by: Saeed Mahameed <saeedm@xxxxxxxxxx>
> Signed-off-by: Tariq Toukan <tariqt@xxxxxxxxxx>
> ---
> include/linux/dim.h | 3 ++-
> lib/dim/dim.c | 5 +++--
> lib/dim/net_dim.c | 3 ++-
> lib/dim/rdma_dim.c | 3 ++-
> 4 files changed, 9 insertions(+), 5 deletions(-)
>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>