Re: [PATCH v12 net-next 3/9] devlink: pass param values by pointer

From: Przemek Kitszel

Date: Mon May 11 2026 - 09:45:00 EST


On 5/8/26 05:49, Ratheesh Kannoth wrote:
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.

Signed-off-by: Ratheesh Kannoth <rkannoth@xxxxxxxxxxx>
---
drivers/dpll/zl3073x/devlink.c | 6 +-
drivers/net/ethernet/amazon/ena/ena_devlink.c | 8 +--
drivers/net/ethernet/amd/pds_core/core.h | 2 +-
drivers/net/ethernet/amd/pds_core/devlink.c | 2 +-
.../net/ethernet/broadcom/bnxt/bnxt_devlink.c | 6 +-
.../net/ethernet/intel/ice/devlink/devlink.c | 30 ++++----

those are pure mechanical changes, no problem for me
Acked-by: Przemek Kitszel <przemyslaw.kitszel@xxxxxxxxx>

.../marvell/octeontx2/af/rvu_devlink.c | 22 +++---
.../marvell/octeontx2/nic/otx2_devlink.c | 4 +-
drivers/net/ethernet/mellanox/mlx4/main.c | 14 ++--
.../net/ethernet/mellanox/mlx5/core/devlink.c | 72 +++++++++----------
.../mellanox/mlx5/core/eswitch_offloads.c | 2 +-
.../net/ethernet/mellanox/mlx5/core/fs_core.c | 4 +-
.../mellanox/mlx5/core/lib/nv_param.c | 12 ++--
drivers/net/ethernet/mellanox/mlxsw/core.c | 8 +--
.../ethernet/netronome/nfp/devlink_param.c | 6 +-
drivers/net/netdevsim/dev.c | 4 +-
include/net/devlink.h | 4 +-
net/devlink/param.c | 32 ++++-----
18 files changed, 119 insertions(+), 119 deletions(-)