RE: [EXT] Re: [PATCH net v1] octeontx2-pf: Fix page pool cache index corruption.

From: Ratheesh Kannoth
Date: Wed Sep 06 2023 - 04:25:22 EST


> From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Subject: [EXT] Re: [PATCH net v1] octeontx2-pf: Fix page pool cache index
> corruption.
>
> > + napi_schedule(wrk->napi);
>
> This will delay NAPI until "some random point in the future" for instance if an
> interrupt on _this_ CPU fires. You only set the softirq state and never enforce
> it here. This works as intended if invoked from an IRQ but this here a worker/
> process context.
ACK. Do we need to be so precise here ? Anyway we are short of rx buffers and want to schedule NAPI after some time
(in delayed workqueue) to recheck on rx buffers. Softirq state will be checked even on timer interrupt returns, right ?. I was thinking
Case - what will happen if workqueue never got a chance to run if system is stressed with interrupts.

> You can either put local_bh_disable()/enable() around napi_schedule() or
> use it from a timer callback and skip the worker.
Switching to a timer callback makes sense.

-Ratheesh