Re: [PATCH net] ixgbe: fix double clean of tx descriptors with xdp

From: Eelco Chaudron
Date: Wed Aug 21 2019 - 06:09:13 EST




On 20 Aug 2019, at 17:16, Ilya Maximets wrote:

Tx code doesn't clear the descriptor status after cleaning.
So, if the budget is larger than number of used elems in a ring, some
descriptors will be accounted twice and xsk_umem_complete_tx will move
prod_tail far beyond the prod_head breaking the comletion queue ring.

Fix that by limiting the number of descriptors to clean by the number
of used descriptors in the tx ring.

Fixes: 8221c5eba8c1 ("ixgbe: add AF_XDP zero-copy Tx support")
Signed-off-by: Ilya Maximets <i.maximets@xxxxxxxxxxx>
---

Not tested yet because of lack of available hardware.
So, testing is very welcome.

Hi Ilya, this patch fixes the issue I reported earlier on the Open vSwitch mailing list regarding complete queue overrun.

Tested-by: Eelco Chaudron <echaudro@xxxxxxxxxx>

<SNIP>