Re: [PATCH v4 net-next 2/5] devlink: Implement devlink param multi attribute nested data values
From: Jiri Pirko
Date: Tue Mar 17 2026 - 09:31:05 EST
Thu, Mar 12, 2026 at 03:27:51AM +0100, rkannoth@xxxxxxxxxxx wrote:
>From: Saeed Mahameed <saeedm@xxxxxxxxxx>
[..]
>+
>+ case DEVLINK_PARAM_TYPE_U32_ARRAY:
>+ cnt = 0;
>+ nla_for_each_attr_type(param_data,
>+ DEVLINK_ATTR_PARAM_VALUE_DATA,
>+ genlmsg_data(info->genlhdr),
>+ genlmsg_len(info->genlhdr), rem) {
>+ if (cnt >= __DEVLINK_PARAM_MAX_ARRAY_SIZE)
>+ return -EMSGSIZE;
>+
>+ if (nla_len(param_data) != sizeof(u32))
>+ return -EINVAL;
>+
>+ value->u32arr.val[cnt] = nla_get_u32(param_data);
Now that we have UINT to be used everywhere for new netlink attributes,
wouldn't it make sense to have rather UINT array?
>+ cnt++;
>+ }
>+
>+ value->u32arr.size = cnt;
>+ break;
[..]