netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 0/2] devlink: support default flag attr for param-get and param-set commands
@ 2025-11-18  0:40 Daniel Zahka
  2025-11-18  0:40 ` [PATCH iproute2-next 1/2] devlink: Pull the value printing logic out of pr_out_param_value() Daniel Zahka
  2025-11-18  0:40 ` [PATCH iproute2-next 2/2] devlink: support displaying and resetting to default params Daniel Zahka
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Zahka @ 2025-11-18  0:40 UTC (permalink / raw)
  To: Jiri Pirko, David S. Miller, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Donald Hunter, David Ahern
  Cc: netdev, linux-kernel, Daniel Zahka

Add cli support for default param values introduced in the
accompanying kerenl series [1]. Here is some sample usage:

[1]: https://lore.kernel.org/netdev/20251118002433.332272-1-daniel.zahka@gmail.com/

 # dump params with defaults
./devlink dev param show pci/0000:01:00.0
pci/0000:01:00.0:
  name max_macs type generic
    values:
      cmode driverinit value 128 default 128
...
  name swp_l4_csum_mode type driver-specific
    values:
      cmode permanent value default default default

  # set to l4_only
./devlink dev param set pci/0000:01:00.0 name swp_l4_csum_mode value l4_only cmode permanent
./devlink dev param show pci/0000:01:00.0 name swp_l4_csum_mode
pci/0000:01:00.0:
  name swp_l4_csum_mode type driver-specific
    values:
      cmode permanent value l4_only default default

  # reset to default
./devlink dev param set pci/0000:01:00.0 name swp_l4_csum_mode default cmode permanent
./devlink dev param show pci/0000:01:00.0 name swp_l4_csum_mode
pci/0000:01:00.0:
  name swp_l4_csum_mode type driver-specific
    values:
      cmode permanent value default default default

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
---
Daniel Zahka (2):
      devlink: Pull the value printing logic out of pr_out_param_value()
      devlink: support displaying and resetting to default params

 devlink/devlink.c            | 165 ++++++++++++++++++++++++++++++++-----------
 include/uapi/linux/devlink.h |   3 +
 man/man8/devlink-dev.8       |  22 +++++-
 man/man8/devlink-port.8      |  20 +++++-
 4 files changed, 167 insertions(+), 43 deletions(-)
---
base-commit: da3525408f9607f1e7e41984c034d7e349317a3b
change-id: 20251112-param-defaults-d796ffdb572b

Best regards,
-- 
Daniel Zahka <daniel.zahka@gmail.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-18 16:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-18  0:40 [PATCH iproute2-next 0/2] devlink: support default flag attr for param-get and param-set commands Daniel Zahka
2025-11-18  0:40 ` [PATCH iproute2-next 1/2] devlink: Pull the value printing logic out of pr_out_param_value() Daniel Zahka
2025-11-18 16:02   ` Stephen Hemminger
2025-11-18  0:40 ` [PATCH iproute2-next 2/2] devlink: support displaying and resetting to default params Daniel Zahka
2025-11-18  0:46   ` David Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).