Skip to content

Commit

Permalink
net/mlx5: fix MPRQ WQE size assertion
Browse files Browse the repository at this point in the history
[ upstream commit 728b644 ]

Preparation of the stride size and the number of strides for
Multi-Packet RQ was updated recently to accommodate the hardware
limitation about minimum WQE size. The wrong assertion was
introduced to ensure this limitation is met. Assert that the
configured WQE size is not less than the minimum supported size.

Fixes: 34776af ("net/mlx5: fix MPRQ stride devargs adjustment")

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
  • Loading branch information
aleks-kozyrev authored and kevintraynor committed Feb 21, 2022
1 parent a9bc2a4 commit 85d9e45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/mlx5/mlx5_rxq.c
Expand Up @@ -1619,7 +1619,7 @@ mlx5_mprq_prepare(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
RTE_BIT32(log_def_stride_size));
log_stride_wqe_size = log_def_stride_num + log_def_stride_size;
}
MLX5_ASSERT(log_stride_wqe_size < config->mprq.log_min_stride_wqe_size);
MLX5_ASSERT(log_stride_wqe_size >= config->mprq.log_min_stride_wqe_size);
if (desc <= RTE_BIT32(*actual_log_stride_num))
goto unsupport;
if (min_mbuf_size > RTE_BIT32(log_stride_wqe_size)) {
Expand Down

0 comments on commit 85d9e45

Please sign in to comment.