net: page_pool: report when page pool was destroyed
authorJakub Kicinski <kuba@kernel.org>
Sun, 26 Nov 2023 23:07:37 +0000 (15:07 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 28 Nov 2023 14:48:39 +0000 (15:48 +0100)
commit69cb4952b6f6a226c1c0a7ca400398aaa8f75cf2
treebb1f869ffd9a3ee34f17db0b5111e327d8e17541
parent7aee8429eedd0970d8add2fb5b856bfc5f5f1fc1
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>
Documentation/netlink/specs/netdev.yaml
include/net/page_pool/types.h
include/uapi/linux/netdev.h
net/core/page_pool.c
net/core/page_pool_priv.h
net/core/page_pool_user.c