[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240220210342.40267-5-toke@redhat.com>
Date: Tue, 20 Feb 2024 22:03:41 +0100
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc: Toke Høiland-Jørgensen <toke@...hat.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: [PATCH net-next v2 4/4] page pool: Remove init_callback parameter
The only user of the init_callback parameter to page pool was the
BPF_TEST_RUN code. Since that has now been moved to use a different
scheme, we can get rid of the init callback entirely.
Suggested-by: Alexander Lobakin <aleksander.lobakin@...el.com>
Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
---
include/net/page_pool/types.h | 4 ----
net/core/page_pool.c | 4 ----
2 files changed, 8 deletions(-)
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
index 3828396ae60c..2f5975ab2cd0 100644
--- a/include/net/page_pool/types.h
+++ b/include/net/page_pool/types.h
@@ -69,9 +69,6 @@ struct page_pool_params {
);
struct_group_tagged(page_pool_params_slow, slow,
struct net_device *netdev;
-/* private: used by test code only */
- void (*init_callback)(struct page *page, void *arg);
- void *init_arg;
);
};
@@ -129,7 +126,6 @@ struct page_pool {
struct page_pool_params_fast p;
int cpuid;
- bool has_init_callback;
long frag_users;
struct page *frag_page;
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index 89c835fcf094..fd054b6f773a 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -217,8 +217,6 @@ static int page_pool_init(struct page_pool *pool,
*/
}
- pool->has_init_callback = !!pool->slow.init_callback;
-
#ifdef CONFIG_PAGE_POOL_STATS
pool->recycle_stats = alloc_percpu(struct page_pool_recycle_stats);
if (!pool->recycle_stats)
@@ -428,8 +426,6 @@ static void page_pool_set_pp_info(struct page_pool *pool,
* the overhead is negligible.
*/
page_pool_fragment_page(page, 1);
- if (pool->has_init_callback)
- pool->slow.init_callback(page, pool->slow.init_arg);
}
static void page_pool_clear_pp_info(struct page *page)
--
2.43.0
Powered by blists - more mailing lists