|
@@ -84,7 +84,8 @@ static void mlx5e_set_rq_type_params(struct mlx5e_priv *priv, u8 rq_type)
|
|
|
switch (priv->params.rq_wq_type) {
|
|
|
case MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ:
|
|
|
priv->params.log_rq_size = MLX5E_PARAMS_DEFAULT_LOG_RQ_SIZE_MPW;
|
|
|
- priv->params.mpwqe_log_stride_sz = priv->params.rx_cqe_compress ?
|
|
|
+ priv->params.mpwqe_log_stride_sz =
|
|
|
+ MLX5E_GET_PFLAG(priv, MLX5E_PFLAG_RX_CQE_COMPRESS) ?
|
|
|
MLX5_MPWRQ_LOG_STRIDE_SIZE_CQE_COMPRESS :
|
|
|
MLX5_MPWRQ_LOG_STRIDE_SIZE;
|
|
|
priv->params.mpwqe_log_num_strides = MLX5_MPWRQ_LOG_WQE_SZ -
|
|
@@ -101,7 +102,7 @@ static void mlx5e_set_rq_type_params(struct mlx5e_priv *priv, u8 rq_type)
|
|
|
priv->params.rq_wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ,
|
|
|
BIT(priv->params.log_rq_size),
|
|
|
BIT(priv->params.mpwqe_log_stride_sz),
|
|
|
- priv->params.rx_cqe_compress_admin);
|
|
|
+ MLX5E_GET_PFLAG(priv, MLX5E_PFLAG_RX_CQE_COMPRESS));
|
|
|
}
|
|
|
|
|
|
static void mlx5e_set_rq_priv_params(struct mlx5e_priv *priv)
|
|
@@ -1664,7 +1665,7 @@ static void mlx5e_build_rx_cq_param(struct mlx5e_priv *priv,
|
|
|
}
|
|
|
|
|
|
MLX5_SET(cqc, cqc, log_cq_size, log_cq_size);
|
|
|
- if (priv->params.rx_cqe_compress) {
|
|
|
+ if (MLX5E_GET_PFLAG(priv, MLX5E_PFLAG_RX_CQE_COMPRESS)) {
|
|
|
MLX5_SET(cqc, cqc, mini_cqe_res_format, MLX5_CQE_FORMAT_CSUM);
|
|
|
MLX5_SET(cqc, cqc, cqe_comp_en, 1);
|
|
|
}
|
|
@@ -3447,17 +3448,16 @@ static void mlx5e_build_nic_netdev_priv(struct mlx5_core_dev *mdev,
|
|
|
priv->params.log_sq_size = MLX5E_PARAMS_DEFAULT_LOG_SQ_SIZE;
|
|
|
|
|
|
/* set CQE compression */
|
|
|
- priv->params.rx_cqe_compress_admin = false;
|
|
|
+ priv->params.rx_cqe_compress_def = false;
|
|
|
if (MLX5_CAP_GEN(mdev, cqe_compression) &&
|
|
|
MLX5_CAP_GEN(mdev, vport_group_manager)) {
|
|
|
mlx5e_get_max_linkspeed(mdev, &link_speed);
|
|
|
mlx5e_get_pci_bw(mdev, &pci_bw);
|
|
|
mlx5_core_dbg(mdev, "Max link speed = %d, PCI BW = %d\n",
|
|
|
link_speed, pci_bw);
|
|
|
- priv->params.rx_cqe_compress_admin =
|
|
|
+ priv->params.rx_cqe_compress_def =
|
|
|
cqe_compress_heuristic(link_speed, pci_bw);
|
|
|
}
|
|
|
- priv->params.rx_cqe_compress = priv->params.rx_cqe_compress_admin;
|
|
|
|
|
|
mlx5e_set_rq_priv_params(priv);
|
|
|
if (priv->params.rq_wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ)
|
|
@@ -3490,6 +3490,7 @@ static void mlx5e_build_nic_netdev_priv(struct mlx5_core_dev *mdev,
|
|
|
/* Initialize pflags */
|
|
|
MLX5E_SET_PFLAG(priv, MLX5E_PFLAG_RX_CQE_BASED_MODER,
|
|
|
priv->params.rx_cq_period_mode == MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
|
|
|
+ MLX5E_SET_PFLAG(priv, MLX5E_PFLAG_RX_CQE_COMPRESS, priv->params.rx_cqe_compress_def);
|
|
|
|
|
|
mutex_init(&priv->state_lock);
|
|
|
|