[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR11MB6815F7E1AD7F8D437C4589F690F0A@SJ0PR11MB6815.namprd11.prod.outlook.com>
Date: Thu, 23 Oct 2025 06:11:44 +0000
From: "Sarkar, Tirthendu" <tirthendu.sarkar@...el.com>
To: Your Name <alessandro.d@...il.com>
CC: Jason Xing <kerneljasonxing@...il.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Fijalkowski, Maciej"
<maciej.fijalkowski@...el.com>, "David S. Miller" <davem@...emloft.net>,
Alexei Starovoitov <ast@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
Daniel Borkmann <daniel@...earbox.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>, Paolo Abeni <pabeni@...hat.com>,
"Kitszel, Przemyslaw" <przemyslaw.kitszel@...el.com>, Stanislav Fomichev
<sdf@...ichev.me>, "Nguyen, Anthony L" <anthony.l.nguyen@...el.com>,
"bpf@...r.kernel.org" <bpf@...r.kernel.org>,
"intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net v2 1/1] i40e: xsk: advance next_to_clean on status
descriptors
> From: Your Name <alessandro.d@...il.com>
> Sent: 22 October 2025 21:58
>
> On Wed, Oct 22, 2025 at 05:41:06AM +0000, Sarkar, Tirthendu wrote:
> > > From: Jason Xing <kerneljasonxing@...il.com>
> >
> > I believe the issue is not that status_descriptor is getting into
> > multi-buffer packet but not updating next_to_clean results in
> > I40E_DESC_UNUSED() to return incorrect values.
>
> I don't think this is true? next_to_clean can be < next_to_process by
> design, see
>
> if (next_to_process != next_to_clean)
> first = *i40e_rx_bi(rx_ring, next_to_clean);
>
> at the start of i40e_clean_rx_irq_zc. This condition is normal and means
> when we exited the function - for example because we ran out of budget -
> we were in the middle of a multi-buffer packet and now we must continue.
>
Ah, yes. Missed that. BTW, we won't run out of budget when we see status_descriptor or in the middle of a multi-buffer packet since those do not increase total_rx_packets.
However, if we see a status descriptor and no packets after that (size = 0), we will break the loop thus making next_to_clean and next_to_process out-of-sync with next_to_clean still pointing to status descriptor when we resume.
Thanks,
Tirthendu
Powered by blists - more mailing lists