diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-11-27 00:07:37 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-11-28 15:48:39 +0100 |
commit | 69cb4952b6f6a226c1c0a7ca400398aaa8f75cf2 (patch) | |
tree | bb1f869ffd9a3ee34f17db0b5111e327d8e17541 /net/core/page_pool_priv.h | |
parent | net: page_pool: report amount of memory held by page pools (diff) | |
download | linux-69cb4952b6f6a226c1c0a7ca400398aaa8f75cf2.tar.xz linux-69cb4952b6f6a226c1c0a7ca400398aaa8f75cf2.zip |
net: page_pool: report when page pool was destroyed
Report when page pool was destroyed. Together with the inflight
/ memory use reporting this can serve as a replacement for the
warning about leaked page pools we currently print to dmesg.
Example output for a fake leaked page pool using some hacks
in netdevsim (one "live" pool, and one "leaked" on the same dev):
$ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \
--dump page-pool-get
[{'id': 2, 'ifindex': 3},
{'id': 1, 'ifindex': 3, 'destroyed': 133, 'inflight': 1}]
Tested-by: Dragos Tatulea <dtatulea@nvidia.com>
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 'net/core/page_pool_priv.h')
-rw-r--r-- | net/core/page_pool_priv.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/core/page_pool_priv.h b/net/core/page_pool_priv.h index 72fb21ea1ddc..90665d40f1eb 100644 --- a/net/core/page_pool_priv.h +++ b/net/core/page_pool_priv.h @@ -6,6 +6,7 @@ s32 page_pool_inflight(const struct page_pool *pool, bool strict); int page_pool_list(struct page_pool *pool); +void page_pool_detached(struct page_pool *pool); void page_pool_unlist(struct page_pool *pool); #endif |