From: Jakub Kicinski <kuba@kernel.org>
To: Yunsheng Lin <linyunsheng@huawei.com>
Cc: John Daley <johndale@cisco.com>, <benve@cisco.com>,
<satishkh@cisco.com>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, Nelson Escobar <neescoba@cisco.com>
Subject: Re: [PATCH net-next v3 4/6] enic: Use the Page Pool API for RX when MTU is less than page size
Date: Tue, 31 Dec 2024 16:42:00 -0800 [thread overview]
Message-ID: <20241231164200.3364e18b@kernel.org> (raw)
In-Reply-To: <731d74c2-7cc6-4d60-a2a4-c451d399e442@huawei.com>
On Tue, 31 Dec 2024 19:37:12 +0800 Yunsheng Lin wrote:
> >> It seems the above has a similar problem of not using
> >> page_pool_put_full_page() when page_pool_dev_alloc() API is used and
> >> page_pool is created with PP_FLAG_DMA_SYNC_DEV flags.
> >>
> >> It seems like a common mistake that a WARN_ON might be needed to catch
> >> this kind of problem.
> >
> > Agreed. Maybe also add an alias to page_pool_put_full_page() called
> > something like page_pool_dev_put_page() to correspond to the alloc
> > call? I suspect people don't understand the internals and "releasing
> > full page" feels wrong when they only allocated a portion..
>
> Yes, I guess so too.
> But as all the alloc APIs have the 'dev' version of API:
> page_pool_dev_alloc
> page_pool_dev_alloc_frag
> page_pool_dev_alloc_pages
> page_pool_dev_alloc_va
>
> Only adding 'dev' does not seem to clear the confusion from API naming
> perspective.
page_pool_free_page()? We already have page_pool_free_va()
next prev parent reply other threads:[~2025-01-01 0:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-28 0:10 [PATCH net-next v3 0/6] enic: Use Page Pool API for receiving packets John Daley
2024-12-28 0:10 ` [PATCH net-next v3 1/6] enic: Refactor RX path common code into helper functions John Daley
2024-12-28 0:10 ` [PATCH net-next v3 2/6] enic: Remove an unnecessary parameter from function enic_queue_rq_desc John Daley
2024-12-28 0:10 ` [PATCH net-next v3 3/6] enic: Use function pointers for buf alloc, free and RQ service John Daley
2024-12-28 0:10 ` [PATCH net-next v3 4/6] enic: Use the Page Pool API for RX when MTU is less than page size John Daley
2024-12-30 9:18 ` Yunsheng Lin
2024-12-30 16:44 ` Jakub Kicinski
2024-12-31 11:37 ` Yunsheng Lin
2025-01-01 0:42 ` Jakub Kicinski [this message]
2025-01-03 18:40 ` John Daley
2024-12-28 0:10 ` [PATCH net-next v3 5/6] enic: Move RX coalescing set function John Daley
2024-12-28 0:10 ` [PATCH net-next v3 6/6] enic: Obtain the Link speed only after the link comes up John Daley
2024-12-28 0:36 ` Andrew Lunn
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=20241231164200.3364e18b@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=linyunsheng@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).