lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 29 Nov 2022 17:35:57 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     mkubecek@...e.cz
Cc:     netdev@...r.kernel.org, Jakub Kicinski <kuba@...nel.org>
Subject: [PATCH ethtool-next] ethtool: rings: report TCP header-data split

Report if device is in HDS compatible mode or not.

Signed-off-by: Jakub Kicinski <kuba@...nel.org>
---
 netlink/rings.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/netlink/rings.c b/netlink/rings.c
index d50bbac47701..628403520f4a 100644
--- a/netlink/rings.c
+++ b/netlink/rings.c
@@ -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;
 }
 
-- 
2.38.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ