net/mlx5e: Remove WARN_ONCE from adaptive moderation code
When trying to do interface down or changing interface configuration
under heavy traffic, some of the adaptive moderation corner cases can
occur and leave a WARN_ONCE call trace in the kernel log.
Those WARN_ONCE are meant for debug only, and should have been inserted
only under debug. We avoid such call traces by removing those WARN_ONCE.
Fixes: cb3c7fd4f8
("net/mlx5e: Support adaptive RX coalescing")
Signed-off-by: Gil Rockah <gilr@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
3deef8cea3
commit
0bbcc0a8fc
|
@ -109,7 +109,6 @@ static bool mlx5e_am_on_top(struct mlx5e_rx_am *am)
|
|||
switch (am->tune_state) {
|
||||
case MLX5E_AM_PARKING_ON_TOP:
|
||||
case MLX5E_AM_PARKING_TIRED:
|
||||
WARN_ONCE(true, "mlx5e_am_on_top: PARKING\n");
|
||||
return true;
|
||||
case MLX5E_AM_GOING_RIGHT:
|
||||
return (am->steps_left > 1) && (am->steps_right == 1);
|
||||
|
@ -123,7 +122,6 @@ static void mlx5e_am_turn(struct mlx5e_rx_am *am)
|
|||
switch (am->tune_state) {
|
||||
case MLX5E_AM_PARKING_ON_TOP:
|
||||
case MLX5E_AM_PARKING_TIRED:
|
||||
WARN_ONCE(true, "mlx5e_am_turn: PARKING\n");
|
||||
break;
|
||||
case MLX5E_AM_GOING_RIGHT:
|
||||
am->tune_state = MLX5E_AM_GOING_LEFT;
|
||||
|
@ -144,7 +142,6 @@ static int mlx5e_am_step(struct mlx5e_rx_am *am)
|
|||
switch (am->tune_state) {
|
||||
case MLX5E_AM_PARKING_ON_TOP:
|
||||
case MLX5E_AM_PARKING_TIRED:
|
||||
WARN_ONCE(true, "mlx5e_am_step: PARKING\n");
|
||||
break;
|
||||
case MLX5E_AM_GOING_RIGHT:
|
||||
if (am->profile_ix == (MLX5E_PARAMS_AM_NUM_PROFILES - 1))
|
||||
|
@ -282,10 +279,8 @@ static void mlx5e_am_calc_stats(struct mlx5e_rx_am_sample *start,
|
|||
u32 delta_us = ktime_us_delta(end->time, start->time);
|
||||
unsigned int npkts = end->pkt_ctr - start->pkt_ctr;
|
||||
|
||||
if (!delta_us) {
|
||||
WARN_ONCE(true, "mlx5e_am_calc_stats: delta_us=0\n");
|
||||
if (!delta_us)
|
||||
return;
|
||||
}
|
||||
|
||||
curr_stats->ppms = (npkts * USEC_PER_MSEC) / delta_us;
|
||||
curr_stats->epms = (MLX5E_AM_NEVENTS * USEC_PER_MSEC) / delta_us;
|
||||
|
|
Loading…
Reference in New Issue