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

2019-08-27 Thread Ilya Maximets
On 26.08.2019 16:40, Maciej Fijalkowski wrote: > On Thu, 22 Aug 2019 20:12:37 +0300 > Ilya Maximets wrote: > >> Tx code doesn't clear the descriptors' status after cleaning. >> So, if the budget is larger than number of used elems in a ring, some >> descriptors will be accounted twice and

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

2019-08-26 Thread Maciej Fijalkowski
On Thu, 22 Aug 2019 20:12:37 +0300 Ilya Maximets wrote: > Tx code doesn't clear the descriptors' 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

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

2019-08-23 Thread William Tu
On Thu, Aug 22, 2019 at 11:10 PM Björn Töpel wrote: > > On 2019-08-22 19:32, William Tu wrote: > > On Thu, Aug 22, 2019 at 10:21 AM Alexander Duyck > > wrote: > >> > >> On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets > >> wrote: > >>> > >>> Tx code doesn't clear the descriptors' status after

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

2019-08-23 Thread Eelco Chaudron
On 22 Aug 2019, at 19:12, Ilya Maximets wrote: Tx code doesn't clear the descriptors' 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

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

2019-08-23 Thread Björn Töpel
On 2019-08-22 19:32, William Tu wrote: On Thu, Aug 22, 2019 at 10:21 AM Alexander Duyck wrote: On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets wrote: Tx code doesn't clear the descriptors' status after cleaning. So, if the budget is larger than number of used elems in a ring, some

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

2019-08-22 Thread William Tu
On Thu, Aug 22, 2019 at 10:21 AM Alexander Duyck wrote: > > On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets wrote: > > > > Tx code doesn't clear the descriptors' status after cleaning. > > So, if the budget is larger than number of used elems in a ring, some > > descriptors will be accounted

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

2019-08-22 Thread Alexander Duyck
On Thu, Aug 22, 2019 at 10:12 AM Ilya Maximets wrote: > > Tx code doesn't clear the descriptors' 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

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

2019-08-22 Thread Ilya Maximets
Tx code doesn't clear the descriptors' 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 completion queue ring. Fix that by limiting