From: Geliang Tang <geliang@kernel.org>
To: Matthieu Baerts <matttbe@kernel.org>
Cc: Geliang Tang <tanggeliang@kylinos.cn>,
Hannes Reinecke <hare@kernel.org>,
mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v15 2/6] mptcp: implement .read_sock
Date: Fri, 12 Dec 2025 17:11:24 +0800 [thread overview]
Message-ID: <0840d15cd328e59d8d12dbd54224488f8f44813b.camel@kernel.org> (raw)
In-Reply-To: <a3838d83-64a5-4c6f-99a4-b69ad515836c@kernel.org>
Hi Matt,
On Thu, 2025-12-11 at 19:22 +0100, Matthieu Baerts wrote:
> Hi Geliang,
>
> Thank you for working on that!
>
> On 06/12/2025 13:33, Geliang Tang wrote:
> > From: Geliang Tang <tanggeliang@kylinos.cn>
> >
> > nvme_tcp_try_recv() needs to call .read_sock interface of struct
> > proto_ops, but it's not implemented in MPTCP.
> >
> > This patch implements it with reference to __tcp_read_sock() and
> > __mptcp_recvmsg_mskq().
> >
> > Corresponding to tcp_recv_skb(), a new helper for MPTCP named
> > mptcp_recv_skb() is added to peek a skb from sk->sk_receive_queue.
> >
> > Compared with __mptcp_recvmsg_mskq(), mptcp_read_sock() uses
> > sk->sk_rcvbuf as the max read length. The LISTEN status is checked
> > before the while loop, and mptcp_recv_skb() and
> > mptcp_cleanup_rbuf()
> > are invoked after the loop. In the loop, all flags checks for
> > __mptcp_recvmsg_mskq() are removed.
>
> (...)
>
> > +static int mptcp_read_sock(struct sock *sk, read_descriptor_t
> > *desc,
> > + sk_read_actor_t recv_actor)
> > +{
> > + return __mptcp_read_sock(sk, desc, recv_actor, false);
>
> In this series, it looks like __mptcp_read_sock() is only called
> here,
> always with noack == false then. Will you call this helper with noack
> set to true in another series?
Yes, indeed. This read_sock will be called in all three series that I
am currently developing.
1. In "NVME over MPTCP" series, mptcp_read_sock() will be used, see:
consumed = sock->ops->read_sock(sk, &rd_desc, nvme_tcp_recv_skb);
in nvme_tcp_try_recv().
2. In "MPTCP sockmap support" series (issue #521),
mptcp_read_sock_noack() will be used, see:
copied = tcp_read_sock_noack(sk, desc, recv_actor, true,
&psock->copied_seq);
in tcp_bpf_strp_read_sock().
3. In "MPTCP KTLS support" series (issue #480), tcp_read_sock() is used
in tls_strp_read_copyin():
tcp_read_sock(strp->sk, &desc, tls_strp_copyin);
I originally intended to use mptcp_read_sock() here, but it would cause
a deadlock, so I had to switch to using tcp_read_sock_noack() instead.
>
> (Maybe the extension could be introduced later, but if the next
> series
> follows, that's fine to keep it like that.)
So I think it's better to keep this patch as is.
Thanks,
-Geliang
>
> Cheers,
> Matt
next prev parent reply other threads:[~2025-12-12 9:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-06 12:33 [PATCH mptcp-next v15 0/6] implement mptcp read_sock Geliang Tang
2025-12-06 12:33 ` [PATCH mptcp-next v15 1/6] mptcp: add eat_recv_skb helper Geliang Tang
2025-12-06 12:33 ` [PATCH mptcp-next v15 2/6] mptcp: implement .read_sock Geliang Tang
2025-12-11 18:22 ` Matthieu Baerts
2025-12-12 9:11 ` Geliang Tang [this message]
2025-12-06 12:33 ` [PATCH mptcp-next v15 3/6] tcp: export tcp_splice_state Geliang Tang
2025-12-06 12:33 ` [PATCH mptcp-next v15 4/6] mptcp: implement .splice_read Geliang Tang
2026-01-30 7:19 ` Matthieu Baerts
2026-01-30 13:54 ` Geliang Tang
2026-01-30 17:18 ` Matthieu Baerts
2025-12-06 12:33 ` [PATCH mptcp-next v15 5/6] selftests: mptcp: add splice io mode Geliang Tang
2025-12-06 12:33 ` [PATCH mptcp-next v15 6/6] selftests: mptcp: connect: cover splice mode Geliang Tang
2025-12-06 13:51 ` [PATCH mptcp-next v15 0/6] implement mptcp read_sock MPTCP CI
2025-12-06 17:01 ` MPTCP CI
2025-12-10 1:28 ` Mat Martineau
2025-12-10 1:30 ` Mat Martineau
2025-12-11 18:26 ` Matthieu Baerts
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=0840d15cd328e59d8d12dbd54224488f8f44813b.camel@kernel.org \
--to=geliang@kernel.org \
--cc=hare@kernel.org \
--cc=matttbe@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=tanggeliang@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