diff mbox series

[net-next,v6,1/2] tls: wait for receiving next skb for sk_redirect

Message ID 3101675d11beac0ffe16a86877f7f0c5166605f6.1718096691.git.tanggeliang@kylinos.cn (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series Add F_SETFL for fcntl in test_sockmap | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 850 this patch: 850
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 854 this patch: 854
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 854 this patch: 854
netdev/checkpatch warning WARNING: line length of 89 exceeds 80 columns WARNING: line length of 92 exceeds 80 columns
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-06-11--12-00 (tests: 643)

Commit Message

Geliang Tang June 11, 2024, 9:13 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

tls_sw_recvmsg() doesn't work in nonblock mode, it returns -EAGAIN in
that case. This patch fixes it, always wait for receiving the next skb
for sk_redirect.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/tls/tls_sw.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jakub Kicinski June 12, 2024, 2:17 a.m. UTC | #1
On Tue, 11 Jun 2024 17:13:34 +0800 Geliang Tang wrote:
> tls_sw_recvmsg() doesn't work in nonblock mode, it returns -EAGAIN in
> that case. This patch fixes it, always wait for receiving the next skb
> for sk_redirect.

Is this commit message basically saying "block in nonblock mode" or am
I missing something? Either way you have to at least improve the commit
message..
diff mbox series

Patch

diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 305a412785f5..d2558856ceeb 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -2099,6 +2099,8 @@  int tls_sw_recvmsg(struct sock *sk,
 					rxm->full_len = 0;
 					if (err == __SK_DROP)
 						consume_skb(skb);
+					if (err == __SK_REDIRECT && flags & MSG_DONTWAIT)
+						tls_rx_rec_wait(sk, psock, false, released);
 					continue;
 				}
 			}