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