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

From: Sebastian Andrzej Siewior
Date: Thu Sep 07 2023 - 14:06:00 EST


On 2023-09-07 08:15:58 [+0000], Ratheesh Kannoth wrote:
> > 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.

Right, there might be no issue I was just asking. I don't know how the
cq <-> NAPI mapping is working. If you say that there is no race/issue,
okay ;)

> +
> + local_bh_disable();
> + napi_schedule(wrk->napi);
> + cq->refill_task_sched = false;
> + local_bh_enable();

Sebastian