Thread (11 messages) 11 messages, 3 authors, 2026-03-18

Re: [PATCH v4 net-next 2/5] devlink: Implement devlink param multi attribute nested data values

From: Ratheesh Kannoth <hidden>
Date: 2026-03-18 02:31:44
Also in: lkml

On 2026-03-17 at 18:52:32, Jiri Pirko (jiri@resnulli.us) wrote:
quoted
+	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?
We have U8, U16, U32, U64 param types in devlink. So declared as u32 array.
Let me know if you feel strongly about your opinion, will respin

enum devlink_param_type {
        DEVLINK_PARAM_TYPE_U8 = DEVLINK_VAR_ATTR_TYPE_U8,
        DEVLINK_PARAM_TYPE_U16 = DEVLINK_VAR_ATTR_TYPE_U16,
        DEVLINK_PARAM_TYPE_U32 = DEVLINK_VAR_ATTR_TYPE_U32,
        DEVLINK_PARAM_TYPE_U64 = DEVLINK_VAR_ATTR_TYPE_U64,
        DEVLINK_PARAM_TYPE_STRING = DEVLINK_VAR_ATTR_TYPE_STRING,
        DEVLINK_PARAM_TYPE_BOOL = DEVLINK_VAR_ATTR_TYPE_FLAG,
        DEVLINK_PARAM_TYPE_U32_ARRAY = DEVLINK_VAR_ATTR_TYPE_U32_ARRAY,
};
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help