mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yunsheng Lin <linyunsheng@huawei.com>
To: Ratheesh Kannoth <rkannoth@marvell.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Sunil Kovvuri Goutham <sgoutham@marvell.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"edumazet@google.com" <edumazet@google.com>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <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: Re: [PATCH net-next v2] octeontx2-pf: Add support for page pool
Date: Fri, 19 May 2023 10:37:00 +0800	[thread overview]
Message-ID: <0136fe46-eeb7-782d-0616-2a444e2f2da4@huawei.com> (raw)
In-Reply-To: <MWHPR1801MB191809E0C74271333E96C343D37C9@MWHPR1801MB1918.namprd18.prod.outlook.com>

On 2023/5/19 9:52, Ratheesh Kannoth wrote:
>> ----------------------------------------------------------------------
>> 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) 

Thanks for clarifying.
DUT is for 'Device Under Test'?
what does DUT do after it receive a packet? XDP DROP?

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

Am I missing something here? 'buf' is dma-mapped with
DMA_FROM_DEVICE, can it be used for TX?

Also, what does 'r' in _otx2_alloc_rbuf() mean?



  reply	other threads:[~2023-05-19  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  5:51 Ratheesh Kannoth
2023-05-19  1:41 ` Yunsheng Lin
2023-05-19  1:52   ` Ratheesh Kannoth
2023-05-19  2:37     ` Yunsheng Lin [this message]
2023-05-19  5:19       ` [EXT] " Sunil Kovvuri Goutham
2023-05-19  5:30         ` Ratheesh Kannoth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0136fe46-eeb7-782d-0616-2a444e2f2da4@huawei.com \
    --to=linyunsheng@huawei.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hkelam@marvell.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rkannoth@marvell.com \
    --cc=sbhatta@marvell.com \
    --cc=schalla@marvell.com \
    --cc=sgoutham@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®