mirror of https://gitee.com/openkylin/linux.git
net/mlx5e: Set default RX moderation parameters on driver load
RX moderation default parameters shouldn't be set in
mlx5e_build_rx_cq_param since it would reset the values every time on
netdev open/close. Instead, it should be set in
mlx5e_set_rx_cq_mode_params which is called on driver load only.
Fixes: 6a9764efb2
("net/mlx5e: Isolate open_channels from priv->params")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
95b6c6a519
commit
457fcd8a11
|
@ -1944,10 +1944,6 @@ static void mlx5e_build_rx_cq_param(struct mlx5e_priv *priv,
|
|||
}
|
||||
|
||||
mlx5e_build_common_cq_param(priv, param);
|
||||
|
||||
if (params->rx_am_enabled)
|
||||
params->rx_cq_moderation =
|
||||
mlx5e_am_get_def_profile(params->rx_cq_period_mode);
|
||||
}
|
||||
|
||||
static void mlx5e_build_tx_cq_param(struct mlx5e_priv *priv,
|
||||
|
@ -3787,6 +3783,10 @@ void mlx5e_set_rx_cq_mode_params(struct mlx5e_params *params, u8 cq_period_mode)
|
|||
params->rx_cq_moderation.usec =
|
||||
MLX5E_PARAMS_DEFAULT_RX_CQ_MODERATION_USEC_FROM_CQE;
|
||||
|
||||
if (params->rx_am_enabled)
|
||||
params->rx_cq_moderation =
|
||||
mlx5e_am_get_def_profile(params->rx_cq_period_mode);
|
||||
|
||||
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_CQE_BASED_MODER,
|
||||
params->rx_cq_period_mode == MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue