diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-11-27 02:07:40 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-11-28 17:48:39 +0300 |
commit | 637567e4a3ef6f6a5ffa48781207d270265f7e68 (patch) | |
tree | 03d795a2591a1f3ce239993abf09790f3bc8a799 /tools/net/ynl/lib | |
parent | be0096676e230b43730b8936ac393d155b4e3262 (diff) | |
download | linux-637567e4a3ef6f6a5ffa48781207d270265f7e68.tar.xz |
tools: ynl: add sample for getting page-pool information
Regenerate the tools/ code after netdev spec changes.
Add sample to query page-pool info in a concise fashion:
$ ./page-pool
eth0[2] page pools: 10 (zombies: 0)
refs: 41984 bytes: 171966464 (refs: 0 bytes: 0)
recycling: 90.3% (alloc: 656:397681 recycle: 89652:270201)
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 'tools/net/ynl/lib')
-rw-r--r-- | tools/net/ynl/lib/ynl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/net/ynl/lib/ynl.h b/tools/net/ynl/lib/ynl.h index e974378e3b8c..075d868f3b57 100644 --- a/tools/net/ynl/lib/ynl.h +++ b/tools/net/ynl/lib/ynl.h @@ -239,7 +239,7 @@ int ynl_error_parse(struct ynl_parse_arg *yarg, const char *msg); #ifndef MNL_HAS_AUTO_SCALARS static inline uint64_t mnl_attr_get_uint(const struct nlattr *attr) { - if (mnl_attr_get_len(attr) == 4) + if (mnl_attr_get_payload_len(attr) == 4) return mnl_attr_get_u32(attr); return mnl_attr_get_u64(attr); } |