diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2023-11-21 17:22:37 -0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2023-11-21 17:22:38 -0800 |
| commit | 46e208e70a848a828b35d1e4052313f3b34516d6 (patch) | |
| tree | 7426b591fcfd20c14af1a71aec38adce9086ab25 /include | |
| parent | 3a17ea77da31ef0b5ab04111583bfcd38f56fcba (diff) | |
| parent | 2da0cac1e9494f34c5a3438e5c4c7e662e1b7445 (diff) | |
Merge branch 'net-page_pool-add-netlink-based-introspection-part1'
Jakub Kicinski says:
====================
net: page_pool: plit the page_pool_params into fast and slow
Small refactoring in prep for adding more page pool params
which won't be needed on the fast path.
v1: https://lore.kernel.org/all/20231024160220.3973311-1-kuba@kernel.org/
RFC: https://lore.kernel.org/all/20230816234303.3786178-1-kuba@kernel.org/
====================
Link: https://lore.kernel.org/r/20231121000048.789613-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/page_pool/types.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h index 6fc5134095ed..e1bb92c192de 100644 --- a/include/net/page_pool/types.h +++ b/include/net/page_pool/types.h @@ -54,18 +54,22 @@ struct pp_alloc_cache { * @offset: DMA sync address offset for PP_FLAG_DMA_SYNC_DEV */ struct page_pool_params { - unsigned int flags; - unsigned int order; - unsigned int pool_size; - int nid; - struct device *dev; - struct napi_struct *napi; - enum dma_data_direction dma_dir; - unsigned int max_len; - unsigned int offset; + struct_group_tagged(page_pool_params_fast, fast, + unsigned int flags; + unsigned int order; + unsigned int pool_size; + int nid; + struct device *dev; + struct napi_struct *napi; + enum dma_data_direction dma_dir; + unsigned int max_len; + unsigned int offset; + ); + struct_group_tagged(page_pool_params_slow, slow, /* private: used by test code only */ - void (*init_callback)(struct page *page, void *arg); - void *init_arg; + void (*init_callback)(struct page *page, void *arg); + void *init_arg; + ); }; #ifdef CONFIG_PAGE_POOL_STATS @@ -119,7 +123,9 @@ struct page_pool_stats { #endif struct page_pool { - struct page_pool_params p; + struct page_pool_params_fast p; + + bool has_init_callback; long frag_users; struct page *frag_page; @@ -178,6 +184,9 @@ struct page_pool { refcount_t user_cnt; u64 destroy_cnt; + + /* Slow/Control-path information follows */ + struct page_pool_params_slow slow; }; struct page *page_pool_alloc_pages(struct page_pool *pool, gfp_t gfp); |
