]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net/mlx5e: Add hds-thresh query support via ethtool
authorNimrod Oren <noren@nvidia.com>
Tue, 17 Mar 2026 10:49:34 +0000 (12:49 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Mar 2026 00:57:17 +0000 (17:57 -0700)
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>
Reviewed-by: Joe Damato <joe@dama.to>
Link: https://patch.msgid.link/20260317104934.16124-1-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c

index 4a8dc85d5924cf3ecac05cede09d9b581fcad0dd..bb61e217907888a4e3c1ffd5aba99bfe727165b0 100644 (file)
@@ -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,