On 2023-09-18 10:58:39 [-0700], Kui-Feng Lee wrote: > > diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c > > index e77d438489557..53b2a4ef52985 100644 > > --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c > > +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c > > @@ -1391,8 +1396,10 @@ static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf, > > otx2_dma_unmap_page(pfvf, iova, pfvf->rbsize, > > DMA_FROM_DEVICE); > > - if (!err) > > + if (!err) { > > + *need_xdp_flush = true; > > Is it possible to call xdp_do_flush() at the first place (here)? It shouldn't be wrong. All drivers, except for cpsw, invoke xdp_do_flush() after completing their NAPI loop and then flushing all possible packets at once. > > return true; > > + } > > put_page(page); > > break; > > default: Sebastian