MPTCP Linux Development
 help / color / mirror / Atom feed
From: David Carlier <devnexen@gmail.com>
To: mptcp@lists.linux.dev
Cc: matttbe@kernel.org, martineau@kernel.org, geliang@kernel.org,
	pabeni@redhat.com, David Carlier <devnexen@gmail.com>
Subject: [PATCH mptcp-next v5 0/4] mptcp: MSG_ERRQUEUE support on the parent socket
Date: Sat,  2 May 2026 22:19:56 +0100	[thread overview]
Message-ID: <cover.1777756707.git.devnexen@gmail.com> (raw)

MPTCP already advertises IP_RECVERR/IPV6_RECVERR as supported, but the
parent socket does not currently provide usable MSG_ERRQUEUE handling.

This series wires the MPTCP socket up to the IPv4/IPv6 error queue
paths. It propagates RECVERR-related sockopts to existing and future
subflows, and lets recvmsg(MSG_ERRQUEUE) on the parent socket consume
queued TX-timestamp and MSG_ZEROCOPY completion notifications.

A prerequisite patch factors the per-flag inet_flags propagation in
sync_socket_options() into a mask-driven loop, so further inet_flags
propagated by MPTCP can be added by extending the mask rather than
touching the call site.

Patch 2 leverages mptcp_setsockopt_all_sf() for the setsockopt path
and extends MPTCP_INET_FLAGS_MASK with the four RECVERR bits, with a
single mptcp_setsockopt_recverr() helper covering both families.

Patch 3 splices subflow err skbs onto the parent at error-report
time, filtering by SO_EE_ORIGIN so user-data cmsgs (TIMESTAMPING,
ZEROCOPY, LOCAL) reach the parent socket while subflow-level ICMP
errors are dropped to avoid leaking subflow identity through the
single-path RECVERR ABI. A future MPTCP_RECERR channel is the right
home for those events along with the per-fd subflow lifecycle events
tracked by [1].

Changes in v5:
 - 1/4: replace the WRITE_ONCE() RMW with a per-bit assign_bit() loop
   so the per-bit atomicity of the original inet_assign_bit() calls
   is preserved (Sashiko).
 - 2/4: collapse the family-specific helpers into one
   mptcp_setsockopt_recverr() that snapshots optval into a local int,
   bumps msk->setsockopt_seq, and forwards via
   mptcp_setsockopt_all_sf() (Matthieu, Sashiko); skip
   family-mismatched subflows in mptcp_setsockopt_all_sf() (Sashiko).
 - 3/4: filter the splice by SO_EE_ORIGIN to forward
   TIMESTAMPING / ZEROCOPY / LOCAL only and drop ICMP / ICMPv6
   (Matthieu, Paolo); add mptcp_recv_error() to retry the splice on
   the pull side so a parent-side rmem-ENOMEM does not strand subflow
   skbs (Sashiko).
 - 4/4: unchanged.

[1] https://github.com/multipath-tcp/mptcp_net-next/issues/78

David Carlier (4):
  mptcp: sockopt: factor inet_flags propagation into a mask
  mptcp: propagate RECVERR sockopts to subflows
  mptcp: support MSG_ERRQUEUE on the parent socket
  selftests: mptcp: cover IP_RECVERR sockopt propagation

 net/mptcp/protocol.c                          |  66 ++++++++++-
 net/mptcp/sockopt.c                           | 108 ++++++++++++++----
 .../selftests/net/mptcp/mptcp_sockopt.c       |  55 +++++++++
 3 files changed, 203 insertions(+), 26 deletions(-)

-- 
2.53.0


             reply	other threads:[~2026-05-02 21:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-02 21:19 David Carlier [this message]
2026-05-02 21:19 ` [PATCH mptcp-next v5 1/4] mptcp: sockopt: factor inet_flags propagation into a mask David Carlier
2026-05-02 21:19 ` [PATCH mptcp-next v5 2/4] mptcp: propagate RECVERR sockopts to subflows David Carlier
2026-05-02 21:19 ` [PATCH mptcp-next v5 3/4] mptcp: support MSG_ERRQUEUE on the parent socket David Carlier
2026-05-02 21:20 ` [PATCH mptcp-next v5 4/4] selftests: mptcp: cover IP_RECVERR sockopt propagation David Carlier
2026-05-04 10:13 ` [PATCH mptcp-next v5 0/4] mptcp: MSG_ERRQUEUE support on the parent socket Matthieu Baerts
2026-05-04 10:51   ` David CARLIER
2026-05-04 11:07 ` 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=cover.1777756707.git.devnexen@gmail.com \
    --to=devnexen@gmail.com \
    --cc=geliang@kernel.org \
    --cc=martineau@kernel.org \
    --cc=matttbe@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox