Skip to content

mptcp: support MSG_ERRQUEUE

Matthieu Baerts (NGI0) linux-kselftest lkml mptcp netdev 1 version In review

Get series with b4
b4 am 20260918-net-next-mptcp-msg_errqueue-v1-0-dd77e1738248@kernel.org change-id 20260918-net-next-mptcp-msg_errqueue-0e2049a30061

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4mptcp: support MSG_ERRQUEUE on the parent socketnet/mptcp/protocol.c+46 -92 replies
2/4mptcp: sockopt: factor inet_flags propagation into a masknet/mptcp/sockopt.c+12 -30 replies
3/4mptcp: propagate RECVERR sockopts to subflowsnet/mptcp/sockopt.c+119 -230 replies
4/4selftests: mptcp: cover IP_RECVERR sockopt propagationtools/testing/selftests/net/mptcp/mptcp_sockopt.c+70 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchPaolo Abeni
1/4A-b
2/4A-b
3/4A-b
4/4A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/4] mptcp: support MSG_ERRQUEUE

This series lets MPTCP applications use poll(EPOLLERR) and recvmsg(MSG_ERRQUEUE) on the MPTCP 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 MPTCP's sk_error_queue at error-report time. All forwarded events go through sock_queue_err_skb, which re-homes skb->sk onto the MPTCP and charges sk_rmem_alloc, so the MPTCP'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 MPTCP'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 MPTCP stores the bit so MPTCP-aware helpers can branch on it.

- Patch 4 is a selftest covering the propagation path.

---
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                              |  55 ++++++--
 net/mptcp/sockopt.c                               | 155 ++++++++++++++++++----
 tools/testing/selftests/net/mptcp/mptcp_sockopt.c |  70 ++++++++++
 3 files changed, 246 insertions(+), 34 deletions(-)

---
base-commit: 4bb9710c6a68d35207f123aef55dcd50e7195ec5
change-id: 20260918-net-next-mptcp-msg_errqueue-0e2049a30061

Best regards,

Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>