On Sun, 20 Sep 2026 20:27:03 -0600 Mohammad Shuab Siddique <[email protected]> wrote:
> From: Mohammad Shuab Siddique <[email protected]> > > Hardware already reports an invalid/bad DMA address on a Tx BD via > the TX_CMPL_ERRORS_DMA_ERROR bit in the Tx completion record, but the > driver never inspected it, so a bad mbuf->buf_iova on Tx completed > silently with no visibility. > > Check the bit in bnxt_handle_tx_cp() and in the AVX2/SSE vector > Tx-completion handlers, and count occurrences in a new per-queue > tx_dma_err counter. The counter is folded into the standard oerrors > stat and also exposed as a named xstat (tx_dma_err_pkts) for > finer-grained visibility. > > Signed-off-by: Mohammad Shuab Siddique <[email protected]> > --- [PATCH v2] net/bnxt: add Tx DMA error stat counter Warning: tx_dma_err is a per-queue, single-writer counter but uses rte_atomic_fetch_add_explicit() in the completion fast path. That is a locked RMW for no benefit. Use a plain increment. The existing tx_mbuf_drop pattern is not a reason to extend it. Warning: bnxt_handle_tx_cp_vec() in bnxt_rxtx_vec_neon.c is not updated. arm64 never counts DMA errors. Warning: the release note says "per-queue xstat", but the patch exposes a single port-wide sum. Fix one or the other. Info: "tx_dma_err_pkts" counts completions, not packets. Vector completions cover opaque packets, and with the following coalescing patch one completion covers many. Rename the xstat or count packets.

