From: Furong Xu <0x1207@gmail.com>
To: Yunsheng Lin <linyunsheng@huawei.com>, Jakub Kicinski <kuba@kernel.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, <xfr@outlook.com>
Subject: Re: [PATCH net-next v1] page_pool: check for dma_sync_size earlier
Date: Fri, 11 Oct 2024 17:26:05 +0800 [thread overview]
Message-ID: <20241011172605.0000142f@gmail.com> (raw)
In-Reply-To: <21036339-3eeb-4606-9a84-d36bddba2b31@huawei.com>
Hi Jakub,
On Fri, 11 Oct 2024 16:55:34 +0800, Yunsheng Lin <linyunsheng@huawei.com> wrote:
> On 2024/10/11 14:31, Furong Xu wrote:
> > Hi Ilias,
> >
> > On Fri, 11 Oct 2024 08:06:04 +0300, Ilias Apalodimas <ilias.apalodimas@linaro.org> wrote:
> >
> >> Hi Furong,
> >>
> >> On Fri, 11 Oct 2024 at 05:15, Furong Xu <0x1207@gmail.com> wrote:
> >>>
> >>> On Thu, 10 Oct 2024 19:53:39 +0800, Yunsheng Lin <linyunsheng@huawei.com> wrote:
> >>>
> >>>> Is there any reason that those drivers not to unset the PP_FLAG_DMA_SYNC_DEV
> >>>> when calling page_pool_create()?
> >>>> Does it only need dma sync for some cases and not need dma sync for other
> >>>> cases? if so, why not do the dma sync in the driver instead?
> >>>
> >>> The answer is in this commit:
> >>> https://git.kernel.org/netdev/net/c/5546da79e6cc
> >>
> >> I am not sure I am following. Where does the stmmac driver call a sync
> >> with len 0?
> > For now, only drivers/net/ethernet/freescale/fec_main.c does.
> > And stmmac driver does not yet, but I will send another patch to make it call sync with
> > len 0. This is a proper fix as Jakub Kicinski suggested.
>
> In order to support the above use case, it seems there might be two
> options here:
> 1. Driver calls page_pool_create() without PP_FLAG_DMA_SYNC_DEV and
> handle the dma sync itself.
> 2. Page_pool may provides a non-dma-sync version of page_pool_put_page()
> API even when Driver calls page_pool_create() with PP_FLAG_DMA_SYNC_DEV.
>
> Maybe option 2 is better one in the longer term as it may provide some
> flexibility for the user and enable removing of the DMA_SYNC_DEV in the
> future?
What is your opinion about this?
Thanks.
next prev parent reply other threads:[~2024-10-11 9:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-10 11:40 [PATCH net-next v1] page_pool: check for dma_sync_size earlier Furong Xu
2024-10-10 11:53 ` Yunsheng Lin
2024-10-11 2:14 ` Furong Xu
2024-10-11 5:06 ` Ilias Apalodimas
2024-10-11 6:31 ` Furong Xu
2024-10-11 8:55 ` Yunsheng Lin
2024-10-11 9:26 ` Furong Xu [this message]
2024-10-11 15:49 ` Jakub Kicinski
2024-10-11 12:13 ` Ilias Apalodimas
2024-10-12 6:14 ` Yunsheng Lin
2024-10-14 6:35 ` Furong Xu
2024-10-14 12:38 ` Yunsheng Lin
2024-10-15 7:43 ` Ilias Apalodimas
2024-10-15 11:06 ` Yunsheng Lin
2024-10-15 13:25 ` Ilias Apalodimas
2024-10-16 2:32 ` Furong Xu
2024-10-16 9:09 ` Yunsheng Lin
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=20241011172605.0000142f@gmail.com \
--to=0x1207@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xfr@outlook.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).