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

From: Ratheesh Kannoth
Date: Thu Sep 07 2023 - 13:29:08 EST


> From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
> Subject: [EXT] Re: [PATCH net v2] octeontx2-pf: Fix page pool cache index
> corruption.
> > cq->refill_task_sched = false;
> > +
> > + local_bh_disable();
> > + napi_schedule(wrk->napi);
> > + local_bh_enable();
>
> This is a nitpick since I haven't look how it works exactly: Is it possible that the
> wrk->napi pointer gets overwritten by
> otx2_napi_handler() since you cleared cq->refill_task_sched() earlier?
I don’t see any issue here. As NAPI and workqueue execution is serialized (as interrupt is disabled when
Workqueue is scheduled). I don’t think we can move "refill_task_sched = false" after local_bh_enable().
But we can move refill_task_sched = false as below . but I don’t see a need.
+
+ local_bh_disable();
+ napi_schedule(wrk->napi);
+ cq->refill_task_sched = false;
+ local_bh_enable();