Documentation/networking/mptcp-sysctl.rst | 8 + MAINTAINERS | 1 + include/linux/bpf.h | 1 + include/linux/btf_ids.h | 3 +- include/net/mptcp.h | 25 ++ include/uapi/linux/bpf.h | 7 + kernel/bpf/bpf_struct_ops_types.h | 4 + kernel/bpf/verifier.c | 1 + kernel/trace/bpf_trace.c | 2 + net/core/filter.c | 18 + net/mptcp/Makefile | 4 +- net/mptcp/bpf.c | 175 ++++++++ net/mptcp/ctrl.c | 14 + net/mptcp/protocol.c | 32 +- net/mptcp/protocol.h | 12 + net/mptcp/sched.c | 141 +++++++ scripts/bpf_doc.py | 2 + tools/include/uapi/linux/bpf.h | 7 + tools/testing/selftests/bpf/bpf_tcp_helpers.h | 32 ++ tools/testing/selftests/bpf/config | 3 + tools/testing/selftests/bpf/network_helpers.c | 43 +- tools/testing/selftests/bpf/network_helpers.h | 4 + .../testing/selftests/bpf/prog_tests/mptcp.c | 378 ++++++++++++++++++ .../selftests/bpf/progs/mptcp_bpf_first.c | 32 ++ .../testing/selftests/bpf/progs/mptcp_sock.c | 82 ++++ 25 files changed, 1002 insertions(+), 29 deletions(-) create mode 100644 net/mptcp/bpf.c create mode 100644 net/mptcp/sched.c create mode 100644 tools/testing/selftests/bpf/prog_tests/mptcp.c create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_first.c create mode 100644 tools/testing/selftests/bpf/progs/mptcp_sock.c
v2: - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features net-next-next") on export/20220510T054929 v1: - drop bpf_mptcp_helpers.h (Andrii) - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) Geliang Tang (13): bpf: add bpf_skc_to_mptcp_sock_proto selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config selftests/bpf: test bpf_skc_to_mptcp_sock selftests/bpf: verify token of struct mptcp_sock selftests/bpf: verify ca_name of struct mptcp_sock selftests/bpf: verify first of struct mptcp_sock mptcp: add struct mptcp_sched_ops mptcp: add a new sysctl scheduler mptcp: add sched in mptcp_sock mptcp: add get_subflow wrappers mptcp: add bpf_mptcp_sched_ops selftests/bpf: add bpf_first scheduler selftests/bpf: add bpf_first test Nicolas Rybowski (1): selftests/bpf: add MPTCP test base Documentation/networking/mptcp-sysctl.rst | 8 + MAINTAINERS | 1 + include/linux/bpf.h | 1 + include/linux/btf_ids.h | 3 +- include/net/mptcp.h | 25 ++ include/uapi/linux/bpf.h | 7 + kernel/bpf/bpf_struct_ops_types.h | 4 + kernel/bpf/verifier.c | 1 + kernel/trace/bpf_trace.c | 2 + net/core/filter.c | 18 + net/mptcp/Makefile | 4 +- net/mptcp/bpf.c | 175 ++++++++ net/mptcp/ctrl.c | 14 + net/mptcp/protocol.c | 32 +- net/mptcp/protocol.h | 12 + net/mptcp/sched.c | 141 +++++++ scripts/bpf_doc.py | 2 + tools/include/uapi/linux/bpf.h | 7 + tools/testing/selftests/bpf/bpf_tcp_helpers.h | 32 ++ tools/testing/selftests/bpf/config | 3 + tools/testing/selftests/bpf/network_helpers.c | 43 +- tools/testing/selftests/bpf/network_helpers.h | 4 + .../testing/selftests/bpf/prog_tests/mptcp.c | 378 ++++++++++++++++++ .../selftests/bpf/progs/mptcp_bpf_first.c | 32 ++ .../testing/selftests/bpf/progs/mptcp_sock.c | 82 ++++ 25 files changed, 1002 insertions(+), 29 deletions(-) create mode 100644 net/mptcp/bpf.c create mode 100644 net/mptcp/sched.c create mode 100644 tools/testing/selftests/bpf/prog_tests/mptcp.c create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_first.c create mode 100644 tools/testing/selftests/bpf/progs/mptcp_sock.c -- 2.34.1
Hi Geliang, Mat On 11/05/2022 09:56, Geliang Tang wrote: > v2: > - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > > base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > net-next-next") on export/20220510T054929 > > v1: > - drop bpf_mptcp_helpers.h (Andrii) > - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) Thank you for the patches. I *think* everything is now sync in our tree but feel free to check because I had to "manually" compare patches with what was in our tree. But in theory, our tree is now ready for a v5. - 82041505ae27: tg:msg: changelog v4 - a59272c197c5: selftests/bpf: add MPTCP test base - e30677603c0a: Squash to "selftests/bpf: add MPTCP test base" - 79399587d58f: tg:msg: changelog v4 - b0d947191559: selftests/bpf: verify token of struct mptcp_sock - d84ab981b155: conflict in t/selftests-bpf-verify-first-of-struct-mptcp_sock - 0c8b3a796796: conflict in t/selftests-bpf-test-bpf_skc_to_mptcp_sock - Results: 7809acd805cf..a4159e050cd2 (export) Builds and tests are now in progress: https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220514T112122 https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net
On Sat, May 14, 2022 at 01:25:35PM +0200, Matthieu Baerts wrote: > Hi Geliang, Mat > > On 11/05/2022 09:56, Geliang Tang wrote: > > v2: > > - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > > - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > > > > base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > > net-next-next") on export/20220510T054929 > > > > v1: > > - drop bpf_mptcp_helpers.h (Andrii) > > - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) > > Thank you for the patches. > > I *think* everything is now sync in our tree but feel free to check > because I had to "manually" compare patches with what was in our tree. > > But in theory, our tree is now ready for a v5. Thanks Matt, but three patches still need to be updated: Patch #4, selftests/bpf: test bpf_skc_to_mptcp_sock if (!tcp_sk->is_mptcp) { -> if (!is_mptcp) { Patch #10, mptcp: add sched in mptcp_sock struct mptcp_sock { struct inet_connection_sock sk; - __u32 token; - struct sock *first; - char ca_name[TCP_CA_NAME_MAX]; + __u32 token; + struct sock *first; + struct mptcp_sched_ops *sched; + char ca_name[TCP_CA_NAME_MAX]; } __attribute__((preserve_access_index)); -> __u32 token; struct sock *first; + struct mptcp_sched_ops *sched; char ca_name[TCP_CA_NAME_MAX]; } __attribute__((preserve_access_index)); Patch #13, selftests/bpf: add bpf_first scheduler bpf_mptcp_helpers.h -> bpf_tcp_helpers.h Thanks, -Geliang > > - 82041505ae27: tg:msg: changelog v4 > - a59272c197c5: selftests/bpf: add MPTCP test base > - e30677603c0a: Squash to "selftests/bpf: add MPTCP test base" > - 79399587d58f: tg:msg: changelog v4 > - b0d947191559: selftests/bpf: verify token of struct mptcp_sock > - d84ab981b155: conflict in > t/selftests-bpf-verify-first-of-struct-mptcp_sock > - 0c8b3a796796: conflict in t/selftests-bpf-test-bpf_skc_to_mptcp_sock > - Results: 7809acd805cf..a4159e050cd2 (export) > > Builds and tests are now in progress: > > https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220514T112122 > https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export > > Cheers, > Matt > -- > Tessares | Belgium | Hybrid Access Solutions > www.tessares.net >
Hi Geliang, On 14/05/2022 17:48, Geliang Tang wrote: > On Sat, May 14, 2022 at 01:25:35PM +0200, Matthieu Baerts wrote: >> Hi Geliang, Mat >> >> On 11/05/2022 09:56, Geliang Tang wrote: >>> v2: >>> - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) >>> - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) >>> >>> base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features >>> net-next-next") on export/20220510T054929 >>> >>> v1: >>> - drop bpf_mptcp_helpers.h (Andrii) >>> - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) >> >> Thank you for the patches. >> >> I *think* everything is now sync in our tree but feel free to check >> because I had to "manually" compare patches with what was in our tree. >> >> But in theory, our tree is now ready for a v5. > > Thanks Matt, but three patches still need to be updated: > > Patch #4, selftests/bpf: test bpf_skc_to_mptcp_sock > > if (!tcp_sk->is_mptcp) { > > -> > > if (!is_mptcp) { Thank you, I missed that! - a973ee164a70 tg: fix wrong merge conflict resolution > Patch #10, mptcp: add sched in mptcp_sock > > struct mptcp_sock { > struct inet_connection_sock sk; > > - __u32 token; > - struct sock *first; > - char ca_name[TCP_CA_NAME_MAX]; > + __u32 token; > + struct sock *first; > + struct mptcp_sched_ops *sched; > + char ca_name[TCP_CA_NAME_MAX]; > } __attribute__((preserve_access_index)); > > -> > > __u32 token; > struct sock *first; > + struct mptcp_sched_ops *sched; > char ca_name[TCP_CA_NAME_MAX]; > } __attribute__((preserve_access_index)); I did that on purpose, I thought it was clearer to read after. Do you prefer not to change the alignment? > Patch #13, selftests/bpf: add bpf_first scheduler > > bpf_mptcp_helpers.h > > -> > > bpf_tcp_helpers.h Thanks! - fc2aafca4737: bpf: use bpf_tcp_helpers.h instead of the mptcp one Cheers, Matt -- Tessares | Belgium | Hybrid Access Solutions www.tessares.net
Matthieu Baerts <matthieu.baerts@tessares.net> 于2022年5月15日周日 00:31写道: > > Hi Geliang, > > On 14/05/2022 17:48, Geliang Tang wrote: > > On Sat, May 14, 2022 at 01:25:35PM +0200, Matthieu Baerts wrote: > >> Hi Geliang, Mat > >> > >> On 11/05/2022 09:56, Geliang Tang wrote: > >>> v2: > >>> - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > >>> - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > >>> > >>> base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > >>> net-next-next") on export/20220510T054929 > >>> > >>> v1: > >>> - drop bpf_mptcp_helpers.h (Andrii) > >>> - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) > >> > >> Thank you for the patches. > >> > >> I *think* everything is now sync in our tree but feel free to check > >> because I had to "manually" compare patches with what was in our tree. > >> > >> But in theory, our tree is now ready for a v5. > > > > Thanks Matt, but three patches still need to be updated: > > > > Patch #4, selftests/bpf: test bpf_skc_to_mptcp_sock > > > > if (!tcp_sk->is_mptcp) { > > > > -> > > > > if (!is_mptcp) { > > Thank you, I missed that! > > - a973ee164a70 tg: fix wrong merge conflict resolution Hi Matt, Here should be: if (!is_mptcp) { not: if (is_mptcp) { Otherwise, the mptcp bpf selftests failed. I just sent a squash-to patch to fix this. Thanks, -Geliang > > > Patch #10, mptcp: add sched in mptcp_sock > > > > struct mptcp_sock { > > struct inet_connection_sock sk; > > > > - __u32 token; > > - struct sock *first; > > - char ca_name[TCP_CA_NAME_MAX]; > > + __u32 token; > > + struct sock *first; > > + struct mptcp_sched_ops *sched; > > + char ca_name[TCP_CA_NAME_MAX]; > > } __attribute__((preserve_access_index)); > > > > -> > > > > __u32 token; > > struct sock *first; > > + struct mptcp_sched_ops *sched; > > char ca_name[TCP_CA_NAME_MAX]; > > } __attribute__((preserve_access_index)); > > I did that on purpose, I thought it was clearer to read after. > > Do you prefer not to change the alignment? > > > Patch #13, selftests/bpf: add bpf_first scheduler > > > > bpf_mptcp_helpers.h > > > > -> > > > > bpf_tcp_helpers.h > > Thanks! > > - fc2aafca4737: bpf: use bpf_tcp_helpers.h instead of the mptcp one > > Cheers, > Matt > -- > Tessares | Belgium | Hybrid Access Solutions > www.tessares.net >
Hi Matt, Matthieu Baerts <matthieu.baerts@tessares.net> 于2022年5月15日周日 00:31写道: > > Hi Geliang, > > On 14/05/2022 17:48, Geliang Tang wrote: > > On Sat, May 14, 2022 at 01:25:35PM +0200, Matthieu Baerts wrote: > >> Hi Geliang, Mat > >> > >> On 11/05/2022 09:56, Geliang Tang wrote: > >>> v2: > >>> - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > >>> - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > >>> > >>> base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > >>> net-next-next") on export/20220510T054929 > >>> > >>> v1: > >>> - drop bpf_mptcp_helpers.h (Andrii) > >>> - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) > >> > >> Thank you for the patches. > >> > >> I *think* everything is now sync in our tree but feel free to check > >> because I had to "manually" compare patches with what was in our tree. > >> > >> But in theory, our tree is now ready for a v5. > > > > Thanks Matt, but three patches still need to be updated: > > > > Patch #4, selftests/bpf: test bpf_skc_to_mptcp_sock > > > > if (!tcp_sk->is_mptcp) { > > > > -> > > > > if (!is_mptcp) { > > Thank you, I missed that! > > - a973ee164a70 tg: fix wrong merge conflict resolution > > > Patch #10, mptcp: add sched in mptcp_sock > > > > struct mptcp_sock { > > struct inet_connection_sock sk; > > > > - __u32 token; > > - struct sock *first; > > - char ca_name[TCP_CA_NAME_MAX]; > > + __u32 token; > > + struct sock *first; > > + struct mptcp_sched_ops *sched; > > + char ca_name[TCP_CA_NAME_MAX]; > > } __attribute__((preserve_access_index)); > > > > -> > > > > __u32 token; > > struct sock *first; > > + struct mptcp_sched_ops *sched; > > char ca_name[TCP_CA_NAME_MAX]; > > } __attribute__((preserve_access_index)); > > I did that on purpose, I thought it was clearer to read after. > > Do you prefer not to change the alignment? Yes, I prefer not to change the alignments, it's much easier. If we want to change them, it's better to squash the changes into the original patches. Thanks, -Geliang > > > Patch #13, selftests/bpf: add bpf_first scheduler > > > > bpf_mptcp_helpers.h > > > > -> > > > > bpf_tcp_helpers.h > > Thanks! > > - fc2aafca4737: bpf: use bpf_tcp_helpers.h instead of the mptcp one > > Cheers, > Matt > -- > Tessares | Belgium | Hybrid Access Solutions > www.tessares.net >
Geliang Tang <geliangtang@gmail.com> 于2022年5月15日周日 00:46写道: > > Hi Matt, > > Matthieu Baerts <matthieu.baerts@tessares.net> 于2022年5月15日周日 00:31写道: > > > > Hi Geliang, > > > > On 14/05/2022 17:48, Geliang Tang wrote: > > > On Sat, May 14, 2022 at 01:25:35PM +0200, Matthieu Baerts wrote: > > >> Hi Geliang, Mat > > >> > > >> On 11/05/2022 09:56, Geliang Tang wrote: > > >>> v2: > > >>> - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > > >>> - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > > >>> > > >>> base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > > >>> net-next-next") on export/20220510T054929 > > >>> > > >>> v1: > > >>> - drop bpf_mptcp_helpers.h (Andrii) > > >>> - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) > > >> > > >> Thank you for the patches. > > >> > > >> I *think* everything is now sync in our tree but feel free to check > > >> because I had to "manually" compare patches with what was in our tree. > > >> > > >> But in theory, our tree is now ready for a v5. > > > > > > Thanks Matt, but three patches still need to be updated: > > > > > > Patch #4, selftests/bpf: test bpf_skc_to_mptcp_sock > > > > > > if (!tcp_sk->is_mptcp) { > > > > > > -> > > > > > > if (!is_mptcp) { > > > > Thank you, I missed that! > > > > - a973ee164a70 tg: fix wrong merge conflict resolution > > > > > Patch #10, mptcp: add sched in mptcp_sock > > > > > > struct mptcp_sock { > > > struct inet_connection_sock sk; > > > > > > - __u32 token; > > > - struct sock *first; > > > - char ca_name[TCP_CA_NAME_MAX]; > > > + __u32 token; > > > + struct sock *first; > > > + struct mptcp_sched_ops *sched; > > > + char ca_name[TCP_CA_NAME_MAX]; > > > } __attribute__((preserve_access_index)); > > > > > > -> > > > > > > __u32 token; > > > struct sock *first; > > > + struct mptcp_sched_ops *sched; > > > char ca_name[TCP_CA_NAME_MAX]; > > > } __attribute__((preserve_access_index)); > > > > I did that on purpose, I thought it was clearer to read after. > > > > Do you prefer not to change the alignment? > > Yes, I prefer not to change the alignments, it's much easier. If we > want to change them, it's better to squash the changes into the > original patches. Hi Matt & Mat, I think it's better to keep the alignment of members of mptcp_sock in bpf_tcp_helpers.h as the same as the alignment of mptcp_sock in net/mptcp/protocol.h. So I just sent a squash-to patch in our ML to fix this. Anyway, bpf patches in our tree are now ready for a bpf-next v5. Thanks, -Geliang > > Thanks, > -Geliang > > > > > > Patch #13, selftests/bpf: add bpf_first scheduler > > > > > > bpf_mptcp_helpers.h > > > > > > -> > > > > > > bpf_tcp_helpers.h > > > > Thanks! > > > > - fc2aafca4737: bpf: use bpf_tcp_helpers.h instead of the mptcp one > > > > Cheers, > > Matt > > -- > > Tessares | Belgium | Hybrid Access Solutions > > www.tessares.net > >
On Wed, 11 May 2022, Geliang Tang wrote: > v2: > - drop "bpf: expose is_mptcp flag to bpf_tcp_sock" (Martin & Andrii) > - patch 3, use is_mptcp in tcp_sock, instead of bpf_tcp_sock (Martin & Andrii) > > base-commit: bcf89bc9c28e ("DO-NOT-MERGE: git markup: features > net-next-next") on export/20220510T054929 > These look good to replace the equivalent patches in the export branch. Thanks Geliang. - Mat > v1: > - drop bpf_mptcp_helpers.h (Andrii) > - patch 6, skip the test if 'ip mptcp monitor' is not supported (Mat) > > Geliang Tang (13): > bpf: add bpf_skc_to_mptcp_sock_proto > selftests/bpf: Enable CONFIG_IKCONFIG_PROC in config > selftests/bpf: test bpf_skc_to_mptcp_sock > selftests/bpf: verify token of struct mptcp_sock > selftests/bpf: verify ca_name of struct mptcp_sock > selftests/bpf: verify first of struct mptcp_sock > mptcp: add struct mptcp_sched_ops > mptcp: add a new sysctl scheduler > mptcp: add sched in mptcp_sock > mptcp: add get_subflow wrappers > mptcp: add bpf_mptcp_sched_ops > selftests/bpf: add bpf_first scheduler > selftests/bpf: add bpf_first test > > Nicolas Rybowski (1): > selftests/bpf: add MPTCP test base > > Documentation/networking/mptcp-sysctl.rst | 8 + > MAINTAINERS | 1 + > include/linux/bpf.h | 1 + > include/linux/btf_ids.h | 3 +- > include/net/mptcp.h | 25 ++ > include/uapi/linux/bpf.h | 7 + > kernel/bpf/bpf_struct_ops_types.h | 4 + > kernel/bpf/verifier.c | 1 + > kernel/trace/bpf_trace.c | 2 + > net/core/filter.c | 18 + > net/mptcp/Makefile | 4 +- > net/mptcp/bpf.c | 175 ++++++++ > net/mptcp/ctrl.c | 14 + > net/mptcp/protocol.c | 32 +- > net/mptcp/protocol.h | 12 + > net/mptcp/sched.c | 141 +++++++ > scripts/bpf_doc.py | 2 + > tools/include/uapi/linux/bpf.h | 7 + > tools/testing/selftests/bpf/bpf_tcp_helpers.h | 32 ++ > tools/testing/selftests/bpf/config | 3 + > tools/testing/selftests/bpf/network_helpers.c | 43 +- > tools/testing/selftests/bpf/network_helpers.h | 4 + > .../testing/selftests/bpf/prog_tests/mptcp.c | 378 ++++++++++++++++++ > .../selftests/bpf/progs/mptcp_bpf_first.c | 32 ++ > .../testing/selftests/bpf/progs/mptcp_sock.c | 82 ++++ > 25 files changed, 1002 insertions(+), 29 deletions(-) > create mode 100644 net/mptcp/bpf.c > create mode 100644 net/mptcp/sched.c > create mode 100644 tools/testing/selftests/bpf/prog_tests/mptcp.c > create mode 100644 tools/testing/selftests/bpf/progs/mptcp_bpf_first.c > create mode 100644 tools/testing/selftests/bpf/progs/mptcp_sock.c > > -- > 2.34.1 > > > -- Mat Martineau Intel
© 2016 - 2024 Red Hat, Inc.