[PATCH] net/mlx5: fix Rx queue count with enhanced CQE compression
Dariusz Sosnowski
dsosnowski at nvidia.com
Fri Nov 27 10:51:25 CET 2026
On Thu, Nov 19, 2026 at 11:34:48PM +0300, Daniil Bobryshev wrote:
> With the enhanced CQE compression layout (bit 7 of the rxq_cqe_comp_en
> devarg) the Rx burst checks CQE ownership with the validity iteration
> count and takes the number of packets of a compressed session from
> op_own (MLX5_CQE_NUM_MINIS() + 1). rx_queue_count() was not updated:
> it still checks the owner bit and reads the session size from byte_cnt
> of the title CQE, as in the basic layout.
>
> In the enhanced layout byte_cnt of a compressed CQE holds mini-CQE data
> (a packet length), so the walk moves the consumer index by an arbitrary
> amount, and since consumed CQEs are not invalidated in this layout the
> owner bit check keeps accepting stale entries. rte_eth_rx_queue_count()
> and rte_eth_rx_descriptor_status() return wrong values, and datapath
> threads that poll the queue depth were observed stuck inside
> rx_queue_count() on ConnectX-6 Dx.
>
> When the enhanced layout is enabled, check the CQE with
> check_cqe_iteration() and count MLX5_CQE_NUM_MINIS() + 1 packets per
> compressed CQE, the same way the Rx burst does.
>
> Fixes: 02a6195cbeaa ("net/mlx5: support enhanced CQE compression in Rx burst")
> Cc: stable at dpdk.org
>
> Signed-off-by: Daniil Bobryshev <daniil at peresvet.it>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
More information about the stable
mailing list