From nobody Fri Apr 26 20:01:16 2024 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 451D64C60 for ; Mon, 14 Nov 2022 11:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668426873; 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=c8UCMdHy3UuKwXyjx/OyAuvrslIObTk2bCS04EI4vFA=; b=P9WLe68c4qpVwypmYAwut70pp3s7dXzt43T2ik5WciA+aN7GtSB/Hns8QbMqk8h6mGmuHv X1g3N7rVzvcYJu0+X0EP/t/t9CZbDkqObskxpjIXMWnfDbobR0l/eN8M+0GHsV3kTBlXw2 ClsmKxIzFtN5JWqX4Cw7DKSoBrCeJF0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-4Ygj8V1bNBOoe0FCM-KpKQ-1; Mon, 14 Nov 2022 06:54:30 -0500 X-MC-Unique: 4Ygj8V1bNBOoe0FCM-KpKQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D89C9101A52A; Mon, 14 Nov 2022 11:54:29 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4757F40C845B; Mon, 14 Nov 2022 11:54:29 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Dmytro Shytyi Subject: [PATCH mptcp-next 1/3] Squash-to: "mptcp: implement delayed seq generation for passive fastopen" Date: Mon, 14 Nov 2022 12:54:05 +0100 Message-Id: <2b4b21555e06719ee3923f4ed1b0f00c2a3ef507.1668426733.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 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" We should not use double forward slashes for comments. The affending comments could be removed altogether. Additionally fix the SPDX license indentifier Signed-off-by: Paolo Abeni --- net/mptcp/fastopen.c | 6 ++++-- net/mptcp/protocol.h | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c index d1ae7d2405dc..b41248b50123 100644 --- a/net/mptcp/fastopen.c +++ b/net/mptcp/fastopen.c @@ -1,5 +1,7 @@ -/* SPDX-License-Identifier: GPL-2.0 - * MPTCP Fast Open Mechanism. Copyright (c) 2021-2022, Dmytro SHYTYI +// SPDX-License-Identifier: GPL-2.0 +/* MPTCP Fast Open Mechanism + * + * Copyright (c) 2021-2022, Dmytro SHYTYI */ =20 #include "protocol.h" diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index c81bb7d6aab7..0f1e26e55c01 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -848,13 +848,11 @@ void mptcp_event_addr_announced(const struct sock *ss= k, const struct mptcp_addr_ void mptcp_event_addr_removed(const struct mptcp_sock *msk, u8 id); bool mptcp_userspace_pm_active(const struct mptcp_sock *msk); =20 -// Fast Open Mechanism functions begin void mptcp_gen_msk_ackseq_fastopen(struct mptcp_sock *msk, struct mptcp_su= bflow_context *subflow, const struct mptcp_options_received *mp_opt); void mptcp_set_owner_r(struct sk_buff *skb, struct sock *sk); void subflow_fastopen_send_synack_set_params(struct mptcp_subflow_context = *subflow, struct request_sock *req); -// Fast Open Mechanism functions end =20 static inline bool mptcp_pm_should_add_signal(struct mptcp_sock *msk) { --=20 2.38.1 From nobody Fri Apr 26 20:01:16 2024 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 726CA4A3F for ; Mon, 14 Nov 2022 11:54:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668426874; 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=hXhQbFO0g4yji4J/9qSwPm1L+w7WUFfA2OrRoLHyLfE=; b=AYCGZLUBr0HbrEJ/F+RIXT+6FQdJu6Rn04MTgMzPYa8GKIRBfe7d0yaF3nyqm4qcbN5eDn DGlyLh0WozZWeNf7ziiC93fdHTPmRBtIcBWTCjgwlqiWajDlFi5J22a4iNSjF+XnMt+G5+ GkY6Oa1816JcBCpWrEg1F/CcRlTpEyQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-271-W52A-efsPB26dWg_OBWSsw-1; Mon, 14 Nov 2022 06:54:31 -0500 X-MC-Unique: W52A-efsPB26dWg_OBWSsw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B99A9800186; Mon, 14 Nov 2022 11:54:30 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2732840C845B; Mon, 14 Nov 2022 11:54:30 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Dmytro Shytyi Subject: [PATCH mptcp-next 2/3] Squash-to: "mptcp: implement delayed seq generation for passive fastopen" Date: Mon, 14 Nov 2022 12:54:06 +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 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" fix checkpatch warning Signed-off-by: Paolo Abeni --- net/mptcp/fastopen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c index b41248b50123..e1fe919c00c2 100644 --- a/net/mptcp/fastopen.c +++ b/net/mptcp/fastopen.c @@ -70,8 +70,8 @@ void mptcp_gen_msk_ackseq_fastopen(struct mptcp_sock *msk= , struct mptcp_subflow_ if (skb) { WARN_ON_ONCE(MPTCP_SKB_CB(skb)->end_seq); pr_debug("msk %p moving seq %llx -> %llx end_seq %llx -> %llx", sk, - MPTCP_SKB_CB(skb)->map_seq, msk->ack_seq + MPTCP_SKB_CB(skb)->map_seq, - MPTCP_SKB_CB(skb)->end_seq, MPTCP_SKB_CB(skb)->end_seq + msk->ack_seq); + MPTCP_SKB_CB(skb)->map_seq, MPTCP_SKB_CB(skb)->map_seq + msk->ack_seq, + MPTCP_SKB_CB(skb)->end_seq, MPTCP_SKB_CB(skb)->end_seq + msk->ack_seq); MPTCP_SKB_CB(skb)->map_seq +=3D msk->ack_seq; MPTCP_SKB_CB(skb)->end_seq +=3D msk->ack_seq; } --=20 2.38.1 From nobody Fri Apr 26 20:01:16 2024 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 4079B4A3E for ; Mon, 14 Nov 2022 11:54:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668426873; 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=oAaZkWdyiuIS+lYEZQRkkoKmudIzW4S/XCQDhuT8lvk=; b=gNPUON0SccOCKq61kzC0VpqT0mCUpqg7HynYXmDm/dW8egOHUNcIWgX2viOkI5SalZweaI T/cxuMeaqCtotGg+vvcEUMP/OHVifXKktzacNw8q2omCuRmtPX575KGf0HSVV8aXolEpHK inReLjMnC/yDdvOVukSZEG1ELHllqfg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-311-GoH8J7XkP1-LtZ2OFDhhDQ-1; Mon, 14 Nov 2022 06:54:31 -0500 X-MC-Unique: GoH8J7XkP1-LtZ2OFDhhDQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9B5271C0759A; Mon, 14 Nov 2022 11:54:31 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C8FD40CA40C; Mon, 14 Nov 2022 11:54:30 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Dmytro Shytyi Subject: [PATCH mptcp-next 3/3] Squash-to: "selftests: mptcp: mptfo Initiator/Listener" Date: Mon, 14 Nov 2022 12:54:07 +0100 Message-Id: <8a71a8cb0b7ae39eaf6ef29686c8a588f0ce8a38.1668426733.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 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8"; x-default="true" wrap a bunch of long lines, and insert needed empty line after variable declaration. Signed-off-by: Paolo Abeni --- tools/testing/selftests/net/mptcp/mptcp_connect.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/test= ing/selftests/net/mptcp/mptcp_connect.c index ee8d320b071c..c8bd109c991f 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -377,7 +377,8 @@ static int sock_connect_mptcp(const char * const remote= addr, =20 if (cfg_sockopt_types.mptfo) { if (!winfo->total_len) - winfo->total_len =3D winfo->len =3D read(infd, winfo->buf, sizeof(winf= o->buf)); + winfo->total_len =3D winfo->len =3D read(infd, winfo->buf, + sizeof(winfo->buf)); =20 syn_copied =3D sendto(sock, winfo->buf, winfo->len, MSG_FASTOPEN, a->ai_addr, a->ai_addrlen); @@ -837,6 +838,7 @@ static int do_sendfile(int infd, int outfd, unsigned in= t count, struct wstate *winfo) { int ret =3D spool_buf(outfd, winfo); + if (ret < 0) return ret; =20 @@ -920,21 +922,24 @@ static int copyfd_io(int infd, int peerfd, int outfd,= bool close_peerfd, struct =20 switch (cfg_mode) { case CFG_MODE_POLL: - ret =3D copyfd_io_poll(infd, peerfd, outfd, &in_closed_after_out, winfo); + ret =3D copyfd_io_poll(infd, peerfd, outfd, &in_closed_after_out, + winfo); break; =20 case CFG_MODE_MMAP: file_size =3D get_infd_size(infd); if (file_size < 0) return file_size; - ret =3D copyfd_io_mmap(infd, peerfd, outfd, file_size, &in_closed_after_= out, winfo); + ret =3D copyfd_io_mmap(infd, peerfd, outfd, file_size, + &in_closed_after_out, winfo); break; =20 case CFG_MODE_SENDFILE: file_size =3D get_infd_size(infd); if (file_size < 0) return file_size; - ret =3D copyfd_io_sendfile(infd, peerfd, outfd, file_size, &in_closed_af= ter_out, winfo); + ret =3D copyfd_io_sendfile(infd, peerfd, outfd, file_size, + &in_closed_after_out, winfo); break; =20 default: --=20 2.38.1