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

            Bug ID: 1885
           Summary: net/atlantic: atl_xmit_pkts stops on invalid mbuf
                    instead of consuming it
           Product: DPDK
           Version: 25.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: ethdev
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Audit of tx_pkt_burst handling i drivers found this.

In atl_xmit_pkts() (atl_rxtx.c line 1332), when an mbuf fails
validation (nb_segs == 0, or nb_segs > 1 with next == NULL), the
driver breaks out of the transmit loop and returns the current
count without freeing the offending packet.

The standard caller pattern after rte_eth_tx_burst() is:

    n = rte_eth_tx_burst(port, qid, pkts, count);
    for (i = n; i < count; i++)
        rte_pktmbuf_free(pkts[i]);

Because the invalid mbuf is returned as unconsumed, the caller
will attempt to retransmit it on the next call. The packet is
inherently malformed, so it will fail the same check every time
and the caller loops forever, unable to make forward progress.

The descriptor-exhaustion break at line 1329 is fine — that is a
transient resource condition that will resolve.  The mbuf
validation break at line 1333 is not — a bad packet will never
become valid.

Per the rte_eth_tx_burst() contract (see ethdev: clarify
rte_eth_tx_burst return value and ownership semantics), the driver
should free the erroneous mbuf and continue processing the
remaining packets rather than stopping. The error should be
counted in tx_errors.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to