mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: Mat Martineau <martineau@kernel.org>,
	Geliang Tang <geliang@kernel.org>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Simon Horman <horms@kernel.org>
Cc: netdev@vger.kernel.org, mptcp@lists.linux.dev,
	 linux-kernel@vger.kernel.org,
	"Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
	 David Carlier <devnexen@gmail.com>,
	Shuah Khan <shuah@kernel.org>,
	 linux-kselftest@vger.kernel.org
Subject: [PATCH net-next 0/4] mptcp: support MSG_ERRQUEUE
Date: Fri, 18 Sep 2026 20:38:24 +0200	[thread overview]
Message-ID: <20260918-net-next-mptcp-msg_errqueue-v1-0-dd77e1738248@kernel.org> (raw)

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.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
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,
--  
Matthieu Baerts (NGI0) <matttbe@kernel.org>


             reply	other threads:[~2026-09-18 18:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-18 18:38 Matthieu Baerts (NGI0) [this message]
2026-09-18 18:38 ` [PATCH net-next 1/4] mptcp: support MSG_ERRQUEUE on the parent socket Matthieu Baerts (NGI0)
2026-09-18 18:38 ` [PATCH net-next 2/4] mptcp: sockopt: factor inet_flags propagation into a mask Matthieu Baerts (NGI0)
2026-09-18 18:38 ` [PATCH net-next 3/4] mptcp: propagate RECVERR sockopts to subflows Matthieu Baerts (NGI0)
2026-09-18 18:38 ` [PATCH net-next 4/4] selftests: mptcp: cover IP_RECVERR sockopt propagation Matthieu Baerts (NGI0)

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=20260918-net-next-mptcp-msg_errqueue-v1-0-dd77e1738248@kernel.org \
    --to=matttbe@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devnexen@gmail.com \
    --cc=edumazet@google.com \
    --cc=geliang@kernel.org \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=martineau@kernel.org \
    --cc=mptcp@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /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

all inboxes | Powered by JetHome®