public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: davem@davemloft•net, donald.hunter@gmail•com
Cc: netdev@vger•kernel.org, edumazet@google•com, pabeni@redhat•com,
	andrew+netdev@lunn•ch, horms@kernel•org, sdf@fomichev•me,
	joe@dama•to, jstancek@redhat•com,
	Jakub Kicinski <kuba@kernel•org>
Subject: [PATCH net-next v2 0/4] tools: ynl: turn the page-pool sample into a real tool
Date: Fri,  7 Nov 2025 08:22:23 -0800	[thread overview]
Message-ID: <20251107162227.980672-1-kuba@kernel.org> (raw)

The page-pool YNL sample is quite useful. It's helps calculate
recycling rate and memory consumption. Since we still haven't
figured out a way to integrate with iproute2 (not for the lack
of thinking how to solve it) - create a ynltool command in ynl.

Add page-pool and qstats support.

Most commands can use the Python YNL CLI directly but low level
stats often need aggregation or some math on top to be useful.
Specifically in this patch set:
 - page pool stats are aggregated and recycling rate computed
 - per-queue stats are used to compute traffic balance across queues

v2:
 - patch 1 was applied already
 - [patch 1 (was 2)] use kernel version
 - [patch 2 (was 3)] Makefile cleanup
v1: https://lore.kernel.org/20251104232348.1954349-1-kuba@kernel.org

Jakub Kicinski (4):
  tools: ynltool: create skeleton for the C command
  tools: ynltool: add page-pool stats
  tools: ynltool: add qstats support
  tools: ynltool: add traffic distribution balance

 tools/net/ynl/Makefile              |   3 +-
 tools/net/ynl/ynltool/Makefile      |  55 +++
 tools/net/ynl/ynltool/json_writer.h |  75 ++++
 tools/net/ynl/ynltool/main.h        |  66 +++
 tools/net/ynl/samples/page-pool.c   | 149 -------
 tools/net/ynl/ynltool/json_writer.c | 288 +++++++++++++
 tools/net/ynl/ynltool/main.c        | 242 +++++++++++
 tools/net/ynl/ynltool/page-pool.c   | 461 +++++++++++++++++++++
 tools/net/ynl/ynltool/qstats.c      | 621 ++++++++++++++++++++++++++++
 tools/net/ynl/ynltool/.gitignore    |   1 +
 10 files changed, 1811 insertions(+), 150 deletions(-)
 create mode 100644 tools/net/ynl/ynltool/Makefile
 create mode 100644 tools/net/ynl/ynltool/json_writer.h
 create mode 100644 tools/net/ynl/ynltool/main.h
 delete mode 100644 tools/net/ynl/samples/page-pool.c
 create mode 100644 tools/net/ynl/ynltool/json_writer.c
 create mode 100644 tools/net/ynl/ynltool/main.c
 create mode 100644 tools/net/ynl/ynltool/page-pool.c
 create mode 100644 tools/net/ynl/ynltool/qstats.c
 create mode 100644 tools/net/ynl/ynltool/.gitignore

-- 
2.51.1


             reply	other threads:[~2025-11-07 16:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 16:22 Jakub Kicinski [this message]
2025-11-07 16:22 ` [PATCH net-next v2 1/4] tools: ynltool: create skeleton for the C command Jakub Kicinski
2025-11-11 11:15   ` Paolo Abeni
2025-11-11 11:46     ` Paolo Abeni
2025-11-07 16:22 ` [PATCH net-next v2 2/4] tools: ynltool: add page-pool stats Jakub Kicinski
2025-11-07 16:22 ` [PATCH net-next v2 3/4] tools: ynltool: add qstats support Jakub Kicinski
2025-11-07 16:22 ` [PATCH net-next v2 4/4] tools: ynltool: add traffic distribution balance Jakub Kicinski
2025-11-07 21:46 ` [PATCH net-next v2 0/4] tools: ynl: turn the page-pool sample into a real tool Stanislav Fomichev
2025-11-11 11:50 ` 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=20251107162227.980672-1-kuba@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=andrew+netdev@lunn$(echo .)ch \
    --cc=davem@davemloft$(echo .)net \
    --cc=donald.hunter@gmail$(echo .)com \
    --cc=edumazet@google$(echo .)com \
    --cc=horms@kernel$(echo .)org \
    --cc=joe@dama$(echo .)to \
    --cc=jstancek@redhat$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=sdf@fomichev$(echo .)me \
    /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