Thread (8 messages) 8 messages, 3 authors, 27d ago

Re: [PATCH net 2/2] selftests: drv-net: psp: test PSP and TCP ULP mutual exclusion

flat view

From: "Daniel Zahka" <daniel.zahka@gmail.com>
Date: 2026-09-11 10:57:12
Also in: linux-kselftest, lkml

On Thu Sep 10, 2026 at 7:46 PM EDT, Daniel Zahka wrote:
quoted hunk ↗ jump to hunk
Test both setting PSP after TLS ULP, and TLS ULP after PSP.

Add CONFIG_TLS=y to the drivers/net/config.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
---
 tools/testing/selftests/drivers/net/config |  1 +
 tools/testing/selftests/drivers/net/psp.py | 46 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
diff --git a/tools/testing/selftests/drivers/net/config b/tools/testing/selftests/drivers/net/config
index b6989c7d3d9d..4838adf27fa1 100644
--- a/tools/testing/selftests/drivers/net/config
+++ b/tools/testing/selftests/drivers/net/config
@@ -21,5 +21,6 @@ CONFIG_NET_SCH_INGRESS=y
 CONFIG_NET_SCH_PRIO=m
 CONFIG_PPP=y
 CONFIG_PPPOE=y
+CONFIG_TLS=y
 CONFIG_VLAN_8021Q=m
 CONFIG_XDP_SOCKETS=y
diff --git a/tools/testing/selftests/drivers/net/psp.py b/tools/testing/selftests/drivers/net/psp.py
index 315648a770d0..12b27f2a3fa1 100755
--- a/tools/testing/selftests/drivers/net/psp.py
+++ b/tools/testing/selftests/drivers/net/psp.py
@@ -23,6 +23,8 @@ from lib.py import NetNSEnter
 from lib.py import bkg, rand_port, wait_port_listen
 from lib.py import ip
 
+TCP_ULP = 31
+
 
 def _get_outq(s):
     one = b'\0' * 4
@@ -333,6 +335,50 @@ def assoc_version_mismatch(cfg):
             ksft_eq(the_exception.nl_msg.error, -errno.EINVAL)
 
 
+def _require_tls_ulp():
+    with socket.create_server(("localhost", 0)) as srv:
+        with socket.create_connection(srv.getsockname()) as s:
ruff is complaining about the nested 'with' statements. I ran ruff
locally via nipa, but did not get the same result. It seems nipa doesn't
use a ruff config file, and the discrepancy is because I have a
different ruff version. I was able to reproduce by upgrading the
version.
quoted hunk ↗ jump to hunk
+            try:
+                s.setsockopt(socket.SOL_TCP, TCP_ULP, b"tls")
+            except OSError as exc:
+                raise KsftSkipEx("kTLS not available") from exc
+
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help