summaryrefslogtreecommitdiff
path: root/include/net/page_pool
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-11-26 15:07:31 -0800
committerPaolo Abeni <pabeni@redhat.com>2023-11-28 15:48:39 +0100
commit02b3de80c5f879f92e5f4bb3f535d172e0fc0ea0 (patch)
treedb3a33025453778ddac1a6c5e2e93214c8db180e /include/net/page_pool
parent083772c9f972dcc248913b52a0dec1025baa1e16 (diff)
net: page_pool: stash the NAPI ID for easier access
To avoid any issues with race conditions on accessing napi and having to think about the lifetime of NAPI objects in netlink GET - stash the napi_id to which page pool was linked at creation time. Reviewed-by: Eric Dumazet <edumazet@google.com> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/net/page_pool')
-rw-r--r--include/net/page_pool/types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/page_pool/types.h b/include/net/page_pool/types.h
index b258a571201e..7e47d7bb2c1e 100644
--- a/include/net/page_pool/types.h
+++ b/include/net/page_pool/types.h
@@ -193,6 +193,7 @@ struct page_pool {
/* User-facing fields, protected by page_pools_lock */
struct {
struct hlist_node list;
+ u32 napi_id;
u32 id;
} user;
};