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

2019-08-22 Thread Ilya Maximets
On 22.08.2019 19:07, William Tu wrote: > On Thu, Aug 22, 2019 at 1:17 AM Ilya Maximets wrote: >> >> On 22.08.2019 0:38, William Tu wrote: >>> On Wed, Aug 21, 2019 at 9:57 AM Alexander Duyck >>> wrote: On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: > > On 21.08.2019

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

2019-08-22 Thread William Tu
On Thu, Aug 22, 2019 at 1:17 AM Ilya Maximets wrote: > > On 22.08.2019 0:38, William Tu wrote: > > On Wed, Aug 21, 2019 at 9:57 AM Alexander Duyck > > wrote: > >> > >> On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets > >> wrote: > >>> > >>> On 21.08.2019 4:17, Alexander Duyck wrote: > On

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

2019-08-22 Thread Ilya Maximets
On 22.08.2019 0:38, William Tu wrote: > On Wed, Aug 21, 2019 at 9:57 AM Alexander Duyck > wrote: >> >> On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: >>> >>> On 21.08.2019 4:17, Alexander Duyck wrote: On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets wrote: > > On

Re: [Intel-wired-lan] [PATCH net] ixgbe: fix double clean of tx descriptors with xdp

2019-08-22 Thread Ilya Maximets
On 22.08.2019 10:12, Björn Töpel wrote: > On Wed, 21 Aug 2019 at 18:57, Alexander Duyck > wrote: >> >> On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: >>> >>> On 21.08.2019 4:17, Alexander Duyck wrote: On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets wrote: > > On

Re: [Intel-wired-lan] [PATCH net] ixgbe: fix double clean of tx descriptors with xdp

2019-08-22 Thread Björn Töpel
On Wed, 21 Aug 2019 at 18:57, Alexander Duyck wrote: > > On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: > > > > On 21.08.2019 4:17, Alexander Duyck wrote: > > > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets > > > wrote: > > >> > > >> On 20.08.2019 18:35, Alexander Duyck wrote: > > >>> On

Re: [Intel-wired-lan] [PATCH net] ixgbe: fix double clean of tx descriptors with xdp

2019-08-22 Thread Björn Töpel
On Wed, 21 Aug 2019 at 18:22, Ilya Maximets wrote: > > On 21.08.2019 4:17, Alexander Duyck wrote: > > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets > > wrote: > >> > >> On 20.08.2019 18:35, Alexander Duyck wrote: [...] > > > > So is it always in the same NAPI context?. I forgot, I was thinking

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

2019-08-21 Thread William Tu
On Wed, Aug 21, 2019 at 9:57 AM Alexander Duyck wrote: > > On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: > > > > On 21.08.2019 4:17, Alexander Duyck wrote: > > > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets > > > wrote: > > >> > > >> On 20.08.2019 18:35, Alexander Duyck wrote: > > >>>

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

2019-08-21 Thread Alexander Duyck
On Wed, Aug 21, 2019 at 9:22 AM Ilya Maximets wrote: > > On 21.08.2019 4:17, Alexander Duyck wrote: > > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets > > wrote: > >> > >> On 20.08.2019 18:35, Alexander Duyck wrote: > >>> On Tue, Aug 20, 2019 at 8:18 AM Ilya Maximets > >>> wrote: > >

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

2019-08-21 Thread Ilya Maximets
On 21.08.2019 4:17, Alexander Duyck wrote: > On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets wrote: >> >> On 20.08.2019 18:35, Alexander Duyck wrote: >>> On Tue, Aug 20, 2019 at 8:18 AM Ilya Maximets >>> wrote: Tx code doesn't clear the descriptor status after cleaning. So, if the

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

2019-08-21 Thread Eelco Chaudron
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

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

2019-08-20 Thread Alexander Duyck
On Tue, Aug 20, 2019 at 8:58 AM Ilya Maximets wrote: > > On 20.08.2019 18:35, Alexander Duyck wrote: > > On Tue, Aug 20, 2019 at 8:18 AM 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

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

2019-08-20 Thread Ilya Maximets
On 20.08.2019 18:35, Alexander Duyck wrote: > On Tue, Aug 20, 2019 at 8:18 AM 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

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

2019-08-20 Thread Alexander Duyck
On Tue, Aug 20, 2019 at 8:18 AM 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

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

2019-08-20 Thread Ilya Maximets
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