Skip to contentSkip to conversation

dpaa/dpaa2: permanent tx errors cause caller to retry packets forever

DPDK/ethdev Bug 1888 [email protected] 1 participant 1 message Feb 19

lore
Share & tools
lore
#0 lore raw

http://bugs.dpdk.org/show_bug.cgi?id=1888

            Bug ID: 1888
           Summary: dpaa/dpaa2: permanent tx errors cause caller to retry
                    packets forever
           Product: DPDK
           Version: 25.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: minor
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]

Target Milestone: ---

Both dpaa and dpaa2 transmit paths stop processing on any error and return a short count without freeing the failing packet. For permanent errors (unsupported segment count, missing buffer pool), this leaves the bad packet as the first unconsumed entry and the caller retries it indefinitely.

## Affected functions

- dpaa_eth_queue_tx() in drivers/net/dpaa/dpaa_rxtx.c
- dpaa2_dev_tx() in drivers/net/dpaa2/dpaa2_rxtx.c
- dpaa2_dev_tx_ordered() in drivers/net/dpaa2/dpaa2_rxtx.c

## Description

All three functions prepare frame descriptors in a loop. When an error occurs at position N, they jump to a send_pkts / send_n_return label that enqueues packets 0 through N-1 and returns. The packet at position N is neither enqueued nor freed — it is returned to the caller as the first unconsumed packet.

For transient errors (allocation failure, HW backpressure) this is tolerable since the caller can retry and succeed later. For permanent errors the packet can never succeed and callers that re-submit unconsumed packets spin forever:

```c
while (nb_pkts) {
    n = rte_eth_tx_burst(port, txq, mbufs, nb_pkts);
    mbufs += n;
    nb_pkts -= n;
}
```

Permanent error conditions include:

- **dpaa**: nb_segs > DPAA_SGT_MAX_ENTRIES in tx_on_dpaa_pool()
- **dpaa2**: nb_segs > 1 for non-hw-offload buffer pool
- **dpaa2**: no buffer pool attached (!mp || !priv->bp_list)

## Expected behavior

Per the rte_eth_tx_burst() contract, the driver should consume erroneous packets (free the mbuf), count them in tx_errors, and continue processing the remaining burst — not stop at the first error.

## Note

The dpaa2 sw_td (software tail drop) path handles this correctly: it frees all remaining packets and returns the full count. The same approach should be applied to permanent errors in the normal transmit paths.

## Version

Found by code inspection against DPDK v25.03-rc1.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.