tools: ynltool: add page-pool stats
Replace the page-pool sample with page pool support in ynltool.
# ynltool page-pool stats
eth0[2] page pools: 18 (zombies: 0)
refs: 171456 bytes:
702283776 (refs: 0 bytes: 0)
recycling: 97.3% (alloc: 2679:
6134966 recycle:
1250981:
4719386)
# ynltool -j page-pool stats | jq
[
{
"ifname": "eth0",
"ifindex": 2,
"page_pools": 18,
"zombies": 0,
"live": {
"refs": 171456,
"bytes":
702283776
},
"zombie": {
"refs": 0,
"bytes": 0
},
"recycling_pct": 97.2746,
"alloc": {
"slow": 2679,
"fast":
6135029
},
"recycle": {
"ring":
1250997,
"cache":
4719432
}
}
]
# ynltool page-pool stats group-by pp
pool id: 108 dev: eth0[2] napi: 530
inflight: 9472 pages
38797312 bytes
recycling: 95.5% (alloc: 148:208379 recycle: 45386:153842)
pool id: 107 dev: eth0[2] napi: 529
inflight: 9408 pages
38535168 bytes
recycling: 94.9% (alloc: 147:180178 recycle: 42251:128808)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://patch.msgid.link/20251107162227.980672-3-kuba@kernel.org
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>