mptcp: MSG_ERRQUEUE support on the parent socket
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v12 Latest4 patches 2 repliesIn review
- v114 patches 4 repliesSuperseded
- v104 patches 0 repliesSuperseded
Earlier versions · 9
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v9 | 4 patches | 1 reply | Superseded | |
| v8 | 4 patches | 1 reply | Superseded | |
| v7 | 4 patches | 5 replies | Superseded | |
| v6 | 4 patches | 1 reply | Superseded | |
| v5 | 4 patches | 3 replies | Superseded | |
| v4 | 4 patches | 8 replies | Superseded | |
| v3 | 3 patches | 14 replies | Superseded | |
| v2 | 3 patches | 1 reply | Superseded | |
| v1 | 3 patches | 4 replies | Superseded |
Changes in v12 from the cover letter
- reordered the series so the core MSG_ERRQUEUE infrastructure lands first, before the sockopt plumbing that exposes it to user space. The former patch 3/4 is now 1/4.
- 1/4: narrow mptcp_errqueue_skb_forwardable() to SO_EE_ORIGIN_TIMESTAMPING. SO_EE_ORIGIN_ZEROCOPY and SO_EE_ORIGIN_LOCAL events cannot be generated on an MPTCP parent today, so the helper only needs extending if and when they can be.
- 1/4: trim the block comment above sock_queue_err_skb() and the matching changelog paragraphs, now redundant with the narrower filter.
- 2/4: reverse christmas tree declaration ordering in sync_socket_options().
- dropped the Suggested-by: Paolo Abeni tags from patches 1-3.
- rebased on current export.
Patches in v12 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mptcp: support MSG_ERRQUEUE on the parent socketnet/ | +45 | 0 replies | |
| 2/4 | mptcp: sockopt: factor inet_flags propagation into a masknet/ | +12 | 0 replies | |
| 3/4 | mptcp: propagate RECVERR sockopts to subflowsnet/ | +117 | 0 replies | |
| 4/4 | selftests: mptcp: cover IP_RECVERR sockopt propagationtools/ | +55 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v12 yet.
Cover letter [PATCH mptcp-next v12 0/4] mptcp: MSG_ERRQUEUE support on the parent socket
This series lets MPTCP applications use poll(EPOLLERR) and recvmsg(MSG_ERRQUEUE) on the parent socket to drain TX timestamps through the standard inet ABI, 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 splices subflow err-skbs onto the parent's sk_error_queue at error-report time. All forwarded events go through sock_queue_err_skb(), which re-homes skb->sk onto the parent and charges sk_rmem_alloc, so the parent's error queue stays bounded by sk_rcvbuf and is dropped under rmem pressure, matching tcp's tx-timestamp path and ip_icmp_error() / ipv6_icmp_error(). 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 2 factors the existing inet_flags subflow-propagation hard-coded list into a mask, so the next patch can extend it without churn.
Patch 3 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 4 is a selftest covering the propagation path.
Changes in v12 (addresses Paolo's v11 review):
- reordered the series so the core MSG_ERRQUEUE infrastructure lands first, before the sockopt plumbing that exposes it to user space. The former patch 3/4 is now 1/4.
- 1/4: narrow mptcp_errqueue_skb_forwardable() to SO_EE_ORIGIN_TIMESTAMPING. SO_EE_ORIGIN_ZEROCOPY and SO_EE_ORIGIN_LOCAL events cannot be generated on an MPTCP parent today, so the helper only needs extending if and when they can be.
- 1/4: trim the block comment above sock_queue_err_skb() and the matching changelog paragraphs, now redundant with the narrower filter.
- 2/4: reverse christmas tree declaration ordering in sync_socket_options().
- dropped the Suggested-by: Paolo Abeni tags from patches 1-3.
- rebased on current export.
v11: https://lore.kernel.org/mptcp/[email protected]/
v10: https://lore.kernel.org/mptcp/[email protected]/
David Carlier (4):
mptcp: support MSG_ERRQUEUE on the parent socket
mptcp: sockopt: factor inet_flags propagation into a mask
mptcp: propagate RECVERR sockopts to subflows
selftests: mptcp: cover IP_RECVERR sockopt propagation
net/mptcp/protocol.c | 54 +++++-- net/mptcp/sockopt.c | 153 +++++++++++++++--- .../selftests/net/mptcp/mptcp_sockopt.c | 55 +++++++ 3 files changed, 228 insertions(+), 34 deletions(-)
base-commit: 6201be839b36e8dd22a23b9b367388ed900a257f
Signature · 1 line
2.53.0