From nobody Sat Dec 21 15:09:24 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 0F9C34A1D for ; Wed, 18 Sep 2024 08:25:27 +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=1726647928; cv=none; b=JeWLcffbZc1p6Wrc9gwuwyoYQSe2dKTOm0SfgUSQMGmyduVfdqrp75l++TSCtqGIcHPeQUf8JbknWbDrKfJHERm/RkD2/wVfgAdiEXDnrk7iMWuT3aDsJqCeL3dGIlZVAdS1EhbLbGinrU2tpnvbJNy/0M88+2XZ1vOzTMFdVVs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647928; c=relaxed/simple; bh=JrjP+cxxwQctHpBi6PyjZFtDkVVFpWStd9Gbslehly0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IOsVacNgBOXo+YtmekmP7dFmzy6HCS7pC5T5XyhToMfmwjTMr3QfYiKI9gfy45nCUsjgJy1NRKWLTpRAkeZ4s0mEilb1wcC6mzQwJ/KHSHh2c8QnZ8Xq7yq2gTWdlMXCcaxrOQpMIpoq9t5ti2wvLJGMvTek7yus8h+Sr94e/xY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dci08xQs; 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="dci08xQs" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 469E3C4CEC3; Wed, 18 Sep 2024 08:25:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647927; bh=JrjP+cxxwQctHpBi6PyjZFtDkVVFpWStd9Gbslehly0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dci08xQs+rA99K5my1RjRxwtXYoJ3hoXkT8iaivwjaTplbMC9rdH6F17pvpr2qTFc yuq07BgPLxJzmFVXzX5YcXUm3LUCQoUFvKRNQxleoSmNjDs8hnLAk3rg3xQN30xbU9 OzD5HJ1PMGdycp+Y8fFimA50uYGw/1qnqeLV9E7wzOb9CAkNgTsn33aj1dlPDb+eA3 8vJsUbeH1as6lcMjiWuj0HmYinhYMV4FKVtpWnqOcSAlN8cq1OLK5u3bQ3ke6bhvWz SuqYWfdgoNlUJxB/dMfO9q1x0chio2n0yKSbQsFN0lFsxqHrAS57xzjL8egDcZcKml hYa2sTbyq89eg== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 1/6] Squash to "selftests/bpf: Add getsockopt to inspect mptcp subflow" Date: Wed, 18 Sep 2024 16:25:13 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 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 Use can_loop instead of cond_break as Martin suggested. Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/progs/mptcp_bpf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf.h b/tools/testing/= selftests/bpf/progs/mptcp_bpf.h index 928a1e5ad8db..c3800f986ae1 100644 --- a/tools/testing/selftests/bpf/progs/mptcp_bpf.h +++ b/tools/testing/selftests/bpf/progs/mptcp_bpf.h @@ -26,10 +26,10 @@ static inline int list_is_head(const struct list_head *= list, #define list_entry_is_head(pos, head, member) \ list_is_head(&pos->member, (head)) =20 -/* small difference: 'cond_break' has been added in the conditions */ +/* small difference: 'can_loop' has been added in the conditions */ #define list_for_each_entry(pos, head, member) \ for (pos =3D list_first_entry(head, typeof(*pos), member); \ - cond_break, !list_entry_is_head(pos, head, member); \ + !list_entry_is_head(pos, head, member) && can_loop; \ pos =3D list_next_entry(pos, member)) =20 /* mptcp helpers from protocol.h */ --=20 2.43.0 From nobody Sat Dec 21 15:09:24 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 8E89F4A1D for ; Wed, 18 Sep 2024 08:25:29 +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=1726647929; cv=none; b=lz5fdmnzEPGI1b5XZo1mjNJHVauTGiiXcBN63LCb7/73HxZON+I9TDwU7KTOoVRRg6Q81QwIbQHQKaCzaiGEoJJ+9CHQKBw/o2IjjuoGyGKk0bjSpVezbnbnaD/kkpgdpL8hHky6i34Tkh3HHb2+gErOF1txcWSzXjGHKztldgA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647929; c=relaxed/simple; bh=HiTklz2CFtiZTKDWh6s7UXBVztznjLS28ql2Yd/Fphk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NeroyI10SrK8dXn9NtqS/xgPjxoxiq3agjZnMmXRMW8jXm7hZhtw0O+C1d3HB0QItjD6PQfNWMtlf0aiFInzFkaDweMyt5DF+v8AzRD9/8eATEg5LK9xwEXKRNJtIlOPfMNgao80olfJ1voMTfmaxRJrNO3405TQIYeDpQLMU7s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Oowz1odv; 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="Oowz1odv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E367C4CECD; Wed, 18 Sep 2024 08:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647929; bh=HiTklz2CFtiZTKDWh6s7UXBVztznjLS28ql2Yd/Fphk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oowz1odvZA3DZfbTpsaDzpG//PM17V0BEifkV4+xhpd1g914XfNlGCtW+OE+2vFJb uz+TRySnh8xjvmYR4O91PqaJa8zLA+rKSCNgDsG8J10pxdDSEj+c+C4YaWTFYNxNhE 2ihEDSU9SfaoDtkaJt62AygAXg5JNjAiZ459/oH2+NlnwuuaUfkNpmd5xHgSsxGc1L LxMR1Q5R9V1oFoPOWLGYA4ldgLZj26goeARe60cSqcWNqmx1EMCPvCLOYvnPeShHAY LuLY6ltmOuGy0l5Qo69uQx80qumfODJzlC0lsj2TcLfamxi3ecJagfObENpjJTWD9Z IpbaFrH8sw/WQ== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 2/6] Squash to "selftests/bpf: Add mptcp subflow subtest" Date: Wed, 18 Sep 2024 16:25:14 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 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 Address Martin's comments: Drop mptcp_subflow__attach. Use bpf_program__attach_cgroup instead of bpf_prog_attach. Use the skel->links.{mptcp_subflow, _getsockopt_subflow}, instead of declar= ing a local "link". Signed-off-by: Geliang Tang --- .../testing/selftests/bpf/prog_tests/mptcp.c | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing= /selftests/bpf/prog_tests/mptcp.c index a3e68bc6afa3..acd79be134cd 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -424,10 +424,9 @@ static void run_subflow(void) =20 static void test_subflow(void) { - int cgroup_fd, prog_fd, err; struct mptcp_subflow *skel; struct nstoken *nstoken; - struct bpf_link *link; + int cgroup_fd; =20 cgroup_fd =3D test__join_cgroup("/mptcp_subflow"); if (!ASSERT_OK_FD(cgroup_fd, "join_cgroup: mptcp_subflow")) @@ -439,13 +438,14 @@ static void test_subflow(void) =20 skel->bss->pid =3D getpid(); =20 - err =3D mptcp_subflow__attach(skel); - if (!ASSERT_OK(err, "skel_attach: mptcp_subflow")) + skel->links.mptcp_subflow =3D + bpf_program__attach_cgroup(skel->progs.mptcp_subflow, cgroup_fd); + if (!ASSERT_OK_PTR(skel->links.mptcp_subflow, "attach mptcp_subflow")) goto skel_destroy; =20 - prog_fd =3D bpf_program__fd(skel->progs.mptcp_subflow); - err =3D bpf_prog_attach(prog_fd, cgroup_fd, BPF_CGROUP_SOCK_OPS, 0); - if (!ASSERT_OK(err, "prog_attach")) + skel->links._getsockopt_subflow =3D + bpf_program__attach_cgroup(skel->progs._getsockopt_subflow, cgroup_fd); + if (!ASSERT_OK_PTR(skel->links._getsockopt_subflow, "attach _getsockopt_s= ubflow")) goto skel_destroy; =20 nstoken =3D create_netns(); @@ -455,14 +455,8 @@ static void test_subflow(void) if (endpoint_init("subflow") < 0) goto close_netns; =20 - link =3D bpf_program__attach_cgroup(skel->progs._getsockopt_subflow, - cgroup_fd); - if (!ASSERT_OK_PTR(link, "getsockopt prog")) - goto close_netns; - run_subflow(); =20 - bpf_link__destroy(link); close_netns: cleanup_netns(nstoken); skel_destroy: --=20 2.43.0 From nobody Sat Dec 21 15:09:24 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 D91FD4A1D for ; Wed, 18 Sep 2024 08:25:31 +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=1726647931; cv=none; b=NCMPU6n43PPULcdh/k5L+Jbey2DIJnjdw9UXSDYf+E1GSz5dUzp/9ZK71EN6JoR/JOnxHu3EUn53FPidAJ3HeOleSfcdB5xphg2qYZiazlgEeTSysGjDXoBUpCMY6gCsqz8iVVlpBQRNtT/o7iK6D7VWA4yhwcWmj2QgGPFhpfs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647931; c=relaxed/simple; bh=D8PfTAmPuHjWujUQ9BejNY7QP42pjnoQ8PAlKl55cRE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F3c98PRMHX/zay52v+tfQGIDHRYUjzf32h+tbRd/rk010PS+yNQ46YFq2TmQjygq3UuHxcWjv29wV/+16t6q5mdA0SKNnL+xpOGjMEscCQUUaDm6yZUJp88lj5o3FdBjfO48ugjz3TmS+gIgCADpgaEZnVGmBqZja8LB7O5J8rg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=J8apTP3m; 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="J8apTP3m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC41AC4CEC3; Wed, 18 Sep 2024 08:25:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647931; bh=D8PfTAmPuHjWujUQ9BejNY7QP42pjnoQ8PAlKl55cRE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=J8apTP3mBsz4gH3FNfWWtyuMjr6KyMmjgtn0PNBHv8Ot6cu+CPuC4xlGkkAOvw8CM dLv4BFXNQ4Y/KXJ2/q/IiVyDjc4BuWGpHxyGUIVpEEJSE0Fq/KL+m2NV36phuqMjfo IkTUjRd62weJV+zft1W8y7k5FW/P9zXrfNFWiD8SJdGe12QFMDICSivHoZWctQEZsG O8w3J6jnKia+ZA1+iYCenS9p0ulvOcX9Wr4ruXAToTCLSqxrodgl2Vfx0lAxZwaDpe 5VMzlI8kcPlMq4MGpLTNv/2+bVELD0L6tvtrQtZ1epfDW65KVDn0PYMkg3u9fT1EVm 1d+ghJvYLovhg== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 3/6] selftests/bpf: More subflows for endpoint_init Date: Wed, 18 Sep 2024 16:25:15 +0800 Message-ID: <775a0af80c03fe1af8f36778615bb314278ec847.1726647599.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 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 Squash to "selftests/bpf: Add mptcp subflow subtest" 2 This patch adds two more test addresses ADDR_3 and ADDR_4, and adds a new parameter "subflows" for endpoint_init() to control how many subflows are used for the tests. This makes it more flexible. Update the parameters of endpoint_init() in test_subflow(). Signed-off-by: Geliang Tang --- .../testing/selftests/bpf/prog_tests/mptcp.c | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing= /selftests/bpf/prog_tests/mptcp.c index acd79be134cd..f4715b1692df 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -20,6 +20,8 @@ #define NS_TEST "mptcp_ns" #define ADDR_1 "10.0.1.1" #define ADDR_2 "10.0.1.2" +#define ADDR_3 "10.0.1.3" +#define ADDR_4 "10.0.1.4" #define PORT_1 10001 #define WITH_DATA true #define WITHOUT_DATA false @@ -351,19 +353,36 @@ static void test_mptcpify(void) close(cgroup_fd); } =20 -static int endpoint_init(char *flags) +static int endpoint_init(char *flags, u8 subflows) { + if (!subflows || subflows > 4) + goto fail; + SYS(fail, "ip -net %s link add veth1 type veth peer name veth2", NS_TEST); SYS(fail, "ip -net %s addr add %s/24 dev veth1", NS_TEST, ADDR_1); SYS(fail, "ip -net %s link set dev veth1 up", NS_TEST); SYS(fail, "ip -net %s addr add %s/24 dev veth2", NS_TEST, ADDR_2); SYS(fail, "ip -net %s link set dev veth2 up", NS_TEST); - if (SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, fl= ags)) { + + SYS(fail, "ip -net %s link add veth3 type veth peer name veth4", NS_TEST); + SYS(fail, "ip -net %s addr add %s/24 dev veth3", NS_TEST, ADDR_3); + SYS(fail, "ip -net %s link set dev veth3 up", NS_TEST); + SYS(fail, "ip -net %s addr add %s/24 dev veth4", NS_TEST, ADDR_4); + SYS(fail, "ip -net %s link set dev veth4 up", NS_TEST); + + if (SYS_NOFAIL("ip -net %s mptcp limits set subflows 4", NS_TEST)) { printf("'ip mptcp' not supported, skip this test.\n"); test__skip(); goto fail; } =20 + if (subflows > 1) + SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_2, flags= ); + if (subflows > 2) + SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_3, flags= ); + if (subflows > 3) + SYS_NOFAIL("ip -net %s mptcp endpoint add %s %s", NS_TEST, ADDR_4, flags= ); + return 0; fail: return -1; @@ -452,7 +471,7 @@ static void test_subflow(void) if (!ASSERT_OK_PTR(nstoken, "create_netns: mptcp_subflow")) goto skel_destroy; =20 - if (endpoint_init("subflow") < 0) + if (endpoint_init("subflow", 2) < 0) goto close_netns; =20 run_subflow(); --=20 2.43.0 From nobody Sat Dec 21 15:09:24 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 C8D444A1D for ; Wed, 18 Sep 2024 08:25:32 +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=1726647933; cv=none; b=uccTTHrC1U5nPcBgHgkZEMF94p2ZbRzEdQKcXTZgk6oF1efsvMqKfkt6jrQiOvuihQlyH/Z33mq9zyaNShg8Ht3Y3JwSKJ/iJKhfGmDFhR0c341IbL5zf7JDdR8N4h4qZCPbYsbX18JkRqwvoC7s77qh2APnrlSOohTdp1W91Cg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647933; c=relaxed/simple; bh=8eAH8GdWYHEniV9aWy6BqxIJ30yhNPjm4jN4t5U4nNk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F8dk9XjjBuwM8tsF9+LKbrZAd9kzqSRv/pxgAhSqO/tqWPQn6IxvxDAO26bOevpISuXQkCS6ZEgjOA4Q9nJq0I2U7Wnhfsq+M1XXkvBdKIb/sdB2skenmb3uoJByqlGkk4q/rukscfxCEWr9/IHI6ejoCvpCsvqhGISv8FSIpp0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mqCUFzyB; 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="mqCUFzyB" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 959F6C4CECF; Wed, 18 Sep 2024 08:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647932; bh=8eAH8GdWYHEniV9aWy6BqxIJ30yhNPjm4jN4t5U4nNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mqCUFzyB1kL+kwnMQ5nMaEidgTCZSLq25GUdo/KZjI3mCb9HOPnDW1bS2YzHr6X9k rBZRY1KvUpTNrVxPReLM7I2V0IxFrID4YVBCLw1W8PrpsZbfJHeseVI8yaRKPFy+uV BcCXxtfWcDJIvjcfD3h6u9JjtWDobg8OHpbyG0L4jtLTdK0krIxcZuuwfHVuBNxN8j tj0bNMDrhDuyrr1AX/TMweX9uQs23MSuaZ7DU7NGRu9szAROUKFr+VM/yRb2LSWx+b FtvpaQON/bUHRV4Hm80w5EaUJiAb2RFCsam5zNrk3Qczyd90YG3OiZgLdUPbip/ZEU DXFi84QV8Ne/A== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 4/6] Squash to "selftests/bpf: Add bpf scheduler test" Date: Wed, 18 Sep 2024 16:25:16 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 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 Update endpoint_init() in sched_init(). Signed-off-by: Geliang Tang --- tools/testing/selftests/bpf/prog_tests/mptcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing= /selftests/bpf/prog_tests/mptcp.c index f4715b1692df..04146184e45a 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -492,7 +492,7 @@ static struct nstoken *sched_init(char *flags, char *sc= hed) if (!ASSERT_OK_PTR(nstoken, "create_netns")) return NULL; =20 - if (endpoint_init("subflow") < 0) + if (endpoint_init("subflow", 2) < 0) goto fail; =20 SYS(fail, "ip netns exec %s sysctl -qw net.mptcp.scheduler=3D%s", NS_TEST= , sched); --=20 2.43.0 From nobody Sat Dec 21 15:09:24 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 E35EE4A1D for ; Wed, 18 Sep 2024 08:25:34 +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=1726647935; cv=none; b=IzVvh02YjxmfL8mBwGja5zgZoyfooH6wsydM8jR1JsKZ5cnG2cuHcYuNVS0ht1LeX89PGb6X/XQdksz32OJU7FjWDeqB1YS0KbAfs8ypv3Wil9B59olTy7MNuK6W3yXS+LNeHkr7fj3apSPFzZv7y1BvCoAUbhaU0QOcn6AJZGA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647935; c=relaxed/simple; bh=BxLLcYCta6yKdQKXRoRUhoVzoTnnDducmcWS7Ryz8FE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ardR9BfxKB5QS6kjKe0jBcDm8o+R/Tckx4gz+ZE0PmsVLeS9cI75AWXxKVtf0Hg+P+8VvZejSadcRqO5bncTcq4EudUkWpLGyf/FnkrptiUdohZLEP3lbt+PbhITmZ2efX1xxEqhdlw2hALySV1Rqn/7uRxWQ9bpOFzkuAtt00Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ozrX5Y8O; 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="ozrX5Y8O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FD97C4CECD; Wed, 18 Sep 2024 08:25:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647934; bh=BxLLcYCta6yKdQKXRoRUhoVzoTnnDducmcWS7Ryz8FE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ozrX5Y8O++Sqd72QgHd30xD5F9twqD2R4U/4J4Ah60q3UYGJV+IzADGxjHdh8MYIT aLRl6fFVgUFyP6IjLVXhyVJwUVdX29Hwy4rra6VtPRENeEMVKxE+A07p/HnE+EPC0h DyFW8qBFfVN3/wx/ALLaMQbcxXD6atr8iTzuUpdpD/wglGDyog8iWCxXZTbwe+eUV9 o6/1PCW5QttkvsO3gGBXNqoPm5l1P+nJUoGYT9kem44jYYJmma3Byl652wGYgiBhDn L+0hg/0pJb+4kVg1BkcYAQ9Rjof3pJ3BcW0IOgBIxeeRzi8g8SL7sV3wQMq5JrThoM KmYMp17cOTNTA== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 5/6] Squash to "mptcp: add sched_data helpers" Date: Wed, 18 Sep 2024 16:25:17 +0800 Message-ID: X-Mailer: git-send-email 2.43.0 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 Use __bpf_kfunc_start_defs and __bpf_kfunc_end_defs. Drop bpf_mptcp_subflow_ctx_by_pos declaration. Signed-off-by: Geliang Tang --- net/mptcp/bpf.c | 6 ++---- net/mptcp/protocol.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c index 6414824402e6..4854421730a9 100644 --- a/net/mptcp/bpf.c +++ b/net/mptcp/bpf.c @@ -201,9 +201,7 @@ static const struct btf_kfunc_id_set bpf_mptcp_fmodret_= set =3D { .set =3D &bpf_mptcp_fmodret_ids, }; =20 -__diag_push(); -__diag_ignore_all("-Wmissing-prototypes", - "kfuncs which will be used in BPF programs"); +__bpf_kfunc_start_defs(); =20 __bpf_kfunc struct mptcp_subflow_context * bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned= int pos) @@ -218,7 +216,7 @@ __bpf_kfunc bool bpf_mptcp_subflow_queues_empty(struct = sock *sk) return tcp_rtx_queue_empty(sk); } =20 -__diag_pop(); +__bpf_kfunc_end_defs(); =20 BTF_KFUNCS_START(bpf_mptcp_sched_kfunc_ids) BTF_ID_FLAGS(func, mptcp_subflow_set_scheduled) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index c3942416fa3a..d864c8ccf316 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -722,8 +722,6 @@ void mptcp_sock_graft(struct sock *sk, struct socket *p= arent); u64 mptcp_wnd_end(const struct mptcp_sock *msk); void mptcp_set_timeout(struct sock *sk); bool bpf_mptcp_subflow_queues_empty(struct sock *sk); -struct mptcp_subflow_context * -bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned= int pos); struct sock *__mptcp_nmpc_sk(struct mptcp_sock *msk); bool __mptcp_close(struct sock *sk, long timeout); void mptcp_cancel_work(struct sock *sk); --=20 2.43.0 From nobody Sat Dec 21 15:09:24 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 1A3AE4A1D for ; Wed, 18 Sep 2024 08:25:36 +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=1726647936; cv=none; b=pU2oDfBVY8y/Zz3lbj5C4VcvxeH4mzNxOv0AC2SIhqjy1hDWrpRBwNr19oEH5t+E9cnxDh9IOsg/jmj5QJWkB8CK90knzZ/IfpqkeLq6o2suNK14hpv+4rYDIsIlkEeV+kPKrsk9H45Y0wQ4uYtZinHqtHvY8jy0vxi+w9/dTSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726647936; c=relaxed/simple; bh=NMOtzIOCOETa0fpcP9kKo8rqzMY7RmWa6x2jUA8URDU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aJMixR/xeTLloeoyLcp8XPMwAAEAM+JcfFjCExPpN6zjc4VQFG9g4ptBs2SOJIilGkLITXT8BX7vBvwctrKgpkQjLYcXPGrM9lNPhkBfbPufbElgnFEbgX5K0Au/A95z5TSr0ixcK+oDWNc7d41WddbI6wLNqcxlX+wVoZ1NEfc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gUl36meP; 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="gUl36meP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F34BBC4CEC3; Wed, 18 Sep 2024 08:25:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1726647936; bh=NMOtzIOCOETa0fpcP9kKo8rqzMY7RmWa6x2jUA8URDU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gUl36mePWJw/vkW2LgsxIrqj9DdeNMvIwUnMyFZyBAQHFpQU/N1dQIA94/ks03Hhc /0Cq9PEiVYQw1cKGId8GadADA+N0JvCi2VCe04d3JFz4tTxgj5CV4SfU4CLdQq08zG WVHcBjTxcDvEgcA+b/j1RDWIx7r/RJjZoKGoj86n8oFeWlUgdyoPcLiKSz7DVXLOok OidRDx6aDo4tY+kF9X328RTqo4xJ9yngP2nnDvf36dnufPsxNwXTdLqIFgRlT6P7mD k19FC6WmJg6gjlu/vz8GowFp2dEVlDT4IY8ZsQjD2h8WAJqaeD8ceTM5h94UwSYe+o 0sONfn7+huUAA== From: Geliang Tang To: mptcp@lists.linux.dev Cc: Geliang Tang Subject: [PATCH mptcp-next v2 6/6] Squash to "bpf: Export more bpf_burst related functions" Date: Wed, 18 Sep 2024 16:25:18 +0800 Message-ID: <98a3a4c94ebe9aa31a4e7282c8598ce6592e8fd1.1726647599.git.tanggeliang@kylinos.cn> X-Mailer: git-send-email 2.43.0 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 Drop bpf_mptcp_subflow_queues_empty declaration. Signed-off-by: Geliang Tang --- net/mptcp/protocol.h | 1 - 1 file changed, 1 deletion(-) diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index d864c8ccf316..9df56c21756d 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -721,7 +721,6 @@ void mptcp_subflow_queue_clean(struct sock *sk, struct = sock *ssk); void mptcp_sock_graft(struct sock *sk, struct socket *parent); u64 mptcp_wnd_end(const struct mptcp_sock *msk); void mptcp_set_timeout(struct sock *sk); -bool bpf_mptcp_subflow_queues_empty(struct sock *sk); struct sock *__mptcp_nmpc_sk(struct mptcp_sock *msk); bool __mptcp_close(struct sock *sk, long timeout); void mptcp_cancel_work(struct sock *sk); --=20 2.43.0