From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Gang Yan <yangang@kylinos.cn>
Subject: Re: [RFC mptcp-next v5 7/8] mptcp: fix the mptcp_check_readable
Date: Tue, 23 Dec 2025 17:39:39 +0100 [thread overview]
Message-ID: <228f0676-b4cb-43f5-b4e7-198b06251dc1@kernel.org> (raw)
In-Reply-To: <814297ff30d16e51ac7c126255ef26dbfdc1ca10.1766372799.git.tanggeliang@kylinos.cn>
Hi Geliang, Gang,
On 22/12/2025 04:15, Geliang Tang wrote:
> From: Gang Yan <yangang@kylinos.cn>
>
> 'mptcp_check_readble' is corresponding to the 'tcp_stream_is_readable',
> but the later one will call the 'sk_is_readble' ->
> 'prot->sock_is_readable(sk)' -> 'tls_sw_sock_is_readable'.
>
> If not apply this patch, it will cause an error in 'poll_wait_split'
> test when running tls_test in mptcp mode.
Which error?
It might be better to move this before patch 2 and mention that this is
to aligned with TCP, and will be used in the case of KTLS, because
'prot' will be modified, tls_sw_sock_is_readable is expected to be
called from prot->sock_is_readable(), etc.
>
> Signed-off-by: Gang Yan <yangang@kylinos.cn>
> ---
> net/mptcp/protocol.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index bdf53e4b3f7e..8363d89d3a13 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -3260,7 +3260,9 @@ void __mptcp_unaccepted_force_close(struct sock *sk)
>
> static __poll_t mptcp_check_readable(struct sock *sk)
Might be good to add a comment to say that it is similar to
tcp_stream_is_readable()
While at it, maybe rename it to mptcp_stream_is_readable() so it is
aligned with TCP?
> {
> - return mptcp_epollin_ready(sk) ? EPOLLIN | EPOLLRDNORM : 0;
> + if (mptcp_epollin_ready(sk))
> + return true;
> + return sk_is_readable(sk);
> }
>
> static void mptcp_check_listen_stop(struct sock *sk)
> @@ -4322,7 +4324,8 @@ static __poll_t mptcp_poll(struct file *file, struct socket *sock,
> mask |= EPOLLIN | EPOLLRDNORM | EPOLLRDHUP;
>
> if (state != TCP_SYN_SENT && state != TCP_SYN_RECV) {
> - mask |= mptcp_check_readable(sk);
> + if (mptcp_check_readable(sk))
> + mask |= EPOLLIN | EPOLLRDNORM;
> if (shutdown & SEND_SHUTDOWN)
> mask |= EPOLLOUT | EPOLLWRNORM;
> else
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2025-12-23 16:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-22 3:15 [RFC mptcp-next v5 0/8] MPTCP KTLS support Geliang Tang
2025-12-22 3:15 ` [RFC mptcp-next v5 1/8] tls: introduce struct tls_prot_ops Geliang Tang
2025-12-23 16:36 ` Matthieu Baerts
2025-12-22 3:15 ` [RFC mptcp-next v5 2/8] mptcp: implement tls_mptcp_ops Geliang Tang
2025-12-22 3:15 ` [RFC mptcp-next v5 3/8] mptcp: update ULP getsockopt Geliang Tang
2025-12-23 16:36 ` Matthieu Baerts
2025-12-22 3:15 ` [RFC mptcp-next v5 4/8] mptcp: enable TLS setsockopt Geliang Tang
2025-12-23 16:37 ` Matthieu Baerts
2025-12-22 3:15 ` [RFC mptcp-next v5 5/8] selftests: mptcp: connect: update sock_test_tcpulp Geliang Tang
2025-12-23 16:38 ` Matthieu Baerts
2025-12-22 3:15 ` [RFC mptcp-next v5 6/8] selftests: mptcp: sockopt: implement MPTCP KTLS tests Geliang Tang
2025-12-23 16:38 ` Matthieu Baerts
2025-12-22 3:15 ` [RFC mptcp-next v5 7/8] mptcp: fix the mptcp_check_readable Geliang Tang
2025-12-23 16:39 ` Matthieu Baerts [this message]
2025-12-22 3:15 ` [RFC mptcp-next v5 8/8] selftests: tls: add a '--mptcp' test mode Geliang Tang
2025-12-23 16:39 ` Matthieu Baerts
2025-12-23 16:35 ` [RFC mptcp-next v5 0/8] MPTCP KTLS support Matthieu Baerts
2026-01-04 9:52 ` Geliang Tang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=228f0676-b4cb-43f5-b4e7-198b06251dc1@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=yangang@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox