lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA3PR11MB89866089785E69139A5D12EDE5D6A@IA3PR11MB8986.namprd11.prod.outlook.com>
Date: Tue, 18 Nov 2025 07:18:36 +0000
From: "Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
To: Daniel Zahka <daniel.zahka@...il.com>, Jiri Pirko <jiri@...nulli.us>,
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Simon
 Horman" <horms@...nel.org>, Jonathan Corbet <corbet@....net>, Srujana Challa
	<schalla@...vell.com>, Bharat Bhushan <bbhushan2@...vell.com>, Herbert Xu
	<herbert@...dor.apana.org.au>, Brett Creeley <brett.creeley@....com>, "Andrew
 Lunn" <andrew+netdev@...n.ch>, Michael Chan <michael.chan@...adcom.com>,
	Pavan Chebbi <pavan.chebbi@...adcom.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, "Goutham, Sunil Kovvuri"
	<sgoutham@...vell.com>, Linu Cherian <lcherian@...vell.com>, Geetha sowjanya
	<gakula@...vell.com>, Jerin Jacob <jerinj@...vell.com>, hariprasad
	<hkelam@...vell.com>, Subbaraya Sundeep <sbhatta@...vell.com>, Tariq Toukan
	<tariqt@...dia.com>, Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky
	<leon@...nel.org>, Mark Bloch <mbloch@...dia.com>, Ido Schimmel
	<idosch@...dia.com>, Petr Machata <petrm@...dia.com>, Manish Chopra
	<manishc@...vell.com>, Maxime Coquelin <mcoquelin.stm32@...il.com>, Alexandre
 Torgue <alexandre.torgue@...s.st.com>, Siddharth Vadapalli
	<s-vadapalli@...com>, Roger Quadros <rogerq@...nel.org>, Loic Poulain
	<loic.poulain@....qualcomm.com>, Sergey Ryazanov <ryazanov.s.a@...il.com>,
	Johannes Berg <johannes@...solutions.net>, Vladimir Oltean
	<olteanv@...il.com>, Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>,
	"Ertman, David M" <david.m.ertman@...el.com>, Vlad Dumitrescu
	<vdumitrescu@...dia.com>, "Russell King (Oracle)"
	<rmk+kernel@...linux.org.uk>, Alexander Sverdlin
	<alexander.sverdlin@...il.com>, Lorenzo Bianconi <lorenzo@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: RE: [PATCH net-next v4 4/6] net/mlx5: implement swp_l4_csum_mode via
 devlink params



> -----Original Message-----
> From: Daniel Zahka <daniel.zahka@...il.com>
> Sent: Tuesday, November 18, 2025 1:25 AM
> To: Jiri Pirko <jiri@...nulli.us>; David S. Miller
> <davem@...emloft.net>; Eric Dumazet <edumazet@...gle.com>; Jakub
> Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; Simon
> Horman <horms@...nel.org>; Jonathan Corbet <corbet@....net>; Srujana
> Challa <schalla@...vell.com>; Bharat Bhushan <bbhushan2@...vell.com>;
> Herbert Xu <herbert@...dor.apana.org.au>; Brett Creeley
> <brett.creeley@....com>; Andrew Lunn <andrew+netdev@...n.ch>; Michael
> Chan <michael.chan@...adcom.com>; Pavan Chebbi
> <pavan.chebbi@...adcom.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@...el.com>; Goutham, Sunil Kovvuri
> <sgoutham@...vell.com>; Linu Cherian <lcherian@...vell.com>; Geetha
> sowjanya <gakula@...vell.com>; Jerin Jacob <jerinj@...vell.com>;
> hariprasad <hkelam@...vell.com>; Subbaraya Sundeep
> <sbhatta@...vell.com>; Tariq Toukan <tariqt@...dia.com>; Saeed
> Mahameed <saeedm@...dia.com>; Leon Romanovsky <leon@...nel.org>; Mark
> Bloch <mbloch@...dia.com>; Ido Schimmel <idosch@...dia.com>; Petr
> Machata <petrm@...dia.com>; Manish Chopra <manishc@...vell.com>;
> Maxime Coquelin <mcoquelin.stm32@...il.com>; Alexandre Torgue
> <alexandre.torgue@...s.st.com>; Siddharth Vadapalli <s-
> vadapalli@...com>; Roger Quadros <rogerq@...nel.org>; Loic Poulain
> <loic.poulain@....qualcomm.com>; Sergey Ryazanov
> <ryazanov.s.a@...il.com>; Johannes Berg <johannes@...solutions.net>;
> Vladimir Oltean <olteanv@...il.com>; Michal Swiatkowski
> <michal.swiatkowski@...ux.intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov@...el.com>; Ertman, David M
> <david.m.ertman@...el.com>; Vlad Dumitrescu <vdumitrescu@...dia.com>;
> Russell King (Oracle) <rmk+kernel@...linux.org.uk>; Alexander Sverdlin
> <alexander.sverdlin@...il.com>; Lorenzo Bianconi <lorenzo@...nel.org>
> Cc: netdev@...r.kernel.org; linux-doc@...r.kernel.org; linux-
> rdma@...r.kernel.org
> Subject: [PATCH net-next v4 4/6] 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().
> 
> Signed-off-by: Daniel Zahka <daniel.zahka@...il.com>
> ---
> 
> Notes:
>     v4:
>     - rename device_default to default
>     - implement get_default and reset_default handlers
>     - don't allow user to request "default" in set cmd
>     v2:
>     - use extack in mlx5_nv_param_devlink_swp_l4_csum_mode_get()
>     - fix indentation issue in mlx5.rst entry
> 
>  Documentation/networking/devlink/mlx5.rst     |  14 ++
>  .../net/ethernet/mellanox/mlx5/core/devlink.h |   3 +-
>  .../mellanox/mlx5/core/lib/nv_param.c         | 229
> ++++++++++++++++++
>  3 files changed, 245 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/networking/devlink/mlx5.rst
> b/Documentation/networking/devlink/mlx5.rst
> index 0e5f9c76e514..4bba4d780a4a 100644
> --- a/Documentation/networking/devlink/mlx5.rst
> +++ b/Documentation/networking/devlink/mlx5.rst
> @@ -218,6 +218,20 @@ parameters.
>         * ``balanced`` : Merges fewer CQEs, resulting in a moderate
> compression ratio but maintaining a balance between bandwidth savings
> and performance
>         * ``aggressive`` : Merges more CQEs into a single entry,
> achieving a higher compression rate and maximizing performance,
> particularly under high traffic loads
> 
> +   * - ``swp_l4_csum_mode``
> +     - string
> +     - permanent
> +     - Configure how the L4 checksum is calculated by the device when
> using
> +       Software Parser (SWP) hints for header locations.
> +
> +       * ``default`` : Use the device's default checksum calculation
> +         mode. The driver will discover during init whether or
> +         full_csum or l4_only is in use. Setting this value
> explicitly
> +         from userspace is not allowed, but some firmware versions
> may
> +         return this value on param read.
> +       * ``full_csum`` : Calculate full checksum including the
> pseudo-header
> +       * ``l4_only`` : Calculate L4-only checksum, excluding the
> + pseudo-header
> +
>  The ``mlx5`` driver supports reloading via ``DEVLINK_CMD_RELOAD``
> 
>  Info versions
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
> b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
> index c9555119a661..43b9bf8829cf 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h
> @@ -26,7 +26,8 @@ enum mlx5_devlink_param_id {

...

> --
> 2.47.3


Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ