Skip to contentSkip to conversation

ethtool: add support for setting TCP data split

PATCH In review Alexander Lobakin 1 participant 2 messages Jan 9, 2024 – Jan 22, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethtool: add support for setting TCP data split

Add support for controlling header split (aka TCP data split) feature, backed by kernel commit 50d73710715d ("ethtool: add SET for TCP_DATA_SPLIT ringparam"). Command format:

ethtool -G|--set-ring devname tcp-data-split [ auto|on|off ]

"auto" is defined solely by device's driver.

---
 ethtool.8.in    |  4 ++++
 ethtool.c       |  1 +
 netlink/rings.c | 23 +++++++++++++++++++++++
 3 files changed, 28 insertions(+)
ethtool.8.in +4 -0
index ef0c4bcabf37..dc7d4df4fcc1 100644
@@ -202,6 +202,7 @@ ethtool \- query or control network driver and hardware settings
 .BN rx\-jumbo
 .BN tx
 .BN rx\-buf\-len
+.B3 tcp\-data\-split auto on off
 .BN cqe\-size
 .BN tx\-push
 .BN rx\-push
@@ -629,6 +630,9 @@ Changes the number of ring entries for the Tx ring.
 .BI rx\-buf\-len \ N
 Changes the size of a buffer in the Rx ring.
 .TP
+.BI tcp\-data\-split \ auto|on|off
+Specifies the state of TCP data split.
+.TP
 .BI cqe\-size \ N
 Changes the size of completion queue event.
 .TP
ethtool.c +1 -0
index af51220b63cc..3ac15a7e54f6 100644
@@ -5748,6 +5748,7 @@ static const struct option args[] = {
 			  "		[ rx-jumbo N ]\n"
 			  "		[ tx N ]\n"
 			  "		[ rx-buf-len N ]\n"
+			  "		[ tcp-data-split auto|on|off ]\n"
 			  "		[ cqe-size N ]\n"
 			  "		[ tx-push on|off ]\n"
 			  "		[ rx-push on|off ]\n"
netlink/rings.c +23 -0
index 51d28c2ab055..f9eb67a4bc28 100644
@@ -116,6 +116,22 @@ int nl_gring(struct cmd_context *ctx)
 
 /* RINGS_SET */
 
+static const struct lookup_entry_u8 tcp_data_split_values[] = {
+	{
+		.arg		= "auto",
+		.val		= ETHTOOL_TCP_DATA_SPLIT_UNKNOWN,
+	},
+	{
+		.arg		= "off",
+		.val		= ETHTOOL_TCP_DATA_SPLIT_DISABLED,
+	},
+	{
+		.arg		= "on",
+		.val		= ETHTOOL_TCP_DATA_SPLIT_ENABLED,
+	},
+	{}
+};
+
 static const struct param_parser sring_params[] = {
 	{
 		.arg		= "rx",
@@ -153,6 +169,13 @@ static const struct param_parser sring_params[] = {
 		.handler        = nl_parse_direct_u32,
 		.min_argc       = 1,
 	},
+	{
+		.arg		= "tcp-data-split",
+		.type		= ETHTOOL_A_RINGS_TCP_DATA_SPLIT,
+		.handler	= nl_parse_lookup_u8,
+		.handler_data	= tcp_data_split_values,
+		.min_argc	= 1,
+	},
 	{
 		.arg            = "cqe-size",
 		.type           = ETHTOOL_A_RINGS_CQE_SIZE,
Signature · 1 line
2.43.0
#1 lore raw

From: Alexander Lobakin <[email protected]>
Date: Tue, 9 Jan 2024 16:55:30 +0100

Quoted 7 lines

Add support for controlling header split (aka TCP data split) feature, backed by kernel commit 50d73710715d ("ethtool: add SET for TCP_DATA_SPLIT ringparam"). Command format:

ethtool -G|--set-ring devname tcp-data-split [ auto|on|off ]

"auto" is defined solely by device's driver.

Ping?

Thanks,
Olek