Skip to contentSkip to conversation

ethtool: rings: report TCP header-data split

PATCH Applied Jakub Kicinski 2 participants 2 messages Nov 30, 2022 – Dec 4, 2022

Subsystems (2)
lore
Share & tools
lore

Jakub Kicinski

author maintainer
#0 lore raw

PATCH 1/1 ethtool: rings: report TCP header-data split

Report if device is in HDS compatible mode or not.

---
 netlink/rings.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
netlink/rings.c +19 -0
index d50bbac47701..628403520f4a 100644
@@ -20,6 +20,7 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
 	const struct nlattr *tb[ETHTOOL_A_RINGS_MAX + 1] = {};
 	DECLARE_ATTR_TB_INFO(tb);
 	struct nl_context *nlctx = data;
+	unsigned char tcp_hds;
 	bool silent;
 	int err_ret;
 	int ret;
@@ -50,6 +51,24 @@ int rings_reply_cb(const struct nlmsghdr *nlhdr, void *data)
 	show_u32(tb[ETHTOOL_A_RINGS_CQE_SIZE], "CQE Size:\t\t");
 	show_bool("tx-push", "TX Push:\t%s\n", tb[ETHTOOL_A_RINGS_TX_PUSH]);
 
+	tcp_hds = tb[ETHTOOL_A_RINGS_TCP_DATA_SPLIT] ?
+		mnl_attr_get_u8(tb[ETHTOOL_A_RINGS_TCP_DATA_SPLIT]) : 0;
+	printf("TCP data split:\t");
+	switch (tcp_hds) {
+	case ETHTOOL_TCP_DATA_SPLIT_UNKNOWN:
+		printf("n/a\n");
+		break;
+	case ETHTOOL_TCP_DATA_SPLIT_DISABLED:
+		printf("off\n");
+		break;
+	case ETHTOOL_TCP_DATA_SPLIT_ENABLED:
+		printf("on\n");
+		break;
+	default:
+		printf("unknown(%d)\n", tcp_hds);
+		break;
+	}
+
 	return MNL_CB_OK;
 }
 
Signature · 1 line
2.38.1
#1 lore raw
This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Hello:

This patch was applied to ethtool/ethtool.git (master) by Michal Kubecek <[email protected]>:

Quoted 6 lines · On Tue, 29 Nov 2022 17:35:57 -0800 you wrote:

Report if device is in HDS compatible mode or not.

---
 netlink/rings.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

Here is the summary with links:
- [ethtool-next] ethtool: rings: report TCP header-data split
https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/?id=3acf7eee7ade

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html