From: Jakub Kicinski <kuba@kernel•org>
To: davem@davemloft•net
Cc: netdev@vger•kernel.org, edumazet@google•com, pabeni@redhat•com,
almasrymina@google•com, hawk@kernel•org,
ilias.apalodimas@linaro•org, dsahern@gmail•com,
dtatulea@nvidia•com, Jakub Kicinski <kuba@kernel•org>
Subject: [PATCH net-next v2 08/15] net: page_pool: add nlspec for basic access to page pools
Date: Mon, 20 Nov 2023 16:00:41 -0800 [thread overview]
Message-ID: <20231121000048.789613-9-kuba@kernel.org> (raw)
In-Reply-To: <20231121000048.789613-1-kuba@kernel.org>
Add a Netlink spec in YAML for getting very basic information
about page pools.
Signed-off-by: Jakub Kicinski <kuba@kernel•org>
---
Documentation/netlink/specs/netdev.yaml | 46 +++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/Documentation/netlink/specs/netdev.yaml b/Documentation/netlink/specs/netdev.yaml
index 14511b13f305..84ca3c2ab872 100644
--- a/Documentation/netlink/specs/netdev.yaml
+++ b/Documentation/netlink/specs/netdev.yaml
@@ -86,6 +86,34 @@ name: netdev
See Documentation/networking/xdp-rx-metadata.rst for more details.
type: u64
enum: xdp-rx-metadata
+ -
+ name: page-pool
+ attributes:
+ -
+ name: id
+ doc: Unique ID of a Page Pool instance.
+ type: uint
+ checks:
+ min: 1
+ max: u32-max
+ -
+ name: ifindex
+ doc: |
+ ifindex of the netdev to which the pool belongs.
+ May be reported as 0 if the page pool was allocated for a netdev
+ which got destroyed already (page pools may outlast their netdevs
+ because they wait for all memory to be returned).
+ type: u32
+ checks:
+ min: 1
+ max: s32-max
+ -
+ name: napi-id
+ doc: Id of NAPI using this Page Pool instance.
+ type: uint
+ checks:
+ min: 1
+ max: u32-max
operations:
list:
@@ -120,6 +148,24 @@ name: netdev
doc: Notification about device configuration being changed.
notify: dev-get
mcgrp: mgmt
+ -
+ name: page-pool-get
+ doc: |
+ Get / dump information about Page Pools.
+ (Only Page Pools associated with a net_device can be listed.)
+ attribute-set: page-pool
+ do:
+ request:
+ attributes:
+ - id
+ reply: &pp-reply
+ attributes:
+ - id
+ - ifindex
+ - napi-id
+ dump:
+ reply: *pp-reply
+ config-cond: page-pool
mcast-groups:
list:
--
2.42.0
next prev parent reply other threads:[~2023-11-21 0:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-21 0:00 [PATCH net-next v2 00/15] net: page_pool: add netlink-based introspection Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 01/15] net: page_pool: split the page_pool_params into fast and slow Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 02/15] net: page_pool: avoid touching slow on the fastpath Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 03/15] net: page_pool: factor out uninit Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 04/15] net: page_pool: id the page pools Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 05/15] net: page_pool: record pools per netdev Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 06/15] net: page_pool: stash the NAPI ID for easier access Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 07/15] eth: link netdev to page_pools in drivers Jakub Kicinski
2023-11-21 13:13 ` kernel test robot
2023-11-21 21:25 ` kernel test robot
2023-11-21 0:00 ` Jakub Kicinski [this message]
2023-11-21 18:24 ` [PATCH net-next v2 08/15] net: page_pool: add nlspec for basic access to page pools Willem de Bruijn
2023-11-21 20:37 ` Jakub Kicinski
2023-11-21 21:33 ` Willem de Bruijn
2023-11-21 22:00 ` Jakub Kicinski
2023-11-21 22:49 ` David Ahern
2023-11-21 23:42 ` Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 09/15] net: page_pool: implement GET in the netlink API Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 10/15] net: page_pool: add netlink notifications for state changes Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 11/15] net: page_pool: report amount of memory held by page pools Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 12/15] net: page_pool: report when page pool was destroyed Jakub Kicinski
2023-11-21 20:45 ` Jesper Dangaard Brouer
2023-11-21 21:49 ` Jakub Kicinski
2023-11-22 8:53 ` Jesper Dangaard Brouer
2023-11-21 0:00 ` [PATCH net-next v2 13/15] net: page_pool: expose page pool stats via netlink Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 14/15] net: page_pool: mute the periodic warning for visible page pools Jakub Kicinski
2023-11-21 0:00 ` [PATCH net-next v2 15/15] tools: ynl: add sample for getting page-pool information Jakub Kicinski
2023-11-22 1:31 ` [PATCH net-next v2 00/15] net: page_pool: add netlink-based introspection Jakub Kicinski
2023-11-22 8:45 ` Jesper Dangaard Brouer
2023-11-22 1:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231121000048.789613-9-kuba@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=almasrymina@google$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dsahern@gmail$(echo .)com \
--cc=dtatulea@nvidia$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=hawk@kernel$(echo .)org \
--cc=ilias.apalodimas@linaro$(echo .)org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox