[4/4] mlx5: re-add support of rx_queue_count for mlx5_rx_burst_mprq
Checks
Commit Message
The commit 014a6936008b ("Revert "net/mlx5: fix Rx queue count
calculation"")' has removed the support of rx_queue_count for
mlx5_rx_burst_mprq.
This commit has been revert because the fixes done on rx_queue_count
computation was wrong. Anyway, it's still true that the Rx queue count
calculation is same for any rx burts method since CQ handling is the
same for regular, vectorized, and multi-packet Rx queues.
Signed-off-by: Maxime Leroy <maxime.leroy@6wind.com>
---
drivers/net/mlx5/mlx5_rxtx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
@@ -492,7 +492,7 @@ rx_queue_count(struct mlx5_rxq_data *rxq)
used += n;
cqe = &(*rxq->cqes)[cq_ci & cqe_cnt];
}
- used = RTE_MIN(used * sges_n, 1U << rxq->elts_n);
+ used = RTE_MIN(used * sges_n, cqe_cnt);
return used;
}
@@ -515,7 +515,8 @@ mlx5_rx_descriptor_status(void *rx_queue, uint16_t offset)
container_of(rxq, struct mlx5_rxq_ctrl, rxq);
struct rte_eth_dev *dev = ETH_DEV(rxq_ctrl->priv);
- if (dev->rx_pkt_burst != mlx5_rx_burst) {
+ if (dev->rx_pkt_burst == NULL ||
+ dev->rx_pkt_burst == removed_rx_burst) {
rte_errno = ENOTSUP;
return -rte_errno;
}