mirror of
https://github.com/torvalds/linux.git
synced 2026-11-29 10:07:52 +00:00
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 <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Acked-by: Jesper Dangaard Brouer <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Paolo Abeni <[email protected]>
13 lines
311 B
C
13 lines
311 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef __PAGE_POOL_PRIV_H
|
|
#define __PAGE_POOL_PRIV_H
|
|
|
|
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
|