From: Matthieu Baerts <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>,
Geliang Tang <geliang@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
David Ahern <dsahern@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 4/6] mptcp: implement .splice_read
Date: Fri, 30 Jan 2026 08:24:40 +0100 [thread overview]
Message-ID: <0f074dd6-6a37-4f7e-bdd3-528f201fc8f1@kernel.org> (raw)
In-Reply-To: <20260129-net-next-mptcp-splice-v1-4-994cac40daa0@kernel.org>
Hello,
On 29/01/2026 20:23, Matthieu Baerts (NGI0) wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
>
> This patch implements .splice_read interface of mptcp struct proto_ops
> as mptcp_splice_read() with reference to tcp_splice_read().
>
> Corresponding to __tcp_splice_read(), __mptcp_splice_read() is defined,
> invoking mptcp_read_sock() instead of tcp_read_sock().
>
> mptcp_splice_read() is almost the same as tcp_splice_read(), except for
> sock_rps_record_flow().
>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> Reviewed-by: Mat Martineau <martineau@kernel.org>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> net/mptcp/protocol.c | 114 +++++++++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 114 insertions(+)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index c58e306ec3ef..3aee29f70954 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -4396,6 +4396,118 @@ static int mptcp_read_sock(struct sock *sk, read_descriptor_t *desc,
> return __mptcp_read_sock(sk, desc, recv_actor, false);
> }
>
> +static int __mptcp_splice_read(struct sock *sk, struct tcp_splice_state *tss)
> +{
> + /* Store TCP splice context information in read_descriptor_t. */
> + read_descriptor_t rd_desc = {
> + .arg.data = tss,
> + .count = tss->len,
> + };
> +
> + return mptcp_read_sock(sk, &rd_desc, tcp_splice_data_recv);
> +}
> +
> +/**
> + * mptcp_splice_read - splice data from MPTCP socket to a pipe
> + * @sock: socket to splice from
> + * @ppos: position (not valid)
> + * @pipe: pipe to splice to
> + * @len: number of bytes to splice
> + * @flags: splice modifier flags
> + *
> + * Description:
> + * Will read pages from given socket and fill them into a pipe.
This comment is a copy of tcp_splice_read() where only the first line
has been adapted, but this seems to cause a new kdoc warning:
net/mptcp/protocol.c:4424 No description found for return value of
'mptcp_splice_read'
I guess something like that should be added in a v2:
Return:
Amount of bytes that have been spliced.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-01-30 7:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-29 19:23 [PATCH net-next 0/6] mptcp: implement .read_sock and .splice_read Matthieu Baerts (NGI0)
2026-01-29 19:23 ` [PATCH net-next 1/6] mptcp: add eat_recv_skb helper Matthieu Baerts (NGI0)
2026-01-29 19:23 ` [PATCH net-next 2/6] mptcp: implement .read_sock Matthieu Baerts (NGI0)
2026-01-29 19:23 ` [PATCH net-next 3/6] tcp: export tcp_splice_state Matthieu Baerts (NGI0)
2026-01-29 19:23 ` [PATCH net-next 4/6] mptcp: implement .splice_read Matthieu Baerts (NGI0)
2026-01-30 7:24 ` Matthieu Baerts [this message]
2026-01-29 19:23 ` [PATCH net-next 5/6] selftests: mptcp: add splice io mode Matthieu Baerts (NGI0)
2026-01-30 10:05 ` Matthieu Baerts
2026-01-29 19:23 ` [PATCH net-next 6/6] selftests: mptcp: connect: cover splice mode Matthieu Baerts (NGI0)
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=0f074dd6-6a37-4f7e-bdd3-528f201fc8f1@kernel.org \
--to=matttbe@kernel.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=geliang@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martineau@kernel.org \
--cc=mptcp@lists.linux.dev \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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