Subject: Re: [PATCH net-next v3 2/2] net/mlx5: implement swp_l4_csum_mode via devlink params

From: Saeed Mahameed <[email-masked]>
Date: Mon, 10 Nov 2025 19:34:40 -0800

On 10 Nov 15:01, Jakub Kicinski wrote:
>On Fri, 7 Nov 2025 22:14:45 -0800 Saeed Mahameed wrote:
>> >+	err = mlx5_nv_param_read_sw_accelerate_conf(dev, mnvda, sizeof(mnvda));
>> >+	if (err) {
>> >+		NL_SET_ERR_MSG_MOD(extack,
>> >+				   "Failed to read sw_accelerate_conf mnvda reg");
>>
>> Plug in the err, NL_SET_ERR_MSG_FMT_MOD(.., .., err);
>> other locations as well.
>
>Incorrect. extack should basically be passed to perror()
>IOW user space will add strerror(errno) after, anyway.
>Adding the errno inside the string is pointless and ugly.

ernno set by stack. err set by driver. we can't assume err will propagate
to errno, this is up to the stack.

And not at all ugly, very useful debug hint to the user, unless you
guarantee err == errno.