* [PATCH mptcp-next 0/2] Squash to "implement mptcp read_sock"
@ 2025-07-03 8:47 Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock" Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 2/2] Squash to "mptcp: set .splice_read" Geliang Tang
0 siblings, 2 replies; 5+ messages in thread
From: Geliang Tang @ 2025-07-03 8:47 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Two small cleanups for "implement mptcp read_sock" v5.
Based-on: <cover.1751093346.git.tanggeliang@kylinos.cn>
Geliang Tang (2):
Squash to "mptcp: implement .read_sock"
Squash to "mptcp: set .splice_read"
net/ipv4/tcp.c | 2 ++
net/mptcp/protocol.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
--
2.48.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock"
2025-07-03 8:47 [PATCH mptcp-next 0/2] Squash to "implement mptcp read_sock" Geliang Tang
@ 2025-07-03 8:47 ` Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 2/2] Squash to "mptcp: set .splice_read" Geliang Tang
1 sibling, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2025-07-03 8:47 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
No need to init copied to zero.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/protocol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 068ec724e081..924b4d5bd1af 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -3997,7 +3997,7 @@ static int mptcp_read_sock(struct sock *sk, read_descriptor_t *desc,
struct scm_timestamping_internal tss;
int flags = 0, cmsg_flags = 0;
size_t len = sk->sk_rcvbuf;
- int copied = 0;
+ int copied;
if (sk->sk_state == TCP_LISTEN)
return -ENOTCONN;
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH mptcp-next 2/2] Squash to "mptcp: set .splice_read"
2025-07-03 8:47 [PATCH mptcp-next 0/2] Squash to "implement mptcp read_sock" Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock" Geliang Tang
@ 2025-07-03 8:47 ` Geliang Tang
1 sibling, 0 replies; 5+ messages in thread
From: Geliang Tang @ 2025-07-03 8:47 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Add NULL pointer checks.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/ipv4/tcp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index a627e1ee5668..6fca35f3fd24 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -779,6 +779,8 @@ static int __tcp_splice_read(struct sock *sk, struct tcp_splice_state *tss)
.count = tss->len,
};
+ if (unlikely(!ops || !ops->read_sock))
+ return -ENOTSUPP;
return INDIRECT_CALL_INET_1(ops->read_sock, tcp_read_sock,
sk, &rd_desc, tcp_splice_data_recv);
}
--
2.48.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH mptcp-next 0/2] squash to "implement mptcp read_sock"
@ 2025-06-11 9:24 Geliang Tang
2025-06-11 10:44 ` MPTCP CI
0 siblings, 1 reply; 5+ messages in thread
From: Geliang Tang @ 2025-06-11 9:24 UTC (permalink / raw)
To: mptcp, hare; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Two squash-to patches for "implement mptcp read_sock" v2:
- Use sk->sk_rcvbuf instead of INT_MAX as the max len.
- Close all fds of mptcp_splice.c.
- Add splice io mode for mptcp_connect.
Based-on: <cover.1749286212.git.tanggeliang@kylinos.cn>
Geliang Tang (2):
Squash to "mptcp: implement .read_sock"
Squash to "selftests: mptcp: add splice test"
net/mptcp/protocol.c | 2 +-
.../selftests/net/mptcp/mptcp_connect.c | 61 ++++++++++++++++++-
.../selftests/net/mptcp/mptcp_connect.sh | 10 ++-
.../selftests/net/mptcp/mptcp_splice.c | 43 ++++++++-----
4 files changed, 99 insertions(+), 17 deletions(-)
--
2.43.0
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-03 8:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-03 8:47 [PATCH mptcp-next 0/2] Squash to "implement mptcp read_sock" Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 1/2] Squash to "mptcp: implement .read_sock" Geliang Tang
2025-07-03 8:47 ` [PATCH mptcp-next 2/2] Squash to "mptcp: set .splice_read" Geliang Tang
-- strict thread matches above, loose matches on Subject: below --
2025-06-11 9:24 [PATCH mptcp-next 0/2] squash to "implement mptcp read_sock" Geliang Tang
2025-06-11 10:44 ` MPTCP CI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.