linux/net/devlink
Ratheesh Kannoth d603517771 devlink: pass param values by pointer
union devlink_param_value grows substantially once U64 array
parameters are added to devlink (from 32 bytes to over 264 bytes).
devlink_nl_param_value_fill_one() and devlink_nl_param_value_put()
copy the union by value in several places. Passing two instances as
value arguments alone consumes over 528 bytes of stack; combined with
deeper call chains the parameter stack can approach 800 bytes and trip
CONFIG_FRAME_WARN more easily.

Switch internal helpers and exported driver APIs to pass pointers to
union devlink_param_value rather than passing the union by value.

Reviewed-by: Petr Machata <petrm@nvidia.com> # for mlxsw
Acked-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Arthur Kiyanovski <akiyano@amazon.com> #for ena
Signed-off-by: Ratheesh Kannoth <rkannoth@marvell.com>
Link: https://patch.msgid.link/20260521095303.2395584-4-rkannoth@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-05-25 14:03:06 -07:00
..
core.c devlink: allow devlink instance allocation without a backing device 2026-03-14 13:08:49 -07:00
dev.c devlink: allow devlink instance allocation without a backing device 2026-03-14 13:08:49 -07:00
devl_internal.h devlink: Include port resources in resource dump dumpit 2026-04-08 19:55:38 -07:00
dpipe.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
health.c devlink: Fix incorrect skb socket family dumping 2026-04-08 19:34:38 -07:00
linecard.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Makefile devlink: introduce shared devlink instance for PFs on same chip 2026-03-14 13:08:50 -07:00
netlink_gen.c devlink: Add resource scope filtering to resource dump 2026-04-08 19:55:39 -07:00
netlink_gen.h devlink: Add port-specific option to resource dump doit 2026-04-08 19:55:39 -07:00
netlink.c devlink: Include port resources in resource dump dumpit 2026-04-08 19:55:38 -07:00
param.c devlink: pass param values by pointer 2026-05-25 14:03:06 -07:00
port.c devlink: Add port-level resource registration infrastructure 2026-04-08 19:55:38 -07:00
rate.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
region.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
resource.c devlink: Add resource scope filtering to resource dump 2026-04-08 19:55:39 -07:00
sb.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sh_dev.c devlink: introduce shared devlink instance for PFs on same chip 2026-03-14 13:08:50 -07:00
trap.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00