linux/include/uapi
Daniel Zahka 2a367002ed devlink: support default values for param-get and param-set
Support querying and resetting to default param values.

Introduce two new devlink netlink attrs:
DEVLINK_ATTR_PARAM_VALUE_DEFAULT and
DEVLINK_ATTR_PARAM_RESET_DEFAULT. The former is used to contain an
optional parameter value inside of the param_value nested
attribute. The latter is used in param-set requests from userspace to
indicate that the driver should reset the param to its default value.

To implement this, two new functions are added to the devlink driver
api: devlink_param::get_default() and
devlink_param::reset_default(). These callbacks allow drivers to
implement default param actions for runtime and permanent cmodes. For
driverinit params, the core latches the last value set by a driver via
devl_param_driverinit_value_set(), and uses that as the default value
for a param.

Because default parameter values are optional, it would be impossible
to discern whether or not a param of type bool has default value of
false or not provided if the default value is encoded using a netlink
flag type. For this reason, when a DEVLINK_PARAM_TYPE_BOOL has an
associated default value, the default value is encoded using a u8
type.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20251119025038.651131-4-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-11-20 19:01:22 -08:00
..
asm-generic Networking changes for 6.17. 2025-07-30 08:58:55 -07:00
cxl fwctl/cxl: Fix uuid_t usage in uapi 2025-04-11 20:45:43 -03:00
drm drm: define NVIDIA DRM format modifiers for GB20x 2025-11-06 11:01:45 +10:00
fwctl pds_fwctl: add rpc and query support 2025-03-21 20:57:55 -03:00
linux devlink: support default values for param-get and param-set 2025-11-20 19:01:22 -08:00
misc Char/Misc/IIO/Binder changes for 6.18-rc1 2025-10-04 16:26:32 -07:00
mtd ubi: Expose interface for detailed erase counters 2025-01-18 15:32:32 +01:00
rdma RDMA/irdma: Add SRQ support 2025-09-18 04:48:46 -04:00
regulator
scsi scsi: fc: Avoid -Wflex-array-member-not-at-end warnings 2025-08-30 21:42:19 -04:00
sound ALSA: compress: document 'chan_map' member in snd_dec_opus 2025-09-28 08:29:03 +02:00
video
xen xen/privcmd: Add new syscall to get gsi from dev 2024-09-25 09:54:55 +02:00
Kbuild