[PATCH] net/mana: fix CQE suppression handling on error completions

Stephen Hemminger stephen at networkplumber.org
Wed Mar 25 19:54:51 CET 2026


On Wed, 25 Mar 2026 11:38:36 -0700
Long Li <longli at microsoft.com> wrote:

> On error CQEs (e.g. SA_DROP), the hardware generates one CQE per WQE
> regardless of the suppression flag. The previous code honored the
> suppress_tx_cqe flag unconditionally, which caused it to skip reading
> error CQEs and misalign the CQ consumer index.
> 
> This misalignment causes subsequent completions to be misinterpreted:
> valid CQEs are read at wrong offsets, leading to spurious error
> counts, NULL packet frees, and potential use-after-free of mbufs
> that were already completed.
> 
> Check the CQE type before honoring suppression: only skip CQE reading
> when the completion is CQE_TX_OKAY.
> 
> Fixes: cce2c9df44 ("net/mana: suppress Tx CQE generation whenever possible")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Long Li <longli at microsoft.com>

Applied but needed to use longer SHA for Fixes to meet current guidelines.

Fixes: cce2c9df4481 ("net/mana: suppress Tx CQE generation whenever possible")


More information about the dev mailing list