> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Simon Horman > Sent: Monday, April 29, 2024 5:58 AM > To: Lobakin, Aleksander <[email protected]> > Cc: Drewek, Wojciech <[email protected]>; > [email protected]; [email protected]; Eric Dumazet > <[email protected]>; Kubiak, Michal <[email protected]>; intel- > [email protected]; NEX SW NCIS OSDT ITP Upstreaming > <[email protected]>; Jakub Kicinski > <[email protected]>; Paolo Abeni <[email protected]>; David S. Miller > <[email protected]> > Subject: Re: [Intel-wired-lan] [PATCH iwl] idpf: don't enable NAPI and > interrupts prior to allocating Rx buffers > > On Fri, Apr 26, 2024 at 04:44:08PM +0200, Alexander Lobakin wrote: > > Currently, idpf enables NAPI and interrupts prior to allocating Rx > > buffers. > > This may lead to frame loss (there are no buffers to place incoming > > frames) and even crashes on quick ifup-ifdown. Interrupts must be > > enabled only after all the resources are here and available. > > Split interrupt init into two phases: initialization and enabling, > > and perform the second only after the queues are fully initialized. > > Note that we can't just move interrupt initialization down the init > > process, as the queues must have correct a ::q_vector pointer set > > and NAPI already added in order to allocate buffers correctly. > > Also, during the deinit process, disable HW interrupts first and > > only then disable NAPI. Otherwise, there can be a HW event leading > > to napi_schedule(), but the NAPI will already be unavailable. > > > > Fixes: d4d558718266 ("idpf: initialize interrupts and enable vport") > > Reported-by: Michal Kubiak <[email protected]> > > Reviewed-by: Wojciech Drewek <[email protected]> > > Signed-off-by: Alexander Lobakin <[email protected]> > > Reviewed-by: Simon Horman <[email protected]>
Tested-by: Krishneil Singh <[email protected]>
