]> git.ipfire.org Git - thirdparty/linux.git/commit
net/mlx5: implement swp_l4_csum_mode via devlink params
authorDaniel Zahka <daniel.zahka@gmail.com>
Wed, 19 Nov 2025 02:50:34 +0000 (18:50 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 21 Nov 2025 03:01:22 +0000 (19:01 -0800)
commitb11d358bf8c306b18a86322d0d8d2549e971be97
tree6664f03f2786dbc2ede0e0dbaeaeef1313a5318c
parent2a367002ed321e884276c3d7232a362ddd1bf7d6
net/mlx5: implement swp_l4_csum_mode via devlink params

swp_l4_csum_mode controls how L4 transmit checksums are computed when
using Software Parser (SWP) hints for header locations.

Supported values:
  1. default: device will choose between full_csum or l4_only. Driver
     will discover the device's choice during initialization.
  2. full_csum: calculate L4 checksum with the pseudo-header.
  3. l4_only: calculate L4 checksum without the pseudo-header. Only
     available when swp_l4_csum_mode_l4_only is set in
     mlx5_ifc_nv_sw_offload_cap_bits.

Note that 'default' might be returned from the device and passed to
userspace, and it might also be set during a
devlink_param::reset_default() call, but attempts to set a value of
default directly with param-set will be rejected.

The l4_only setting is a dependency for PSP initialization in
mlx5e_psp_init().

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20251119025038.651131-5-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/devlink/mlx5.rst
drivers/net/ethernet/mellanox/mlx5/core/devlink.h
drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c