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]
Message-Id: <20250702104249.1665034-1-ap420073@gmail.com>
Date: Wed,  2 Jul 2025 10:42:49 +0000
From: Taehee Yoo <ap420073@...il.com>
To: davem@...emloft.net,
	kuba@...nel.org,
	pabeni@...hat.com,
	edumazet@...gle.com,
	andrew+netdev@...n.ch,
	shuah@...nel.org,
	almasrymina@...gle.com,
	sdf@...ichev.me,
	jdamato@...tly.com,
	netdev@...r.kernel.org,
	linux-kselftest@...r.kernel.org
Cc: ap420073@...il.com
Subject: [PATCH v2 net-next] selftests: devmem: configure HDS threshold

The devmem TCP requires the hds-thresh value to be 0, but it doesn't
change it automatically.
Therefore, make configure_headersplit() sets hds-thresh value to 0.

Signed-off-by: Taehee Yoo <ap420073@...il.com>
---

v2:
 - Do not implement configure_hds_thresh().
 - Make configure_headersplit() sets hds-thresh to 0.

 tools/testing/selftests/drivers/net/hw/ncdevmem.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c
index cc9b40d9c5d5..52b72de11e3b 100644
--- a/tools/testing/selftests/drivers/net/hw/ncdevmem.c
+++ b/tools/testing/selftests/drivers/net/hw/ncdevmem.c
@@ -331,6 +331,12 @@ static int configure_headersplit(bool on)
 	ret = ethtool_rings_set(ys, req);
 	if (ret < 0)
 		fprintf(stderr, "YNL failed: %s\n", ys->err.msg);
+	if (on) {
+		ethtool_rings_set_req_set_hds_thresh(req, 0);
+		ret = ethtool_rings_set(ys, req);
+		if (ret < 0)
+			fprintf(stderr, "YNL failed: %s\n", ys->err.msg);
+	}
 	ethtool_rings_set_req_free(req);
 
 	if (ret == 0) {
@@ -338,9 +344,12 @@ static int configure_headersplit(bool on)
 		ethtool_rings_get_req_set_header_dev_index(get_req, ifindex);
 		get_rsp = ethtool_rings_get(ys, get_req);
 		ethtool_rings_get_req_free(get_req);
-		if (get_rsp)
+		if (get_rsp) {
 			fprintf(stderr, "TCP header split: %s\n",
 				tcp_data_split_str(get_rsp->tcp_data_split));
+			fprintf(stderr, "HDS threshold: %u\n",
+				get_rsp->hds_thresh);
+		}
 		ethtool_rings_get_rsp_free(get_rsp);
 	}
 
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ