Skip to content

Commit 839ff60

Browse files
kuba-mooPaolo Abeni
authored andcommitted
net: page_pool: add nlspec for basic access to page pools
Add a Netlink spec in YAML for getting very basic information about page pools. 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]>
1 parent 7cc9e6d commit 839ff60

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

Documentation/netlink/specs/netdev.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,34 @@ attribute-sets:
8686
See Documentation/networking/xdp-rx-metadata.rst for more details.
8787
type: u64
8888
enum: xdp-rx-metadata
89+
-
90+
name: page-pool
91+
attributes:
92+
-
93+
name: id
94+
doc: Unique ID of a Page Pool instance.
95+
type: uint
96+
checks:
97+
min: 1
98+
max: u32-max
99+
-
100+
name: ifindex
101+
doc: |
102+
ifindex of the netdev to which the pool belongs.
103+
May be reported as 0 if the page pool was allocated for a netdev
104+
which got destroyed already (page pools may outlast their netdevs
105+
because they wait for all memory to be returned).
106+
type: u32
107+
checks:
108+
min: 1
109+
max: s32-max
110+
-
111+
name: napi-id
112+
doc: Id of NAPI using this Page Pool instance.
113+
type: uint
114+
checks:
115+
min: 1
116+
max: u32-max
89117

90118
operations:
91119
list:
@@ -120,6 +148,24 @@ operations:
120148
doc: Notification about device configuration being changed.
121149
notify: dev-get
122150
mcgrp: mgmt
151+
-
152+
name: page-pool-get
153+
doc: |
154+
Get / dump information about Page Pools.
155+
(Only Page Pools associated with a net_device can be listed.)
156+
attribute-set: page-pool
157+
do:
158+
request:
159+
attributes:
160+
- id
161+
reply: &pp-reply
162+
attributes:
163+
- id
164+
- ifindex
165+
- napi-id
166+
dump:
167+
reply: *pp-reply
168+
config-cond: page-pool
123169

124170
mcast-groups:
125171
list:

0 commit comments

Comments
 (0)