Re: [PATCH v4 net 0/6] xsk: fix AF_XDP multi-buffer Tx descriptor reclaim
From: Stanislav Fomichev <hidden>
Date: 2026-07-20 19:30:28
Also in:
bpf
On 07/19, Maciej Fijalkowski wrote:
v3: https://lore.kernel.org/netdev/20260714140722.111645-1-maciej.fijalkowski@intel.com/T/ (local) v3->v4: * Return standalone invalid Tx descriptors through the completion ring in both the generic and zero-copy Tx paths. Advancing the Tx-ring consumer releases only the ring slot; returning the descriptor address through the CQ also transfers ownership of the corresponding UMEM frame back to userspace. * Remove xsk_tx_batch::consumed_descs. With standalone invalid descriptors now reclaimed through the CQ, every descriptor permanently removed from the Tx ring is represented by either tx_descs or reclaim_descs. Use their sum for Tx-consumer advancement, shared-UMEM fairness accounting, and progress detection. * Ensure that generic reclaim-only processing publishes the updated Tx-ring consumer even when no packet was submitted to the networking stack. * Update the XSK selftests to count every descriptor submitted to the Tx ring as an expected CQ entry, while continuing to count only valid packets as expected Rx traffic. This covers standalone invalid descriptors, invalid multi-buffer packets, oversized packets, and the non-verbatim STAT_TX_INVALID tests. * Update the AF_XDP documentation to describe the completion ring as an ownership-transfer mechanism and document that standalone, invalid multi-buffer, and oversized Tx packets are reclaimed through the CQ. * Add Jason's tags
Acked-by: Stanislav Fomichev <sdf@fomichev.me> Kudos for updating the doc with the new expectations! (and I still hope that we can separately redo the generic tx path)