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

This series lets MPTCP applications use poll(EPOLLERR) and
recvmsg(MSG_ERRQUEUE) on the parent socket to drain TX timestamps,
MSG_ZEROCOPY completion notifications and SO_EE_ORIGIN_LOCAL events
that are produced by the subflows, the same way they would on a plain
TCP socket. ICMP-derived errors stay on the subflow queue: the legacy
RECVERR ABI cannot convey their per-subflow peer identity, and they
are intended for a future MPTCP_RECERR channel.

Patch 1 factors the existing inet_flags subflow-propagation hard-coded
list into a mask, so subsequent patches can extend it without churn.

Patch 2 makes IP_RECVERR / IPV6_RECVERR (and the RFC4884 variants)
propagate to the subflows. The parent stores the bit so MPTCP-aware
helpers can branch on it.

Patch 3 splices subflow err-skbs onto the parent's sk_error_queue at
error-report time. When the parent's err queue is full, the splice
drops the offending skb (matching ip_icmp_error() / ipv6_icmp_error()
behaviour). mptcp_recvmsg(MSG_ERRQUEUE) forwards directly to
inet_recv_error(), and mptcp_poll() advertises EPOLLERR purely on the
parent's sk_err / sk_error_queue, matching tcp_poll().

Patch 4 is a selftest covering the propagation path.

Changes in v8 (addresses Matt v7 review on patch 2 + sashiko v7
findings on patch 3,
https://sashiko.dev/#/patchset/20260509211651.104934-1-devnexen@gmail.com):
 - patch 2/4: drop the unnecessary <net/ip.h> include (transitively
   pulled in).
 - patch 2/4: explain the v4-on-AF_INET6-msk skip in
   mptcp_setsockopt_all_sf() inline and in the commit message; note
   the case was unreachable before this patch.
 - patch 2/4: drop the unreachable default: case in
   mptcp_setsockopt_recverr().
 - patch 2/4: drop the unrelated sk_family != AF_INET6 checks added
   to mptcp_setsockopt() / mptcp_getsockopt() — the v6 dispatch path
   already errors out further down.
 - patch 3/4: drop the offending skb when sock_queue_err_skb() fails
   on the parent under rmem pressure, instead of re-queueing it on
   the subflow. (sashiko v7 #2, High)
 - patch 3/4: remove mptcp_subflow_errqueue_pending() and its
   reference in mptcp_poll(). No skbs are retained on subflow queues
   anymore, so the lockless conn_list walk is no longer needed.
   (sashiko v7 #1, Critical)
 - patch 3/4: drop mptcp_recv_error() — with no on-subflow retention,
   the MSG_ERRQUEUE branch in mptcp_recvmsg() forwards directly to
   inet_recv_error().

v7: https://lore.kernel.org/mptcp/20260509211651.104934-1-devnexen@gmail.com/

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                          |  47 +++++-
 net/mptcp/sockopt.c                           | 136 ++++++++++++++----
 .../selftests/net/mptcp/mptcp_sockopt.c       |  55 +++++++
 3 files changed, 209 insertions(+), 29 deletions(-)


base-commit: 8b808b715575367c7e00bcd76a597b7b57d674b8
--
2.53.0


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

end of thread, other threads:[~2026-05-27 15:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27 14:07 [PATCH mptcp-next v8 0/4] mptcp: MSG_ERRQUEUE support on the parent socket David Carlier
2026-05-27 14:07 ` [PATCH mptcp-next v8 1/4] mptcp: sockopt: factor inet_flags propagation into a mask David Carlier
2026-05-27 14:07 ` [PATCH mptcp-next v8 2/4] mptcp: propagate RECVERR sockopts to subflows David Carlier
2026-05-27 14:07 ` [PATCH mptcp-next v8 3/4] mptcp: support MSG_ERRQUEUE on the parent socket David Carlier
2026-05-27 14:07 ` [PATCH mptcp-next v8 4/4] selftests: mptcp: cover IP_RECVERR sockopt propagation David Carlier
2026-05-27 15:14 ` [PATCH mptcp-next v8 0/4] mptcp: MSG_ERRQUEUE support on the parent socket 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.