History

net: page_pool: implement GET in the netlink API

Expose the very basic page pool information via netlink. Example using ynl-py for a system with 9 queues: $ ./cli.py --no-schema --spec netlink/specs/netdev.yaml \ --dump page-pool-get [{'id': 19, 'ifindex': 2, 'napi-id': 147}, {'id': 18, 'ifindex': 2, 'napi-id': 146}, {'id': 17, 'ifindex': 2, 'napi-id': 145}, {'id': 16, 'ifindex': 2, 'napi-id': 144}, {'id': 15, 'ifindex': 2, 'napi-id': 143}, {'id': 14, 'ifindex': 2, 'napi-id': 142}, {'id': 13, 'ifindex': 2, 'napi-id': 141}, {'id': 12, 'ifindex': 2, 'napi-id': 140}, {'id': 11, 'ifindex': 2, 'napi-id': 139}, {'id': 10, 'ifindex': 2, 'napi-id': 138}]

Jakub Kicinski committed 2 years ago

Commit 950ab531 parent 839ff604 files · +167 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/netdev.h+10−0
@@ -64,11 +64,21 @@ enum { · 63 unmodified lines
6464 NETDEV_A_DEV_MAX = (__NETDEV_A_DEV_MAX - 1)
6565 };
6666
67+enum {
68+ NETDEV_A_PAGE_POOL_ID = 1,
69+ NETDEV_A_PAGE_POOL_IFINDEX,
70+ NETDEV_A_PAGE_POOL_NAPI_ID,
71+
72+ __NETDEV_A_PAGE_POOL_MAX,
73+ NETDEV_A_PAGE_POOL_MAX = (__NETDEV_A_PAGE_POOL_MAX - 1)
74+};
75+
6776 enum {
6877 NETDEV_CMD_DEV_GET = 1,
6978 NETDEV_CMD_DEV_ADD_NTF,
7079 NETDEV_CMD_DEV_DEL_NTF,
7180 NETDEV_CMD_DEV_CHANGE_NTF,
81+ NETDEV_CMD_PAGE_POOL_GET,
7282
7383 __NETDEV_CMD_MAX,
7484 NETDEV_CMD_MAX = (__NETDEV_CMD_MAX - 1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t