public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool
@ 2026-03-17 10:49 Tariq Toukan
  2026-03-18 20:11 ` Joe Damato
  2026-03-19  1:30 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Tariq Toukan @ 2026-03-17 10:49 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Saeed Mahameed, Tariq Toukan, Mark Bloch, Leon Romanovsky, netdev,
	linux-rdma, linux-kernel, Gal Pressman, Moshe Shemesh,
	Nimrod Oren, Carolina Jubran, Dragos Tatulea

From: Nimrod Oren <noren@nvidia.com>

Add support for reporting HDS (Header-Data Split) threshold via
ethtool. When applicable, mlx5 hardware splits packets of all sizes with
no configurable threshold, so report both hds-thresh and hds-thresh-max
as 0 (i.e. always split regardless of size).

Signed-off-by: Nimrod Oren <noren@nvidia.com>
Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 4a8dc85d5924..bb61e2179078 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -371,6 +371,9 @@ void mlx5e_ethtool_get_ringparam(struct mlx5e_priv *priv,
 	param->tx_max_pending = 1 << MLX5E_PARAMS_MAXIMUM_LOG_SQ_SIZE;
 	param->rx_pending     = 1 << priv->channels.params.log_rq_mtu_frames;
 	param->tx_pending     = 1 << priv->channels.params.log_sq_size;
+
+	kernel_param->hds_thresh = 0;
+	kernel_param->hds_thresh_max = 0;
 }
 
 static void mlx5e_get_ringparam(struct net_device *dev,
@@ -2735,7 +2738,8 @@ const struct ethtool_ops mlx5e_ethtool_ops = {
 				     ETHTOOL_COALESCE_USE_ADAPTIVE |
 				     ETHTOOL_COALESCE_USE_CQE,
 	.supported_input_xfrm = RXH_XFRM_SYM_OR_XOR,
-	.supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT,
+	.supported_ring_params = ETHTOOL_RING_USE_TCP_DATA_SPLIT |
+				 ETHTOOL_RING_USE_HDS_THRS,
 	.get_drvinfo       = mlx5e_get_drvinfo,
 	.get_link          = ethtool_op_get_link,
 	.get_link_ext_state  = mlx5e_get_link_ext_state,

base-commit: 348baefbb635cbb448e154f38c93657d4cf23936
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool
  2026-03-17 10:49 [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool Tariq Toukan
@ 2026-03-18 20:11 ` Joe Damato
  2026-03-19  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Damato @ 2026-03-18 20:11 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller, Saeed Mahameed, Mark Bloch, Leon Romanovsky,
	netdev, linux-rdma, linux-kernel, Gal Pressman, Moshe Shemesh,
	Nimrod Oren, Carolina Jubran, Dragos Tatulea

On Tue, Mar 17, 2026 at 12:49:34PM +0200, Tariq Toukan wrote:
> From: Nimrod Oren <noren@nvidia.com>
> 
> Add support for reporting HDS (Header-Data Split) threshold via
> ethtool. When applicable, mlx5 hardware splits packets of all sizes with
> no configurable threshold, so report both hds-thresh and hds-thresh-max
> as 0 (i.e. always split regardless of size).
> 
> Signed-off-by: Nimrod Oren <noren@nvidia.com>
> Reviewed-by: Carolina Jubran <cjubran@nvidia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index 4a8dc85d5924..bb61e2179078 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -371,6 +371,9 @@ void mlx5e_ethtool_get_ringparam(struct mlx5e_priv *priv,
>  	param->tx_max_pending = 1 << MLX5E_PARAMS_MAXIMUM_LOG_SQ_SIZE;
>  	param->rx_pending     = 1 << priv->channels.params.log_rq_mtu_frames;
>  	param->tx_pending     = 1 << priv->channels.params.log_sq_size;
> +
> +	kernel_param->hds_thresh = 0;

I think this is populated by the core before the call to get_ringparam and it
looks like it is defaulted to 0, so I think this assignment is unnecessary.

But everything else seems fine, so:

Reviewed-by: Joe Damato <joe@dama.to>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool
  2026-03-17 10:49 [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool Tariq Toukan
  2026-03-18 20:11 ` Joe Damato
@ 2026-03-19  1:30 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-19  1:30 UTC (permalink / raw)
  To: Tariq Toukan
  Cc: edumazet, kuba, pabeni, andrew+netdev, davem, saeedm, mbloch,
	leon, netdev, linux-rdma, linux-kernel, gal, moshe, noren,
	cjubran, dtatulea

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue, 17 Mar 2026 12:49:34 +0200 you wrote:
> From: Nimrod Oren <noren@nvidia.com>
> 
> Add support for reporting HDS (Header-Data Split) threshold via
> ethtool. When applicable, mlx5 hardware splits packets of all sizes with
> no configurable threshold, so report both hds-thresh and hds-thresh-max
> as 0 (i.e. always split regardless of size).
> 
> [...]

Here is the summary with links:
  - [net-next] net/mlx5e: Add hds-thresh query support via ethtool
    https://git.kernel.org/netdev/net-next/c/d347b28c492e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-19  1:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 10:49 [PATCH net-next] net/mlx5e: Add hds-thresh query support via ethtool Tariq Toukan
2026-03-18 20:11 ` Joe Damato
2026-03-19  1:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox