Messages in this thread Patch in this message | | | From | Ratheesh Kannoth <> | Subject | RE: Re: [PATCH net-next v2] octeontx2-pf: Add support for page pool | Date | Fri, 19 May 2023 01:52:18 +0000 |
| |
> -----Original Message----- > From: Yunsheng Lin <linyunsheng@huawei.com> > Sent: Friday, May 19, 2023 7:12 AM > To: Ratheesh Kannoth <rkannoth@marvell.com>; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org > Cc: Sunil Kovvuri Goutham <sgoutham@marvell.com>; > davem@davemloft.net; edumazet@google.com; kuba@kernel.org; > pabeni@redhat.com; Subbaraya Sundeep Bhatta <sbhatta@marvell.com>; > Geethasowjanya Akula <gakula@marvell.com>; Srujana Challa > <schalla@marvell.com>; Hariprasad Kelam <hkelam@marvell.com> > Subject: [EXT] Re: [PATCH net-next v2] octeontx2-pf: Add support for page > pool > > External Email > > ---------------------------------------------------------------------- > On 2023/5/18 13:51, Ratheesh Kannoth wrote: > > Page pool for each rx queue enhance rx side performance by reclaiming > > buffers back to each queue specific pool. DMA mapping is done only for > > first allocation of buffers. > > As subsequent buffers allocation avoid DMA mapping, it results in > > performance improvement. > > > > Image | Performance with Linux kernel Packet Generator > > Is there any more detailed info for the performance data? > 'kernel Packet Generator' means using pktgen module in the > net/core/pktgen.c? it seems pktgen is more for tx, is there any abvious > reason why the page pool optimization for rx have brought about ten times > improvement? We used packet generator for TX machine. Performance data is for RX DUT. I will remove Packet generator text from the commit message as it gives ambiguous information DUT Rx <------------------------- TX (Linux machine with packet generator) (page pool support)
> > > ------------ | ----------------------------------------------- > > Vannila | 3Mpps > > | > > with this | 42Mpps > > change | > > ------------------------------------------------------------- > > > > ... > > > static int __otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool, > > dma_addr_t *dma) > > { > > u8 *buf; > > > > + if (pool->page_pool) > > + return otx2_alloc_pool_buf(pfvf, pool, dma); > > + > > buf = napi_alloc_frag_align(pool->rbsize, OTX2_ALIGN); > > if (unlikely(!buf)) > > return -ENOMEM; > > It seems the above is dead code when using 'select PAGE_POOL', as > PAGE_POOL config is always selected by the driver? _otx2_alloc_rbuf() is common code for RX and TX. For RX, pool->page_pool != NULL, so allocation is from page pool.
> > @@ -1205,10 +1226,28 @@ void otx2_sq_free_sqbs(struct otx2_nic *pfvf) > > } > > } > > > > ... > > > @@ -1659,7 +1715,6 @@ int otx2_nix_config_bp(struct otx2_nic *pfvf, > bool enable) > > req->bpid_per_chan = 0; > > #endif > > > > - > > Nit: unrelated change here. Sorry, This caused due to vim script; will remove it.
> > return otx2_sync_mbox_msg(&pfvf->mbox); }
| |