All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: John Daley <johndale@cisco.com>
Cc: andrew+netdev@lunn.ch, benve@cisco.com, davem@davemloft.net,
	edumazet@google.com, neescoba@cisco.com, netdev@vger.kernel.org,
	pabeni@redhat.com, satishkh@cisco.com
Subject: Re: [PATCH net-next v4 4/6] enic: Use the Page Pool API for RX when MTU is less than page size
Date: Mon, 6 Jan 2025 16:19:53 -0800	[thread overview]
Message-ID: <20250106161953.019083b3@kernel.org> (raw)
In-Reply-To: <20250106215425.3108-1-johndale@cisco.com>

On Mon,  6 Jan 2025 13:54:25 -0800 John Daley wrote:
> >> The Page Pool API improves bandwidth and CPU overhead by recycling
> >> pages instead of allocating new buffers in the driver. Make use of
> >> page pool fragment allocation for smaller MTUs so that multiple
> >> packets can share a page.  
> >
> >Why the MTU limitation? You can set page_pool_params.order
> >to appropriate value always use the page pool.  
> 
> I thought it might waste memory, e.g. allocating 16K for 9000 mtu.
> But now that you mention it, I see that the added code complexity is
> probably not worth it. I am unclear on what to set pp_params.max_len
> to when MTU > PAGE_SIZE. Order * PAGE_SIZE or MTU size? In this case
> the pages won't be fragmented so isn't only necessary for the MTU sized
> area to be DMA SYNC'ed?

Good point, once fragmentation is no longer possible you can
set .max_len to the size of the fragment HW may clobber,
and .offset to the reserved headroom.

> >  
> >> +    page_pool_destroy(rq->pool);
> >> +}  
> 
> I will make a v5 shortly. Would you recommend I split the patchset into 2 parts
> as I think @andrew+netdev was suggesting? The last 2 patches are kind of unrelated
> to the first 4.

Yes, seems like a good idea, patches 5 and 6 would probably have been
merged a while back if they were separate.

  reply	other threads:[~2025-01-07  0:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-02 22:24 [PATCH net-next v4 0/6] enic: Use Page Pool API for receiving packets John Daley
2025-01-02 22:24 ` [PATCH net-next v4 1/6] enic: Refactor RX path common code into helper functions John Daley
2025-01-02 22:24 ` [PATCH net-next v4 2/6] enic: Remove an unnecessary parameter from function enic_queue_rq_desc John Daley
2025-01-02 22:24 ` [PATCH net-next v4 3/6] enic: Use function pointers for buf alloc, free and RQ service John Daley
2025-01-02 22:24 ` [PATCH net-next v4 4/6] enic: Use the Page Pool API for RX when MTU is less than page size John Daley
2025-01-05  1:41   ` Jakub Kicinski
2025-01-06 21:54     ` John Daley
2025-01-07  0:19       ` Jakub Kicinski [this message]
2025-01-07  3:00         ` John Daley
2025-01-10  4:03           ` John Daley
2025-01-11  0:38             ` Jakub Kicinski
2025-01-14 21:23               ` John Daley
2025-01-10 23:52     ` John Daley
2025-01-11  0:41       ` Jakub Kicinski
2025-01-14 21:13         ` John Daley
2025-01-02 22:24 ` [PATCH net-next v4 5/6] enic: Move RX coalescing set function John Daley
2025-01-02 22:24 ` [PATCH net-next v4 6/6] enic: Obtain the Link speed only after the link comes up John Daley

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=20250106161953.019083b3@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=benve@cisco.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=johndale@cisco.com \
    --cc=neescoba@cisco.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=satishkh@cisco.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.