[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Sc9E2oKba+C2EhBvmyJQ5wVS5=S=ZVzP+Gt_-xsRNtMCm4tQ@mail.gmail.com>
Date: Fri, 21 Jun 2024 12:05:45 +0100
From: Michio Honda <micchie.gml@...il.com>
To: netdev@...r.kernel.org
Subject: [PATCH net-next] tls: support send/recv queue read in the repair mode
>From df3350858eda825014ac75dced0cede9de4de302 Mon Sep 17 00:00:00 2001
From: Michio Honda <michio.honda@...ac.uk>
Date: Thu, 20 Jun 2024 22:05:15 +0100
Subject: [PATCH net-next] tls: support send/recv queue read in the repair mode
TCP REPAIR needs to read the data in the send or receive queue.
This patch forwards those to TCP.
Signed-off-by: Michio Honda <michio.honda@...ac.uk>
---
net/tls/tls_sw.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 305a412785f5..25b239a9b748 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -1973,6 +1973,14 @@ int tls_sw_recvmsg(struct sock *sk,
bool bpf_strp_enabled;
bool zc_capable;
+ struct tcp_sock *tp = tcp_sk(sk);
+
+ if (unlikely(tp->repair)) {
+ if (tp->repair_queue == TCP_SEND_QUEUE ||
+ tp->repair_queue == TCP_RECV_QUEUE)
+ return tcp_recvmsg(sk, msg, len, flags, addr_len);
+ }
+
if (unlikely(flags & MSG_ERRQUEUE))
return sock_recv_errqueue(sk, msg, len, SOL_IP, IP_RECVERR);
--
2.34.1
Powered by blists - more mailing lists