Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5e: advertise tcp-data-split support
@ 2026-09-23 23:05 Dimitri Daskalakis
  2026-09-27 23:21 ` netdev-bot+sashiko
  0 siblings, 1 reply; 3+ messages in thread
From: Dimitri Daskalakis @ 2026-09-23 23:05 UTC (permalink / raw)
  To: David S . Miller
  Cc: Saeed Mahameed, Tariq Toukan, Mark Bloch, Leon Romanovsky,
	Andrew Lunn, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Gal Pressman, Cosmin Ratiu, Dragos Tatulea, Nimrod Oren,
	Carolina Jubran, netdev

From: Dimitri Daskalakis <daskald@meta.com>

The ability to set tcp-data-split was introduced in
commit 46bcce5dfd33 ("net/mlx5e: Support ethtool tcp-data-split settings")
This commit dropped reporting from mlx5e_ethtool_get_ringparam()
without explaining why.

commit d347b28c492e ("net/mlx5e: Add hds-thresh query support via ethtool")
added support for ETHTOOL_RING_USE_HDS_THRS, and modified
mlx5e_ethtool_get_ringparam() to report an hds_thresh of 0.

Between these two commits, hds._defer_reset_hds would skip the reset because
neither hds-thresh or tcp-data-split was present in the ring config. After the
second commit this introduced a KeyError in the hds.set_hds_enable/disable
tests.

Re-adding the feature advertisement fixes the self test.

Signed-off-by: Dimitri Daskalakis <daskald@meta.com>
---
Before:
 # Interface: eth0, driver: mlx5_core
 TAP version 13
 1..13
 ok 1 hds.get_hds # SKIP tcp-data-split not supported by device
 ok 2 hds.get_hds_thresh
 # Exception while handling defer / cleanup (callback 1 of 1)!
 ...
 # Defer Exception| KeyError: 'tcp-data-split'
 # Defer Exception|
 not ok 3 hds.set_hds_disable
 # Exception while handling defer / cleanup (callback 1 of 1)!
 ...
 # Defer Exception| KeyError: 'tcp-data-split'
 # Defer Exception|
 not ok 4 hds.set_hds_enable
 ok 5 hds.set_hds_thresh_random # SKIP hds-thresh-max is too small
 ok 6 hds.set_hds_thresh_zero
 ok 7 hds.set_hds_thresh_max
 ok 8 hds.set_hds_thresh_gt
 ok 9 hds.set_xdp # SKIP tcp-data-split not supported by device
 ok 10 hds.enabled_set_xdp # SKIP tcp-data-split not supported by device
 ok 11 hds.ioctl # SKIP tcp-data-split not supported by device
 ok 12 hds.ioctl_set_xdp # SKIP tcp-data-split not supported by device
 ok 13 hds.ioctl_enabled_set_xdp # SKIP tcp-data-split not supported by device

After:
 # Interface: eth0, driver: mlx5_core
 TAP version 13
 1..13
 ok 1 hds.get_hds
 ok 2 hds.get_hds_thresh
 ok 3 hds.set_hds_disable
 ok 4 hds.set_hds_enable # SKIP disabling of HDS not supported by the device
 ok 5 hds.set_hds_thresh_random # SKIP hds-thresh-max is too small
 ok 6 hds.set_hds_thresh_zero
 ok 7 hds.set_hds_thresh_max
 ok 8 hds.set_hds_thresh_gt
 ok 9 hds.set_xdp
 ...
 # Exception| net.lib.ynl.pyynl.lib.ynl.NlError: Netlink error: mlx5_core: TCP-data-split is not supported when GRO HW is disabled: Invalid argument
 # Exception|
 not ok 10 hds.enabled_set_xdp
 ok 11 hds.ioctl
 ok 12 hds.ioctl_set_xdp
 ...
 # Exception| net.lib.ynl.pyynl.lib.ynl.NlError: Netlink error: mlx5_core: TCP-data-split is not supported when GRO HW is disabled: Invalid argument
 # Exception|
 not ok 13 hds.ioctl_enabled_set_xdp
 # Totals: pass:9 fail:2 xfail:0 xpass:0 skip:2 error:0

---
 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 261c466a4d36..62060a6fa185 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -378,6 +378,11 @@ void mlx5e_ethtool_get_ringparam(struct mlx5e_priv *priv,
 
 	kernel_param->hds_thresh = 0;
 	kernel_param->hds_thresh_max = 0;
+
+	kernel_param->tcp_data_split =
+		(priv->channels.params.packet_merge.type == MLX5E_PACKET_MERGE_SHAMPO) ?
+		ETHTOOL_TCP_DATA_SPLIT_ENABLED :
+		ETHTOOL_TCP_DATA_SPLIT_DISABLED;
 }
 
 static void mlx5e_get_ringparam(struct net_device *dev,
-- 
2.52.0


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

end of thread, other threads:[~2026-09-30 18:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 23:05 [PATCH net-next] net/mlx5e: advertise tcp-data-split support Dimitri Daskalakis
2026-09-27 23:21 ` netdev-bot+sashiko
2026-09-30 18:56   ` Dimitri Daskalakis

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