[Linux-stm32] [PATCH net-next v2 2/2] net/mlx5: implement swp_l4_csum_mode via devlink params

Saeed Mahameed saeed at kernel.org
Sat Nov 8 05:38:32 UTC 2025


On 04 Nov 09:48, Daniel Zahka wrote:
>
>
>On 11/4/25 9:39 AM, Jiri Pirko wrote:
>>Tue, Nov 04, 2025 at 01:51:16PM +0100, daniel.zahka at gmail.com wrote:
>>>
>>>On 11/4/25 6:38 AM, Daniel Zahka wrote:
>>>>
>>>>On 11/4/25 5:14 AM, Jiri Pirko wrote:
>>>>>I did some research. 0/DEVICE_DEFAULT should not be ever reported back
>>>>>from FW. It's purpose is for user to reset to default FW configuration.
>>>>>What's the usecase for that? I think you could just avoid
>>>>>0/DEVICE_DEFAULT entirely, for both get and set.
>>>>I find that 0/DEVICE_DEFAULT is reported back on my device. I have
>>>>observed this same behavior when using the mstconfig tool for setting the
>>>>parameter too.
>>>e.g.
>>>$ dmesg | grep -i mlx | grep -i firmware
>>>[   10.165767] mlx5_core 0000:01:00.0: firmware version: 28.46.1006
>>>
>>>$ ./mstconfig -d 01:00.0 -b ./mlxconfig_host.db query SWP_L4_CHECKSUM_MODE
>>>
>>>Device #1:
>>>----------
>>>
>>>Device type:        ConnectX7
>>>Name:               CX71143DMC-CDAE_FB_Ax
>>>Description:        ConnectX-7 Ethernet adapter card; 100 GbE OCP3.0;
>>>Single-port QSFP; Multi Host; 2 Host; PCIe 4.0 x16; Crypto and Secure Boot
>>>Device:             01:00.0
>>>
>>>Configurations:                                          Next Boot
>>>         SWP_L4_CHECKSUM_MODE DEVICE_DEFAULT(0)
>>This is next-boot value. You should query current (--enable_verbosity)
>>to show in param get.
>
>I am still seeing that DEVICE_DEFAULT(0) is read back:
>
>$ ./mstconfig --enable_verbosity -d 01:00.0 -b ./mlxconfig_host.db 
>query SWP_L4_CHECKSUM_MODE
>
>Device #1:
>----------
>
>Device type:        ConnectX7
>Name:               CX71143DMC-CDAE_FB_Ax
>Description:        ConnectX-7 Ethernet adapter card; 100 GbE OCP3.0; 
>Single-port QSFP; Multi Host; 2 Host; PCIe 4.0 x16; Crypto and Secure 
>Boot
>Device:             01:00.0
>
>Configurations:                  Default             Current       Next Boot
>        SWP_L4_CHECKSUM_MODE DEVICE_DEFAULT(0) DEVICE_DEFAULT(0)    
>DEVICE_DEFAULT(0)
>

When default value of nvconfig is managed by FW, 0 will always mean
DEVICE_DEFAULT, and it is a way for the driver to reset back to default on
write, but on read FW should never return it, so this is a FW bug.

But this shouldn't block this series so just return 'default', from the 
driver perspective we should return 'default' when we know 0 means that.




More information about the Linux-stm32 mailing list