All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next v5 0/4] mptcp: MSG_ERRQUEUE support on the parent socket
@ 2026-05-02 21:19 David Carlier
  2026-05-02 21:19 ` [PATCH mptcp-next v5 1/4] mptcp: sockopt: factor inet_flags propagation into a mask David Carlier
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: David Carlier @ 2026-05-02 21:19 UTC (permalink / raw)
  To: mptcp; +Cc: matttbe, martineau, geliang, pabeni, David Carlier

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-04 11:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-02 21:19 [PATCH mptcp-next v5 0/4] mptcp: MSG_ERRQUEUE support on the parent socket David Carlier
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

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.