From: Ratheesh Kannoth <rkannoth@marvell.com>
To: kernel test robot <lkp@intel.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<llvm@lists.linux.dev>, <oe-kbuild-all@lists.linux.dev>,
<sgoutham@marvell.com>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<andrew+netdev@lunn.ch>, "Saeed Mahameed" <saeedm@nvidia.com>
Subject: Re: [PATCH net-next] devlink: Implement devlink param multi attribute nested data values
Date: Fri, 23 Jan 2026 21:08:20 +0530 [thread overview]
Message-ID: <aXOV7MNtiYgjO5SJ@rkannoth-OptiPlex-7090> (raw)
In-Reply-To: <202601232029.nwwE5gfM-lkp@intel.com>
On 2026-01-23 at 18:18:15, kernel test robot (lkp@intel.com) wrote:
> Hi Ratheesh,
>
> kernel test robot noticed the following build warnings:
> All warnings (new ones prefixed by >>):
>
> >> net/devlink/param.c:305:12: warning: stack frame size (1464) exceeds limit (1280) in 'devlink_nl_param_fill' [-Wframe-larger-than]
> 305 | static int devlink_nl_param_fill(struct sk_buff *msg, struct devlink *devlink,
> | ^
> 1 warning generated.
Jakub,
shall i modify to heap allocation and push v2 ?
-Ratheesh
>
>
> vim +/devlink_nl_param_fill +305 net/devlink/param.c
>
> 830c41e1e987d9 Jiri Pirko 2023-08-28 304
> 830c41e1e987d9 Jiri Pirko 2023-08-28 @305 static int devlink_nl_param_fill(struct sk_buff *msg, struct devlink *devlink,
> 830c41e1e987d9 Jiri Pirko 2023-08-28 306 unsigned int port_index,
> 830c41e1e987d9 Jiri Pirko 2023-08-28 307 struct devlink_param_item *param_item,
> 830c41e1e987d9 Jiri Pirko 2023-08-28 308 enum devlink_command cmd,
> 011d133bb988f8 Daniel Zahka 2025-11-18 309 u32 portid, u32 seq, int flags,
> 011d133bb988f8 Daniel Zahka 2025-11-18 310 struct netlink_ext_ack *extack)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 311 {
> 2a367002ed321e Daniel Zahka 2025-11-18 312 union devlink_param_value default_value[DEVLINK_PARAM_CMODE_MAX + 1];
> 830c41e1e987d9 Jiri Pirko 2023-08-28 313 union devlink_param_value param_value[DEVLINK_PARAM_CMODE_MAX + 1];
> 2a367002ed321e Daniel Zahka 2025-11-18 314 bool default_value_set[DEVLINK_PARAM_CMODE_MAX + 1] = {};
> 830c41e1e987d9 Jiri Pirko 2023-08-28 315 bool param_value_set[DEVLINK_PARAM_CMODE_MAX + 1] = {};
> 830c41e1e987d9 Jiri Pirko 2023-08-28 316 const struct devlink_param *param = param_item->param;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 317 struct devlink_param_gset_ctx ctx;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 318 struct nlattr *param_values_list;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 319 struct nlattr *param_attr;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 320 void *hdr;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 321 int err;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 322 int i;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 323
> 830c41e1e987d9 Jiri Pirko 2023-08-28 324 /* Get value from driver part to driverinit configuration mode */
> 830c41e1e987d9 Jiri Pirko 2023-08-28 325 for (i = 0; i <= DEVLINK_PARAM_CMODE_MAX; i++) {
> 830c41e1e987d9 Jiri Pirko 2023-08-28 326 if (!devlink_param_cmode_is_supported(param, i))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 327 continue;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 328 if (i == DEVLINK_PARAM_CMODE_DRIVERINIT) {
> 830c41e1e987d9 Jiri Pirko 2023-08-28 329 if (param_item->driverinit_value_new_valid)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 330 param_value[i] = param_item->driverinit_value_new;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 331 else if (param_item->driverinit_value_valid)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 332 param_value[i] = param_item->driverinit_value;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 333 else
> 830c41e1e987d9 Jiri Pirko 2023-08-28 334 return -EOPNOTSUPP;
> 2a367002ed321e Daniel Zahka 2025-11-18 335
> 2a367002ed321e Daniel Zahka 2025-11-18 336 if (param_item->driverinit_value_valid) {
> 2a367002ed321e Daniel Zahka 2025-11-18 337 default_value[i] = param_item->driverinit_default;
> 2a367002ed321e Daniel Zahka 2025-11-18 338 default_value_set[i] = true;
> 2a367002ed321e Daniel Zahka 2025-11-18 339 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 340 } else {
> 830c41e1e987d9 Jiri Pirko 2023-08-28 341 ctx.cmode = i;
> 011d133bb988f8 Daniel Zahka 2025-11-18 342 err = devlink_param_get(devlink, param, &ctx, extack);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 343 if (err)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 344 return err;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 345 param_value[i] = ctx.val;
> 2a367002ed321e Daniel Zahka 2025-11-18 346
> 2a367002ed321e Daniel Zahka 2025-11-18 347 err = devlink_param_get_default(devlink, param, &ctx,
> 2a367002ed321e Daniel Zahka 2025-11-18 348 extack);
> 2a367002ed321e Daniel Zahka 2025-11-18 349 if (!err) {
> 2a367002ed321e Daniel Zahka 2025-11-18 350 default_value[i] = ctx.val;
> 2a367002ed321e Daniel Zahka 2025-11-18 351 default_value_set[i] = true;
> 2a367002ed321e Daniel Zahka 2025-11-18 352 } else if (err != -EOPNOTSUPP) {
> 2a367002ed321e Daniel Zahka 2025-11-18 353 return err;
> 2a367002ed321e Daniel Zahka 2025-11-18 354 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 355 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 356 param_value_set[i] = true;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 357 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 358
> 830c41e1e987d9 Jiri Pirko 2023-08-28 359 hdr = genlmsg_put(msg, portid, seq, &devlink_nl_family, flags, cmd);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 360 if (!hdr)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 361 return -EMSGSIZE;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 362
> 830c41e1e987d9 Jiri Pirko 2023-08-28 363 if (devlink_nl_put_handle(msg, devlink))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 364 goto genlmsg_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 365
> 830c41e1e987d9 Jiri Pirko 2023-08-28 366 if (cmd == DEVLINK_CMD_PORT_PARAM_GET ||
> 830c41e1e987d9 Jiri Pirko 2023-08-28 367 cmd == DEVLINK_CMD_PORT_PARAM_NEW ||
> 830c41e1e987d9 Jiri Pirko 2023-08-28 368 cmd == DEVLINK_CMD_PORT_PARAM_DEL)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 369 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, port_index))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 370 goto genlmsg_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 371
> 830c41e1e987d9 Jiri Pirko 2023-08-28 372 param_attr = nla_nest_start_noflag(msg, DEVLINK_ATTR_PARAM);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 373 if (!param_attr)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 374 goto genlmsg_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 375 if (nla_put_string(msg, DEVLINK_ATTR_PARAM_NAME, param->name))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 376 goto param_nest_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 377 if (param->generic && nla_put_flag(msg, DEVLINK_ATTR_PARAM_GENERIC))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 378 goto param_nest_cancel;
> f9e78932eac650 Jiri Pirko 2025-05-05 379 if (nla_put_u8(msg, DEVLINK_ATTR_PARAM_TYPE, param->type))
> 830c41e1e987d9 Jiri Pirko 2023-08-28 380 goto param_nest_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 381
> 830c41e1e987d9 Jiri Pirko 2023-08-28 382 param_values_list = nla_nest_start_noflag(msg,
> 830c41e1e987d9 Jiri Pirko 2023-08-28 383 DEVLINK_ATTR_PARAM_VALUES_LIST);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 384 if (!param_values_list)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 385 goto param_nest_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 386
> 830c41e1e987d9 Jiri Pirko 2023-08-28 387 for (i = 0; i <= DEVLINK_PARAM_CMODE_MAX; i++) {
> 830c41e1e987d9 Jiri Pirko 2023-08-28 388 if (!param_value_set[i])
> 830c41e1e987d9 Jiri Pirko 2023-08-28 389 continue;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 390 err = devlink_nl_param_value_fill_one(msg, param->type,
> 2a367002ed321e Daniel Zahka 2025-11-18 391 i, param_value[i],
> 2a367002ed321e Daniel Zahka 2025-11-18 392 default_value[i],
> 2a367002ed321e Daniel Zahka 2025-11-18 393 default_value_set[i]);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 394 if (err)
> 830c41e1e987d9 Jiri Pirko 2023-08-28 395 goto values_list_nest_cancel;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 396 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 397
> 830c41e1e987d9 Jiri Pirko 2023-08-28 398 nla_nest_end(msg, param_values_list);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 399 nla_nest_end(msg, param_attr);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 400 genlmsg_end(msg, hdr);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 401 return 0;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 402
> 830c41e1e987d9 Jiri Pirko 2023-08-28 403 values_list_nest_cancel:
> 830c41e1e987d9 Jiri Pirko 2023-08-28 404 nla_nest_end(msg, param_values_list);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 405 param_nest_cancel:
> 830c41e1e987d9 Jiri Pirko 2023-08-28 406 nla_nest_cancel(msg, param_attr);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 407 genlmsg_cancel:
> 830c41e1e987d9 Jiri Pirko 2023-08-28 408 genlmsg_cancel(msg, hdr);
> 830c41e1e987d9 Jiri Pirko 2023-08-28 409 return -EMSGSIZE;
> 830c41e1e987d9 Jiri Pirko 2023-08-28 410 }
> 830c41e1e987d9 Jiri Pirko 2023-08-28 411
>
> --
> 0-DAY CI Kernel Test Service
> https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-01-23 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 6:52 Ratheesh Kannoth
2026-01-23 12:48 ` kernel test robot
2026-01-23 15:38 ` Ratheesh Kannoth [this message]
2026-01-23 13:22 ` kernel test robot
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=aXOV7MNtiYgjO5SJ@rkannoth-OptiPlex-7090 \
--to=rkannoth@marvell.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=sgoutham@marvell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®