netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next] selftests: devmem: configure HDS threshold
@ 2025-07-02 10:42 Taehee Yoo
  2025-07-02 15:37 ` Stanislav Fomichev
  2025-07-02 18:39 ` Jakub Kicinski
  0 siblings, 2 replies; 8+ messages in thread
From: Taehee Yoo @ 2025-07-02 10:42 UTC (permalink / raw)
  To: davem, kuba, pabeni, edumazet, andrew+netdev, shuah, almasrymina,
	sdf, jdamato, netdev, linux-kselftest
  Cc: ap420073

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@gmail.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


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

end of thread, other threads:[~2025-07-07 20:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-02 10:42 [PATCH v2 net-next] selftests: devmem: configure HDS threshold Taehee Yoo
2025-07-02 15:37 ` Stanislav Fomichev
2025-07-02 16:12   ` Taehee Yoo
2025-07-03 15:41     ` Stanislav Fomichev
2025-07-02 18:39 ` Jakub Kicinski
2025-07-03  3:51   ` Taehee Yoo
2025-07-07 18:48   ` Mina Almasry
2025-07-07 20:10     ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).