All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Cc: Geliang Tang <tanggeliang@kylinos.cn>,
	kernel test robot <lkp@intel.com>,
	Cong Wang <xiyou.wangcong@gmail.com>
Subject: Re: [PATCH mptcp-next v5 06/16] mptcp: implement psock_update_sk_prot for sockmap
Date: Sun, 13 Sep 2026 20:22:05 +0200	[thread overview]
Message-ID: <0a4bbaf9-7cc0-4ec8-b630-261a0b324e86@kernel.org> (raw)
In-Reply-To: <39ae7a2bebed6f38d02356c7e288a21a70bdd07f.1789294365.git.tanggeliang@kylinos.cn>

On 13/09/2026 12:14, Geliang Tang wrote:
> From: Geliang Tang <tanggeliang@kylinos.cn>
> 
> This patch adds basic MPTCP support for BPF sockmap by implementing the
> psock_update_sk_prot callback (mptcp_bpf_update_proto). This allows MPTCP
> sockets to be added to sockmap and enables the sk_skb stream_verdict
> redirect path via the read_skb callback. Separate protocol structures are
> maintained for IPv4/IPv6 and BASE/TX/RX/TXRX configurations, mirroring
> tcp_bpf_update_proto(). The IPv6 variant is lazily rebuilt via
> mptcp_bpf_check_v6_needs_rebuild() when the underlying protocol ops change.
> 
> MPTCP delegates to the original protocol operations so that MPTCP-specific
> logic (multi-path scheduling in sendmsg, ordered reassembly in recvmsg) is
> preserved. recvmsg is overridden in all BPF configurations with
> mptcp_bpf_recvmsg, which checks the psock ingress queue first and falls
> back to mptcp_recvmsg via the shared __tcp_bpf_recvmsg() helper. sendmsg
> is overridden in the TX/TXRX configurations with mptcp_bpf_sendmsg, which
> processes sk_msg redirect before delegating to mptcp_sendmsg via
> __tcp_bpf_sendmsg().
> 
> Export mptcp_sendmsg, mptcp_recvmsg and mptcp_prot from protocol.c so they
> can be referenced by bpf.c.
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202512261144.DxrvwMS3-lkp@intel.com/
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/521
> Cc: Cong Wang <xiyou.wangcong@gmail.com>
> Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
> ---
>  include/net/tcp.h    |   5 ++
>  net/ipv4/tcp_bpf.c   |  29 +++++++---

Probably best to separate this change from the rest: TCP/BPF on one
side, then MPTCP/BPF (and eventually MPTCP only before, just to do the
exports.)

>  net/mptcp/bpf.c      | 129 +++++++++++++++++++++++++++++++++++++++++++
>  net/mptcp/protocol.c |  10 ++--
>  net/mptcp/protocol.h |  18 ++++++

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  parent reply	other threads:[~2026-09-13 18:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13 10:14 [PATCH mptcp-next v5 00/16] MPTCP sockmap support Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 01/16] mptcp: defer read_sock cleanup to mptcp_worker Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 02/16] mptcp: add sendmsg_locked to proto_ops Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 03/16] mptcp: track app-limited state in mptcp_sendmsg Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 04/16] selftests: mptcp: sockopt: check app_limited Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 05/16] bpf: drop duplicate check_app_limited in tcp_bpf_push Geliang Tang
2026-09-13 18:18   ` Matthieu Baerts
2026-09-13 10:14 ` [PATCH mptcp-next v5 06/16] mptcp: implement psock_update_sk_prot for sockmap Geliang Tang
2026-09-13 10:46   ` sashiko-bot
2026-09-13 18:22   ` Matthieu Baerts [this message]
2026-09-13 10:14 ` [PATCH mptcp-next v5 07/16] mptcp: add sock_map_update BPF helper Geliang Tang
2026-09-13 10:30   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 08/16] selftests/bpf: enable MPTCP support in sockmap tests Geliang Tang
2026-09-13 10:33   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 09/16] mptcp: implement read_skb for sockmap stream verdict Geliang Tang
2026-09-13 10:40   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 10/16] bpf: export and generalize tcp_bpf_ioctl Geliang Tang
2026-09-13 10:28   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 11/16] mptcp: add TCP_REPAIR sockopt support Geliang Tang
2026-09-13 10:38   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 12/16] selftests/bpf: add MPTCP coverage to sockmap_basic Geliang Tang
2026-09-13 10:30   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 13/16] mptcp: add sk_is_msk() helper and use it in sockmap Geliang Tang
2026-09-13 10:48   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 14/16] mptcp: add SO_ATTACH_REUSEPORT_EBPF support Geliang Tang
2026-09-13 10:14 ` [PATCH mptcp-next v5 15/16] mptcp: add sk_select_reuseport BPF helper Geliang Tang
2026-09-13 10:48   ` sashiko-bot
2026-09-13 10:14 ` [PATCH mptcp-next v5 16/16] selftests/bpf: add MPTCP coverage to sockmap_listen Geliang Tang
2026-09-13 10:45   ` sashiko-bot
2026-09-13 11:24 ` [PATCH mptcp-next v5 00/16] MPTCP sockmap support MPTCP CI
2026-09-13 11:43 ` MPTCP CI

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=0a4bbaf9-7cc0-4ec8-b630-261a0b324e86@kernel.org \
    --to=matttbe@kernel.org \
    --cc=geliang@kernel.org \
    --cc=lkp@intel.com \
    --cc=mptcp@lists.linux.dev \
    --cc=tanggeliang@kylinos.cn \
    --cc=xiyou.wangcong@gmail.com \
    /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 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.