Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Yunsheng Lin <linyunsheng@huawei.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
	Alexander H Duyck <alexander.duyck@gmail.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>, Wei Fang <wei.fang@nxp.com>,
	Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Sunil Goutham <sgoutham@marvell.com>,
	Geetha sowjanya <gakula@marvell.com>,
	Subbaraya Sundeep <sbhatta@marvell.com>,
	hariprasad <hkelam@marvell.com>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	Ryder Lee <ryder.lee@mediatek.com>,
	Shayne Chen <shayne.chen@mediatek.com>,
	Sean Wang <sean.wang@mediatek.com>, Kalle Valo <kvalo@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	<linux-rdma@vger.kernel.org>, <bpf@vger.kernel.org>,
	<linux-wireless@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH net-next v2] page_pool: split types and declarations from page_pool.h
Date: Wed, 26 Jul 2023 19:23:21 +0800	[thread overview]
Message-ID: <22af47fe-1347-3e32-70bf-745d833e88b9@huawei.com> (raw)
In-Reply-To: <16b4ab57-dfb0-2c1d-9be1-57da30dff3c3@intel.com>

On 2023/7/26 18:43, Alexander Lobakin wrote:
> From: Alexander H Duyck <alexander.duyck@gmail.com>
> Date: Tue, 25 Jul 2023 08:47:46 -0700
> 
>> On Tue, 2023-07-25 at 21:12 +0800, Yunsheng Lin wrote:
>>> Split types and pure function declarations from page_pool.h
>>> and add them in page_pool/types.h, so that C sources can
>>> include page_pool.h and headers should generally only include
>>> page_pool/types.h as suggested by jakub.
>>>
>>> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
>>> Suggested-by: Jakub Kicinski <kuba@kernel.org>
>>> CC: Alexander Lobakin <aleksander.lobakin@intel.com>
> 
> [...]
> 
>>> +/* Caller must provide appropriate safe context, e.g. NAPI. */
>>> +void page_pool_update_nid(struct page_pool *pool, int new_nid);
>>> +
>>> +#endif /* _NET_PAGE_POOL_H */
>>
>>
>> This seems kind of overkill for what is needed. It seems like the
>> general thought process with splitting this was so that you had just
>> the minimum of what is needed to support skbuff.h and the functions
>> declared there. The rest of this would then be added via the .h to the
>> .c files that will actually be calling the functions.
>>
>> By that logic I think the only thing we really need is the function
>> declaration for page_pool_return_skb_page moved into skbuff.h. We could
>> then just remove page_pool.h from skbuff.h couldn't we?
> 
> This patch is not to drop page_pool.h include from skbuff.h.
> This is more future-proof (since I'm dropping this include anyway in my
> series) to have includes organized and prevent cases like that one with
> skbuff.h from happening. And to save some CPU cycles on preprocessing if
> that makes sense.

The suggestion is from below:

https://lore.kernel.org/all/20230710113841.482cbeac@kernel.org/

> 
>>
>> Another thing we could consider doing is looking at splitting things up
>> so that we had a include file in net/core/page_pool.h to handle some of
>> the cases where we are just linking the page_pool bits to other core
>> file bits such as xdp.c and skbuff.c.

I suppose the above suggestion is about splitting or naming by
the user as the discussed in the below thread?
https://lore.kernel.org/all/20230721182942.0ca57663@kernel.org/

> 
> Thanks,
> Olek
> .
> 

  reply	other threads:[~2023-07-26 11:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25 13:12 [PATCH net-next v2] page_pool: split types and declarations from page_pool.h Yunsheng Lin
2023-07-25 14:42 ` Ilias Apalodimas
2023-07-25 21:12   ` Jakub Kicinski
2023-07-26  6:41     ` Ilias Apalodimas
2023-07-26 10:48     ` Alexander Lobakin
2023-07-26 15:47       ` Jakub Kicinski
2023-07-27 11:47         ` Yunsheng Lin
2023-07-27 13:58           ` Alexander Lobakin
2023-07-25 15:47 ` Alexander H Duyck
2023-07-26 10:43   ` Alexander Lobakin
2023-07-26 11:23     ` Yunsheng Lin [this message]
2023-07-26 15:30       ` Alexander Duyck
2023-07-26 15:39         ` Alexander Duyck
2023-07-26 15:50           ` Jakub Kicinski
2023-07-26 16:42             ` Alexander Duyck
2023-07-26 15:41         ` Alexander Lobakin

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=22af47fe-1347-3e32-70bf-745d833e88b9@huawei.com \
    --to=linyunsheng@huawei.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hawk@kernel.org \
    --cc=hkelam@marvell.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=kvalo@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryder.lee@mediatek.com \
    --cc=saeedm@nvidia.com \
    --cc=sbhatta@marvell.com \
    --cc=sean.wang@mediatek.com \
    --cc=sgoutham@marvell.com \
    --cc=shayne.chen@mediatek.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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