[PATCH] net/mlx5: do not poll CQEs when no available elts
Raslan Darawsheh
rasland at nvidia.com
Sun Jan 19 12:42:09 CET 2025
Hi,
From: Gavin Hu <gahu at nvidia.com>
Sent: Friday, December 6, 2024 2:58 AM
To: dev at dpdk.org
Cc: stable at dpdk.org; Dariusz Sosnowski; Slava Ovsiienko; Bing Zhao; Ori Kam; Suanming Mou; Matan Azrad; Alexander Kozyrev
Subject: [PATCH] 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: 1ded26239aa0 ("net/mlx5: refactor vectorized Rx")
Cc: stable at dpdk.org
Reported-by: Changqi Dingluo <dingluochangqi.ck at bytedance.com>
Signed-off-by: Gavin Hu <gahu at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list