From patchwork Wed Mar 17 16:38:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Westphal X-Patchwork-Id: 1454856 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=2001:19d0:306:5::1; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Received: from ml01.01.org (ml01.01.org [IPv6:2001:19d0:306:5::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F0wpF42nYz9sWP for ; Thu, 18 Mar 2021 03:38:45 +1100 (AEDT) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8C1C0100EB855; Wed, 17 Mar 2021 09:38:41 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2a0a:51c0:0:12e:520::1; helo=chamillionaire.breakpoint.cc; envelope-from=fw@breakpoint.cc; receiver= Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 282FD100EB84D for ; Wed, 17 Mar 2021 09:38:39 -0700 (PDT) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1lMZBt-0002JH-Fk; Wed, 17 Mar 2021 17:38:37 +0100 From: Florian Westphal To: Cc: Florian Westphal Date: Wed, 17 Mar 2021 17:38:19 +0100 Message-Id: <20210317163828.27406-1-fw@strlen.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Message-ID-Hash: AFHV6PVXDMMPQBEWXIBM7R76YRZEUQRH X-Message-ID-Hash: AFHV6PVXDMMPQBEWXIBM7R76YRZEUQRH X-MailFrom: fw@breakpoint.cc X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [RFC PATCH mptcp-next 0/9] initial SOL_SOCKET support List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: This patch set improves support for several SOL_SOCKET tuneables. First patch adds skeleton synchronization functions to copy mptcp socket settings to a subflow socket. For the incoming connection case a work queue based synchronization point is added. A sequence number tells which subflows are out-of-sync and need updating. setsockopt SOL_SOCKET gets extended to handle several tuneables. Some of these get copied to all subflows: - keepalive - packet mark (influences routing decision) - SO_LINGER Others are only set on the initial socket, e.g. BINDTODEVICE. Some of these are debateable, for instance SO_INCOMING_CPU. Last two patches add support for two TCP sockopts, TCP_CONGESTION and TCP_INFO. The former is only set for the initial subflow, since that is what userspace program knows about (bind/connect address). It seems better to allow mptcpd/iproute2 to augment subflows with TCPcc info instead. TCP_INFO is another item open for debate. The patch here will take the TCP info from the subflow that was last used to send data. This may not be what is expected, however. Since the struct format is fixed, there are not many alternatives: 1. - always fail with -EOPNOTSUPP 2. - try to artificially synthesize TCP_INFO record based on mptcp level sequence numbers, etc. 3. - always follow the initial subflow only. Comments welcome. Furthermore, support for various SO_TIMESTAMP* settings will need cmsg support in mptcp to be useful. Let me know if anyone is already looking at that. Florian Westphal (9): mptcp: add skeleton to sync msk socket options to subflows mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY mptcp: setsockopt: handle receive/send buffer and device bind mptcp: setsockopt: support SO_LINGER mptcp: setsockopt: add SO_MARK support mptcp: setsockopt: add SO_INCOMING_CPU mptcp: setsockopt: SO_DEBUG and no-op options mptcp: sockopt: add TCP_CONGESTION mptcp: sockopt: handle TCP_INFO net/mptcp/protocol.c | 31 +++- net/mptcp/protocol.h | 12 ++ net/mptcp/sockopt.c | 431 +++++++++++++++++++++++++++++++++++++++++++ net/mptcp/subflow.c | 1 + 4 files changed, 472 insertions(+), 3 deletions(-)