From nobody Mon Dec 2 13:56:21 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B9E2A1CD3F for ; Thu, 24 Oct 2024 02:52:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729738344; cv=none; b=LdcOYqKgCwLKrMcnXX8VM5t4wuxe0XZPRdbHMRnxn9D0oPtRJD5/nz3E+9CZraO1wvJLwSNqD0EY4+oCHUA6M9hOXWoc1Os5enaILE5BOJ1L2q/TIQrrYN4g6rNNSTAFbHMGSkhzCIrjS9gcgyra1spaCQlFatKzv4k5ICZicL4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729738344; c=relaxed/simple; bh=NbnOHO+BntEtJFgdsQz2dac8wIePPluLxW1MSut+Vpo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kE9ZWyHqqVDcOaM7Y/VdrihrvqfZU/ev74DJEwJ0sxRt2DLK71LaZas7Yk05cKNLOmvo5rfkuoCJNl5ylZ0R+R9Tpnu9VvIP69uei6lFWmB2Xe4adWydoD5tb0G9nHPwOs5r96RS9sddNuCMKWNpiJb1k1door3d4Q8NIk22Axc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EgzWDJaG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EgzWDJaG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26C11C4CEC6; Thu, 24 Oct 2024 02:52:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729738344; bh=NbnOHO+BntEtJFgdsQz2dac8wIePPluLxW1MSut+Vpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EgzWDJaGM6qJ5HmJY0YaQALYJtsw850wf0pDU9X4nDH6ByZH4M1c5nBBi4/PpeBUG urtJDjD+4T818/cVocS57r7DfM6AM4u03sa3BJD8rNE4co1hU4P0oiljJUav2BTS3N 2IgsbrDHmDHHICr2lcrk/0Mya+FVP7jbRVxNGNqc4k6STIwL9c76k4b1qE/lXRJ5hY ksIKcq8Y34MZG33ufBAcjY3UTNzdkpcve4fIPIJSs2EPMCLBb4o3HrtblD+GgHEyBF YseSX8jtJCsKkBkxo8BRJ5p7AvyoKaqUaNbmoyHQFebpa90AZAJXE8RtPQAwPZPQOn 6D6LX/Wk6G6Pw== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next 1/2] Squash to "mptcp: check sk_stream_memory_free in loop" Date: Thu, 24 Oct 2024 10:52:14 +0800 Message-ID: <74210f1b5f7eaf02829aec82d995f23589657e6c.1729738008.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geliang Tang Fix mptcp_join.sh (22) and packetdrill errors reported by CI. Move sk_stream_memory_free check before "send_info[backup].ssk =3D ssk". Signed-off-by: Geliang Tang --- net/mptcp/protocol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c index f36e63b84b88..2ae9b8012dcd 100644 --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -1444,8 +1444,7 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock= *msk) =20 trace_mptcp_subflow_get_send(subflow); ssk =3D mptcp_subflow_tcp_sock(subflow); - if (!mptcp_subflow_active(subflow) || - !sk_stream_memory_free(ssk)) + if (!mptcp_subflow_active(subflow)) continue; =20 tout =3D max(tout, mptcp_timeout_from_subflow(subflow)); @@ -1461,6 +1460,8 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock= *msk) =20 linger_time =3D div_u64((u64)READ_ONCE(ssk->sk_wmem_queued) << 32, pace); if (linger_time < send_info[backup].linger_time) { + if (!sk_stream_memory_free(ssk)) + continue; send_info[backup].ssk =3D ssk; send_info[backup].linger_time =3D linger_time; } --=20 2.45.2 From nobody Mon Dec 2 13:56:21 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 9AD3015573D for ; Thu, 24 Oct 2024 02:52:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729738348; cv=none; b=dVayc8eJLu0jQnrC4eEMvYAzE+kiVABrLZH+PIun/evGEQ4o4nWGeBY3nqvYl8SAiLb3Nl9h1jWqNcZcKPa2JuIw8spJESkERoBVMDQ46rtb+NWFCRq1MQfkLmzc759yvx5lDdiBUn2aiwu3dm1FN4W6qAXN86O3WvSLHmjEcXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729738348; c=relaxed/simple; bh=ZFdrVsL8umsdV0iGAlIwwRUV6UdTeEK30f96VIb1cjc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oe5E+hy32FBh9ET6h+8knHNEsP/9RrEV35YuUMUmIzPVL5eXOWIlixtm6E0Et13RbnOAXrbwYZPuXFN4A8INRbH/4MhRNIMEuswksfeokysvst18j5YhnsjkZ1/ow8hpFbcSgwK1XDlrLCiP+RP1+XlPk6I3LqftwGGhRQ4t9L0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=vQneeMBK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="vQneeMBK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2386C4CEC6; Thu, 24 Oct 2024 02:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729738346; bh=ZFdrVsL8umsdV0iGAlIwwRUV6UdTeEK30f96VIb1cjc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vQneeMBK+pq76njv3R7c/6sM4SFHoS9P5G3feGvRHHXO3lGEJr7TT8UQrtv1YGx0h AENDB6pvHPqD3QqvC1FyPrqoGw1wV1771LUVoiya+GE+wdoCj++II8u6GzlWuyC+Mq xhgxwoq2ztBwdaWzuURvyxWgp2bqHEBUfj27wMFrnHvebYG6LhCxilXnhX6GSR376h 0S7J1woSBzvEssVYhfofBYgvJNDZEMGGgdJEtrNA0PGMWxCF+IgQDfBwwfWvr+XwpX ymEeUUW0j0oH1UgHA5q2Mtwqyk6+2LNt30vNCJD2wb/d/rRW0xwBmIR5lMKoqZTq5o ZXdfkUx3F7s3w== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next 2/2] Squash to "selftests/bpf: Add bpf_burst scheduler & test" Date: Thu, 24 Oct 2024 10:52:15 +0800 Message-ID: <33db1c594a6549fa12d151305349774ef6dd7efd.1729738008.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Geliang Tang Move sk_stream_memory_free check before "send_info[backup].subflow =3D subflow". Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c b/tools/te= sting/selftests/bpf/progs/mptcp_bpf_burst.c index 6242430d0330..f0c9f5984736 100644 --- a/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c +++ b/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c @@ -87,8 +87,7 @@ static int bpf_burst_get_send(struct mptcp_sock *msk) bool backup =3D subflow->backup || subflow->request_bkup; =20 ssk =3D mptcp_subflow_tcp_sock(subflow); - if (!mptcp_subflow_active(subflow) || - !sk_stream_memory_free(ssk)) + if (!mptcp_subflow_active(subflow)) continue; =20 nr_active +=3D !backup; @@ -103,6 +102,8 @@ static int bpf_burst_get_send(struct mptcp_sock *msk) =20 linger_time =3D div_u64((__u64)ssk->sk_wmem_queued << 32, pace); if (linger_time < send_info[backup].linger_time) { + if (!sk_stream_memory_free(ssk)) + continue; send_info[backup].subflow =3D subflow; send_info[backup].linger_time =3D linger_time; } --=20 2.45.2