From nobody Thu Apr 25 06:15:04 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:cbb9:0:0:0:0:0 with SMTP id v25csp8720606jap; Tue, 23 Nov 2021 08:37:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJyyHs3Xo1jXsX25VsmeIHkp/rTYN1m3WQ/FzR+NmxwvaUQqPAX1XxmIRNfG4ObUI9Dq3LJ5 X-Received: by 2002:a05:6a00:b49:b0:49f:cc01:10ff with SMTP id p9-20020a056a000b4900b0049fcc0110ffmr6426007pfo.42.1637685460527; Tue, 23 Nov 2021 08:37:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637685460; cv=none; d=google.com; s=arc-20160816; b=ZTzITsksUp02gRtcX+qmASKE2XnSlTOFyARzktD6oDMlYpwQtxc5cmQsn2Gc4TX+J+ hH0BqzbO8pbM/rBc++WOBDJCspn6/hrNDJc6IakCHnTAqa/vpVAAJJsYpvhHwUqBY8I4 4nolkb5mZbivRyq3qFKFrWy1/y1a5dw8QedkixZXgdPIi6ceRYf6cw0lAosai/F9xvfk pkLgVnc1zdVJpdLC6uCctZRuYsbZ1nOEbrGTIJQR+kqNUAbfOGEN8NnhDQlMXLtLD4JN s41DZVvL4XqH6FCTUrIDKx+xHQx3Cza9TrJCSyEXRvelP8vYu1nrYyAay4fycGr9GYej fGKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=R1mY7UFdQVRSDeafvZWZ10zEPnX1i9Jjr2qNMeJH7g8=; b=RHRZyetRi1ZostAQ4ohScbeLNwwHptt3E6tGsEQOraRdm5bYCJmaWuALqkux9gr+nE 4vIqbCXZ400y3V/QzULnRqDPOZdoru5c8RYO8HasNYwCmX10FSbEXlGvhgDlmmaF/V0f KyWMQCD+7kfgSAu2eEcqcOHT7S/VMOefWVMSHNHpMm+iu/RUA9a2XJgDZwzqe16vcKud vg+zqEppS7T0R9T520FRobXjy1sEJrbbhy9kZ3T14GZGDkjtWPk67Ko7zWZvkA1rCps5 Zv0thAs2AQilg3B8NHaNNwapQvMxqQQb3VIr3ir1Yl7aCGJK+11Q+Kgz5A9IOM+N7b1O 4iBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+dAQHRS; spf=pass (google.com: domain of mptcp+bounces-2520-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2520-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sjc.edge.kernel.org (sjc.edge.kernel.org. [2604:1380:1000:8100::1]) by mx.google.com with ESMTPS id q194si24172396pgq.61.2021.11.23.08.37.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 08:37:40 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-2520-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) client-ip=2604:1380:1000:8100::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h+dAQHRS; spf=pass (google.com: domain of mptcp+bounces-2520-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2520-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sjc.edge.kernel.org (Postfix) with ESMTPS id 3B6D53E0E9F for ; Tue, 23 Nov 2021 16:37:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65BA52C87; Tue, 23 Nov 2021 16:37:38 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 258952C83 for ; Tue, 23 Nov 2021 16:37:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637685456; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=R1mY7UFdQVRSDeafvZWZ10zEPnX1i9Jjr2qNMeJH7g8=; b=h+dAQHRSZ90ZJEQn2TW3/4mtEqDJYRjAmTSXay9JDMXKwnXF6vxxYx7AbMkCkgMJl4jeHQ 1dsYZ1FmMg34oNTJapcVlqgpDcYkurjbsko2ShWM0QkuPEsb0CLK5OjOCrxK+3IE606Dy1 x3a0SYphRVTZquRaLlbR2H1RcBnTMug= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-330-70fgiZ7cM_qaZ7APdJ6Rxg-1; Tue, 23 Nov 2021 11:37:33 -0500 X-MC-Unique: 70fgiZ7cM_qaZ7APdJ6Rxg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2E95C102CB2E; Tue, 23 Nov 2021 16:37:32 +0000 (UTC) Received: from gerbillo.fritz.box (unknown [10.39.194.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 63EFA67842; Tue, 23 Nov 2021 16:37:31 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Phil Greenland Subject: [PATCH mptcp-next 1/3] mptcp: clean-up MPJ option writing. Date: Tue, 23 Nov 2021 17:37:10 +0100 Message-Id: <5e98a57b75ff1d45305bc5b6ba7fcbd24d355b65.1637684792.git.pabeni@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Check for all MPJ variant at once, this reduces the number of conditionals traversed on average and will simplify the next patch. No functional change intended. Signed-off-by: Paolo Abeni Reviewed-by: Matthieu Baerts --- net/mptcp/options.c | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 8a1020e4285c..7a6a39b71633 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1381,27 +1381,29 @@ void mptcp_write_options(__be32 *ptr, const struct = tcp_sock *tp, =20 /* MPC is additionally mutually exclusive with MP_PRIO */ goto mp_capable_done; - } else if (OPTION_MPTCP_MPJ_SYN & opts->suboptions) { - *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, - TCPOLEN_MPTCP_MPJ_SYN, - opts->backup, opts->join_id); - put_unaligned_be32(opts->token, ptr); - ptr +=3D 1; - put_unaligned_be32(opts->nonce, ptr); - ptr +=3D 1; - } else if (OPTION_MPTCP_MPJ_SYNACK & opts->suboptions) { - *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, - TCPOLEN_MPTCP_MPJ_SYNACK, - opts->backup, opts->join_id); - put_unaligned_be64(opts->thmac, ptr); - ptr +=3D 2; - put_unaligned_be32(opts->nonce, ptr); - ptr +=3D 1; - } else if (OPTION_MPTCP_MPJ_ACK & opts->suboptions) { - *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, - TCPOLEN_MPTCP_MPJ_ACK, 0, 0); - memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); - ptr +=3D 5; + } else if (OPTIONS_MPTCP_MPJ & opts->suboptions) { + if (OPTION_MPTCP_MPJ_SYN & opts->suboptions) { + *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, + TCPOLEN_MPTCP_MPJ_SYN, + opts->backup, opts->join_id); + put_unaligned_be32(opts->token, ptr); + ptr +=3D 1; + put_unaligned_be32(opts->nonce, ptr); + ptr +=3D 1; + } else if (OPTION_MPTCP_MPJ_SYNACK & opts->suboptions) { + *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, + TCPOLEN_MPTCP_MPJ_SYNACK, + opts->backup, opts->join_id); + put_unaligned_be64(opts->thmac, ptr); + ptr +=3D 2; + put_unaligned_be32(opts->nonce, ptr); + ptr +=3D 1; + } else { + *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, + TCPOLEN_MPTCP_MPJ_ACK, 0, 0); + memcpy(ptr, opts->hmac, MPTCPOPT_HMAC_LEN); + ptr +=3D 5; + } } else if (OPTION_MPTCP_ADD_ADDR & opts->suboptions) { u8 len =3D TCPOLEN_MPTCP_ADD_ADDR_BASE; u8 echo =3D MPTCP_ADDR_ECHO; --=20 2.33.1 From nobody Thu Apr 25 06:15:04 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:cbb9:0:0:0:0:0 with SMTP id v25csp8720666jap; Tue, 23 Nov 2021 08:37:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzwY0uZzxjFYOI2WwablP4kYyqladBf7pYfc1MP4K8jzgdtvjmXg5/hqRBZioZEZTzoIlpd X-Received: by 2002:a05:6214:1bc6:: with SMTP id m6mr8258545qvc.14.1637685463119; Tue, 23 Nov 2021 08:37:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637685463; cv=none; d=google.com; s=arc-20160816; b=B8ed/609KzOO2NbtVkQs0AaZi173LC6COgYNC0A/vllVv4hYVc92f56l3ymN80WNTw tbQsBDKdbGFa9ekOMJFkf7Nshs7Bn+EhCUblTH5ddMCAgv2auNgHrq9jrOF1UqbTuc5N TRPDaqPfJRbCAs6f+0mtDyRYXMYdpBX183H2NdToukThy+utzpPcDblFDu4xtXYB2Eyh cPX7JDgtoJYuYdWDMPaSxRM93/nYpj2jKF7U9m0xC3dSxbRkEgn0gBLnF6FS8jijeHxP /9/Jq5Zgclc5fj1gqP1n0muqEnOo6RoEYf9ejeqZnbN6eHm2GHQEYd4fWc32abg+Ez45 z+Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Kd/YCQW1YuEO93rtA/yjURMJ3AIGgmCeJeXKy58/Ft8=; b=YOqJDvDfyo/zsCK7kj+VAySWXWN4nmWrS2+1LnwRAN1m1z6Liq1PPmxuQpvge/ZpGu GzXsx2lINjQejvLV8AVR1PrVHjYt9YkZ071KeY56vQZpWU650COJnCk3oWB0yLhIJBDK KWyRVWw9k0JJPNhVNGUuuqfh5/WKCyU0VE5feKs2Wa2y2rzSE7G1TrQUa+vfhfyd5Tbv uKtgXzKZ9KkbSdoFYQ0BIzfNhYhXl7tQlV2dJfEvD0V6x92qmrlEgrosnf023hKLkba3 Ynox2471rEgUKdzXpsWW6L+hZbXi+wfwPEJMcs9qlaZrYHgDvvw2QdpYUMBvUeCM9me6 9AeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TIUiQI1w; spf=pass (google.com: domain of mptcp+bounces-2522-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2522-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [2604:1380:1:3600::1]) by mx.google.com with ESMTPS id a35si7393844qkp.13.2021.11.23.08.37.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 08:37:43 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-2522-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) client-ip=2604:1380:1:3600::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TIUiQI1w; spf=pass (google.com: domain of mptcp+bounces-2522-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1:3600::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2522-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id DA1C81C0F11 for ; Tue, 23 Nov 2021 16:37:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 128D42C82; Tue, 23 Nov 2021 16:37:40 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A164C2C83 for ; Tue, 23 Nov 2021 16:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637685457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Kd/YCQW1YuEO93rtA/yjURMJ3AIGgmCeJeXKy58/Ft8=; b=TIUiQI1wPK0KTnv+2OCJKThFRFCGKzTTmEh9lX5iEI1x6Xb8NAhvFJph5Fiqn6Bl4bwV/I jvwfTt2IaOEsOkAsIZf7iDK7q3zrVLZuWG2MPb9k/B5SVihHt7RiRojKgut+cB1oZelnHk RBbp0JKs9xbNvhnGwaFT2+s8mrMKkbE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-585-6VlsBpwFNUGyMS-2j9REew-1; Tue, 23 Nov 2021 11:37:34 -0500 X-MC-Unique: 6VlsBpwFNUGyMS-2j9REew-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 80ED41926DA1; Tue, 23 Nov 2021 16:37:33 +0000 (UTC) Received: from gerbillo.fritz.box (unknown [10.39.194.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id A66DA57CAD; Tue, 23 Nov 2021 16:37:32 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Phil Greenland Subject: [PATCH mptcp-next 2/3] mptcp: do not block subflows creation on errors Date: Tue, 23 Nov 2021 17:37:11 +0100 Message-Id: In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" If the MPTCP configuration allows for multiple subflows creation, and the first additional subflows never reach the fully established status - e.g. due to packets drop or reset - the in kernel path manager do not move to the next subflow. Let's trigger subflow creation on both the above event. Note that we don't need an additional timer to catch timeout and/or long delay in connection completion: we just need to measure the time elapsed since the subflow creation every time we emit an MPJ sub-option. Signed-off-by: Paolo Abeni --- net/mptcp/options.c | 19 ++++++++++++++++--- net/mptcp/protocol.h | 1 + net/mptcp/subflow.c | 12 +++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/net/mptcp/options.c b/net/mptcp/options.c index 7a6a39b71633..d6c4f5c82d09 100644 --- a/net/mptcp/options.c +++ b/net/mptcp/options.c @@ -1257,10 +1257,10 @@ static u16 mptcp_make_csum(const struct mptcp_ext *= mpext) void mptcp_write_options(__be32 *ptr, const struct tcp_sock *tp, struct mptcp_out_options *opts) { - if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) { - const struct sock *ssk =3D (const struct sock *)tp; - struct mptcp_subflow_context *subflow; + const struct sock *ssk =3D (const struct sock *)tp; + struct mptcp_subflow_context *subflow; =20 + if (unlikely(OPTION_MPTCP_FAIL & opts->suboptions)) { subflow =3D mptcp_subflow_ctx(ssk); subflow->send_mp_fail =3D 0; =20 @@ -1382,6 +1382,19 @@ void mptcp_write_options(__be32 *ptr, const struct t= cp_sock *tp, /* MPC is additionally mutually exclusive with MP_PRIO */ goto mp_capable_done; } else if (OPTIONS_MPTCP_MPJ & opts->suboptions) { + if (ssk) { + subflow =3D mptcp_subflow_ctx(ssk); + if (subflow->start_stamp && + unlikely(after(tcp_jiffies32, subflow->start_stamp + HZ/10))) { + /* we are not established yet and "a lot" of time passed + * e.g. due to syn retranmissions. We can attempt next + * subflow creation + */ + mptcp_pm_subflow_established(mptcp_sk(subflow->conn)); + subflow->start_stamp =3D 0; + } + } + if (OPTION_MPTCP_MPJ_SYN & opts->suboptions) { *ptr++ =3D mptcp_option(MPTCPOPT_MP_JOIN, TCPOLEN_MPTCP_MPJ_SYN, diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index a6a4bd7de5b4..d5df04d5b3f0 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -432,6 +432,7 @@ struct mptcp_subflow_context { stale : 1; /* unable to snd/rcv data, do not use for xmit */ enum mptcp_data_avail data_avail; u32 remote_nonce; + u32 start_stamp; u64 thmac; u32 local_nonce; u32 remote_token; diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c index 0f90bd61de01..85986f3b58ed 100644 --- a/net/mptcp/subflow.c +++ b/net/mptcp/subflow.c @@ -1273,7 +1273,16 @@ void __mptcp_error_report(struct sock *sk) =20 static void subflow_error_report(struct sock *ssk) { - struct sock *sk =3D mptcp_subflow_ctx(ssk)->conn; + struct mptcp_subflow_context *subflow =3D mptcp_subflow_ctx(ssk); + struct sock *sk =3D subflow->conn; + + /* subflow aborted before reaching the fully_established status + * attempt the creation of the next subflow + */ + if (unlikely(!subflow->fully_established && subflow->start_stamp)) { + mptcp_pm_subflow_established(mptcp_sk(sk)); + subflow->start_stamp =3D 0; + } =20 mptcp_data_lock(sk); if (!sock_owned_by_user(sk)) @@ -1444,6 +1453,7 @@ int __mptcp_subflow_connect(struct sock *sk, const st= ruct mptcp_addr_info *loc, subflow->remote_id =3D remote_id; subflow->request_join =3D 1; subflow->request_bkup =3D !!(flags & MPTCP_PM_ADDR_FLAG_BACKUP); + subflow->start_stamp =3D tcp_jiffies32; mptcp_info2sockaddr(remote, &addr, ssk->sk_family); =20 mptcp_add_pending_subflow(msk, subflow); --=20 2.33.1 From nobody Thu Apr 25 06:15:04 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:cbb9:0:0:0:0:0 with SMTP id v25csp8720721jap; Tue, 23 Nov 2021 08:37:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwgBM0WP8cqh90FnKYlH5jyRk+3e5RJI1PxtQJsVKw/KiN9thBPUACTssh+2DuUILH18cAh X-Received: by 2002:a17:90a:134f:: with SMTP id y15mr4411049pjf.158.1637685461842; Tue, 23 Nov 2021 08:37:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637685461; cv=none; d=google.com; s=arc-20160816; b=gAS3CtjqZjH0S0YLW7XbR9XLss4j+CbyRpTm+hVy67DppI7RaZN0zkL86hQIfRUk2S rMgDj00uuT7FUOQUYsdweWU8DdhVcP0Y9zZJ+OFRFZbpvlf0b5liA3pismvk9ME26sGG jNwMqfTC7mOSD2Mq1smYpj4AJQ1TDV9MWNr8rktVsEN5cOU6Q0JKEdBAjM9dOEHfRkiX DgXzfk1Ra0VQchlG1ay1K+dMZerIbD8op94SneJsWnHscB9ZdrJ4ROyFUEzzZ2OSfQpo WPbkSPlkE1ua4zc1QAu9F35jIwtU8NzlMYHhCiTd6mvqv0sqPiuG2i1XCLE0GfwJvrNA D7Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=GPsqPmUhjdtr+Ypa7O1h7KtrXKdXWPHMHE/CBn+qgTw=; b=vR6wv7Okgo6goHWhEL2Kkkgf/pj43+w0aJ42KAR28PrATPfmUMpJel0aOqJHvMMlfQ SNxA18bDJXlQ62EmkeRAIzRclHglQsvMMTko73pNrH2JURUn9GjNr78tN4ziiGP6mRkJ TQJZxSkM2a0H38xOUhkUc9r6C7c/5ZikRLvBer/SVBFEWsP56UqxhtNuTw+dwxHvJNlK mYwff21gM8ETp2CkmIXR3imKlteslTxJkEn3Qbm/+oCnUBgpRtSSUBRt9G1Nm1ScgBVu adbedhktvC1oT0rNgtZMX94N4F9rtLExw7MU+cx+ES2g4ONnM+wVPT2WMtNGYU+iycVi Kakg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dxMngdmZ; spf=pass (google.com: domain of mptcp+bounces-2521-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2521-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sjc.edge.kernel.org (sjc.edge.kernel.org. [2604:1380:1000:8100::1]) by mx.google.com with ESMTPS id c22si23105349pls.413.2021.11.23.08.37.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Nov 2021 08:37:41 -0800 (PST) Received-SPF: pass (google.com: domain of mptcp+bounces-2521-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) client-ip=2604:1380:1000:8100::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=dxMngdmZ; spf=pass (google.com: domain of mptcp+bounces-2521-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 2604:1380:1000:8100::1 as permitted sender) smtp.mailfrom="mptcp+bounces-2521-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sjc.edge.kernel.org (Postfix) with ESMTPS id 5EA173E0F19 for ; Tue, 23 Nov 2021 16:37:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 906CA2C88; Tue, 23 Nov 2021 16:37:39 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53C3D2C82 for ; Tue, 23 Nov 2021 16:37:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637685457; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GPsqPmUhjdtr+Ypa7O1h7KtrXKdXWPHMHE/CBn+qgTw=; b=dxMngdmZ1cUZH90Bc/140tNgc0viKrXjj0N5YpOtTGSMfeLT8qJ5f1xv+LK8T83gNw5YVv RkRcMg2bYBYOQMWG+zjFoc8T8F6HiV65PejUNuhvnQYScZoAZP+oj+gwbRypwGHPFHPe6Q Rk2AR4QpBDGUcGi4aH+LYETzFcGYj78= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-367-sPMZ4IYQP8-4hdTunXjCmQ-1; Tue, 23 Nov 2021 11:37:35 -0500 X-MC-Unique: sPMZ4IYQP8-4hdTunXjCmQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A25FD425C8; Tue, 23 Nov 2021 16:37:34 +0000 (UTC) Received: from gerbillo.fritz.box (unknown [10.39.194.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id DA7D557CAD; Tue, 23 Nov 2021 16:37:33 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Phil Greenland Subject: [PATCH mptcp-next 3/3] selftests: mptcp: add tests for subflow creation failure Date: Tue, 23 Nov 2021 17:37:12 +0100 Message-Id: <425cdb61dc939d86534843617150634869778909.1637684792.git.pabeni@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Verify that, when multiple endpoints are available, subflows creation proceed even when the first additional subflow creation fails - due to packet drop on the relevant link Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 2684ef9c0d42..dd4488746151 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -1023,6 +1023,16 @@ subflows_tests() run_tests $ns1 $ns2 10.0.1.1 chk_join_nr "multiple subflows, limited by server" 2 2 1 =20 + # multiple subflows, with subflow creation error + reset + ip netns exec $ns1 ./pm_nl_ctl limits 0 2 + ip netns exec $ns2 ./pm_nl_ctl limits 0 2 + ip netns exec $ns2 ./pm_nl_ctl add 10.0.3.2 flags subflow + ip netns exec $ns2 ./pm_nl_ctl add 10.0.2.2 flags subflow + ip netns exec $ns1 iptables -A INPUT -s 10.0.3.2 -p tcp -j REJECT + run_tests $ns1 $ns2 10.0.1.1 + chk_join_nr "multiple subflows, with failing subflow" 1 1 1 + # single subflow, dev reset ip netns exec $ns1 ./pm_nl_ctl limits 0 1 --=20 2.33.1