Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/mlx5: do not poll CQEs when no available elts
In certain situations, the receive queue (rxq) fails to replenish its internal ring with memory buffers (mbufs) from the pool. This can happen when the pool has a limited number of mbufs allocated, and the user application holds incoming packets for an extended period, resulting in a delayed release of mbufs. Consequently, the pool becomes depleted, preventing the rxq from replenishing from it. There was a bug in the behavior of the vectorized rxq_cq_process_v routine, which handled completion queue entries (CQEs) in batches of four. This routine consistently accessed four mbufs from the internal queue ring, regardless of whether they had been replenished. As a result, it could access mbufs that no longer belonged to the poll mode driver (PMD). The fix involves checking if there are four replenished mbufs available before allowing rxq_cq_process_v to handle the batch. Once replenishment succeeds during the polling process, the routine will resume its operation. Fixes: 1ded262 ("net/mlx5: refactor vectorized Rx") Cc: stable@dpdk.org Reported-by: Changqi Dingluo <dingluochangqi.ck@bytedance.com> Signed-off-by: Gavin Hu <gahu@nvidia.com> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
- Loading branch information