lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net v1] octeontx2-pf: Fix page pool cache index corruption.
On 2023-09-06 09:09:26 [+0530], Ratheesh Kannoth wrote:
> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> index 8511906cb4e2..5bba1f34e4f6 100644
> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
> @@ -1082,38 +1070,16 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
> static void otx2_pool_refill_task(struct work_struct *work)
> {

> + 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.

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

Sebastian

\
 
 \ /
  Last update: 2023-09-06 10:09    [W:0.058 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site