net: page_pool: id the page pools

To give ourselves the flexibility of creating netlink commands
and ability to refer to page pool instances in uAPIs create
IDs for page pools.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Shakeel Butt <shakeelb@google.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Jakub Kicinski
2023-11-26 15:07:29 -08:00
committed by Paolo Abeni
parent 23cfaf67ba
commit f17c69649c
5 changed files with 66 additions and 6 deletions

View File

@@ -187,6 +187,10 @@ struct page_pool {
/* Slow/Control-path information follows */
struct page_pool_params_slow slow;
/* User-facing fields, protected by page_pools_lock */
struct {
u32 id;
} user;
};
struct page *page_pool_alloc_pages(struct page_pool *pool, gfp_t gfp);