public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <hawk@kernel•org>
To: Yunsheng Lin <linyunsheng@huawei•com>,
	davem@davemloft•net, kuba@kernel•org, pabeni@redhat•com
Cc: liuyonglong@huawei•com, fanghaiqing@huawei•com,
	zhangkun09@huawei•com, Wei Fang <wei.fang@nxp•com>,
	Shenwei Wang <shenwei.wang@nxp•com>,
	Clark Wang <xiaoning.wang@nxp•com>,
	Andrew Lunn <andrew+netdev@lunn•ch>,
	Eric Dumazet <edumazet@google•com>,
	Jeroen de Borst <jeroendb@google•com>,
	Praveen Kaligineedi <pkaligineedi@google•com>,
	Shailend Chand <shailend@google•com>,
	Tony Nguyen <anthony.l.nguyen@intel•com>,
	Przemek Kitszel <przemyslaw.kitszel@intel•com>,
	Alexander Lobakin <aleksander.lobakin@intel•com>,
	Alexei Starovoitov <ast@kernel•org>,
	Daniel Borkmann <daniel@iogearbox•net>,
	John Fastabend <john.fastabend@gmail•com>,
	Saeed Mahameed <saeedm@nvidia•com>,
	Leon Romanovsky <leon@kernel•org>,
	Tariq Toukan <tariqt@nvidia•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>,
	Simon Horman <horms@kernel•org>,
	Ilias Apalodimas <ilias.apalodimas@linaro•org>,
	imx@lists•linux.dev, netdev@vger•kernel.org,
	linux-kernel@vger•kernel.org, intel-wired-lan@lists•osuosl.org,
	bpf@vger•kernel.org, linux-rdma@vger•kernel.org,
	linux-wireless@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org,
	linux-mediatek@lists•infradead.org
Subject: Re: [PATCH net-next v6 1/8] page_pool: introduce page_pool_get_pp() API
Date: Tue, 7 Jan 2025 15:52:20 +0100	[thread overview]
Message-ID: <02896f96-57dd-47d5-8fa0-8a8aed30fa9a@kernel.org> (raw)
In-Reply-To: <20250106130116.457938-2-linyunsheng@huawei.com>


On 06/01/2025 14.01, Yunsheng Lin wrote:
 > introduce page_pool_get_pp() API to avoid caller accessing
 > page->pp directly.
 >
[...]

> diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h
> index 543f54fa3020..9c4dbd2289b1 100644
> --- a/include/net/page_pool/helpers.h
> +++ b/include/net/page_pool/helpers.h
> @@ -83,6 +83,11 @@ static inline u64 *page_pool_ethtool_stats_get(u64 *data, const void *stats)
>   }
>   #endif
>   
> +static inline struct page_pool *page_pool_get_pp(struct page *page)
> +{
> +	return page->pp;
> +}

IMHO the function name "page_pool_get_pp" is problematic. As calling it 
"get" indicate to me that we are taking some reference on the pp object. 
Is this you plan in later patches?

If it is simply a dereference of page->pp ... then we could call it 
page2pp ?
... but I'm uncertain why we need this change.

--Jesper


  reply	other threads:[~2025-01-07 14:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 13:01 [PATCH net-next v6 0/8] fix two bugs related to page_pool Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 1/8] page_pool: introduce page_pool_get_pp() API Yunsheng Lin
2025-01-07 14:52   ` Jesper Dangaard Brouer [this message]
2025-01-08  9:37     ` Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 2/8] page_pool: fix timing for checking and disabling napi_local Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 3/8] page_pool: fix IOMMU crash when driver has already unbound Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 4/8] page_pool: support unlimited number of inflight pages Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 5/8] page_pool: skip dma sync operation for " Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 6/8] page_pool: use list instead of ptr_ring for ring cache Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 7/8] page_pool: batch refilling pages to reduce atomic operation Yunsheng Lin
2025-01-06 13:01 ` [PATCH net-next v6 8/8] page_pool: use list instead of array for alloc cache Yunsheng Lin
2025-01-07 12:03   ` Simon Horman
2025-01-07 12:55     ` Yunsheng Lin
2025-01-06 23:51 ` [PATCH net-next v6 0/8] fix two bugs related to page_pool Jakub Kicinski
2025-01-07 12:54   ` Yunsheng Lin
2025-01-07 14:26 ` Jesper Dangaard Brouer
2025-01-08  9:36   ` 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=02896f96-57dd-47d5-8fa0-8a8aed30fa9a@kernel.org \
    --to=hawk@kernel$(echo .)org \
    --cc=aleksander.lobakin@intel$(echo .)com \
    --cc=andrew+netdev@lunn$(echo .)ch \
    --cc=angelogioacchino.delregno@collabora$(echo .)com \
    --cc=anthony.l.nguyen@intel$(echo .)com \
    --cc=ast@kernel$(echo .)org \
    --cc=bpf@vger$(echo .)kernel.org \
    --cc=daniel@iogearbox$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=fanghaiqing@huawei$(echo .)com \
    --cc=horms@kernel$(echo .)org \
    --cc=ilias.apalodimas@linaro$(echo .)org \
    --cc=imx@lists$(echo .)linux.dev \
    --cc=intel-wired-lan@lists$(echo .)osuosl.org \
    --cc=jeroendb@google$(echo .)com \
    --cc=john.fastabend@gmail$(echo .)com \
    --cc=kuba@kernel$(echo .)org \
    --cc=kvalo@kernel$(echo .)org \
    --cc=leon@kernel$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-mediatek@lists$(echo .)infradead.org \
    --cc=linux-rdma@vger$(echo .)kernel.org \
    --cc=linux-wireless@vger$(echo .)kernel.org \
    --cc=linyunsheng@huawei$(echo .)com \
    --cc=liuyonglong@huawei$(echo .)com \
    --cc=lorenzo@kernel$(echo .)org \
    --cc=matthias.bgg@gmail$(echo .)com \
    --cc=nbd@nbd$(echo .)name \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=pkaligineedi@google$(echo .)com \
    --cc=przemyslaw.kitszel@intel$(echo .)com \
    --cc=ryder.lee@mediatek$(echo .)com \
    --cc=saeedm@nvidia$(echo .)com \
    --cc=sean.wang@mediatek$(echo .)com \
    --cc=shailend@google$(echo .)com \
    --cc=shayne.chen@mediatek$(echo .)com \
    --cc=shenwei.wang@nxp$(echo .)com \
    --cc=tariqt@nvidia$(echo .)com \
    --cc=wei.fang@nxp$(echo .)com \
    --cc=xiaoning.wang@nxp$(echo .)com \
    --cc=zhangkun09@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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