With head write-back, tx_cidx_processed holds the head value that the
credits update consumed last: the index of the next descriptor to
complete. With the Report Status queue it is the index of the last
completed descriptor. 088a0b27adb4 made both start at the last
descriptor of the ring, which is right for the Report Status queue
only. With head write-back, the default in ixl(4), the first credits
update after every initialization reports a completed descriptor that
was never sent.
iflib's own reclaim holds back isc_tx_nsegments descriptors and does
not notice. netmap uses the count as it is: iflib_netmap_txsync()
puts the tail of its ring one slot too far. Once the card has sent
everything, the tail meets the head, which netmap reads as a ring
without a free slot, and no completion is left that would move it.
The ring never transmits again: pkt-gen at full rate stops after a few
thousand packets, and a ring that one pkt-gen has used cannot be used
by the next.
The workaround has been hw.ixl.enable_head_writeback=0.
Start at the head of the cleared ring, as before that change. iavf(4)
has a copy of the code and gets the same change.
PR: 255671
Fixes: 088a0b27adb4 ("intel iflib drivers: correct...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")