mbox series

[bpf-next,0/4] selftests/bpf: new MPTCP subflow subtest & improvements

Message ID 20240507-upstream-bpf-next-20240506-mptcp-subflow-test-v1-0-e2bcbdf49857@kernel.org (mailing list archive)
Headers show
Series selftests/bpf: new MPTCP subflow subtest & improvements | expand

Message

Matthieu Baerts May 7, 2024, 10:53 a.m. UTC
In this series from Geliang, modifying MPTCP BPF selftests, we have:

- SIGINT support

- A new macro to reduce duplicated code

- A new MPTCP subflow BPF program setting socket options per subflow: it
  looks better to have this old test program in the BPF selftests to
  track regressions and to serve as example.

  Note: Nicolas is no longer working for Tessares, but he did this work
  while working for them, and his email address is no longer available.

- A new MPTCP BPF subtest validating the new BPF program.

Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Geliang Tang (3):
      selftests/bpf: Handle SIGINT when creating netns
      selftests/bpf: Add RUN_MPTCP_TEST macro
      selftests/bpf: Add mptcp subflow subtest

Nicolas Rybowski (1):
      selftests/bpf: Add mptcp subflow example

 tools/testing/selftests/bpf/prog_tests/mptcp.c    | 127 +++++++++++++++++++++-
 tools/testing/selftests/bpf/progs/mptcp_subflow.c |  70 ++++++++++++
 2 files changed, 193 insertions(+), 4 deletions(-)
---
base-commit: 329a6720a3ebbc041983b267981ab2cac102de93
change-id: 20240506-upstream-bpf-next-20240506-mptcp-subflow-test-faef6654bfa3

Best regards,

Comments

Matthieu Baerts May 9, 2024, 2:39 p.m. UTC | #1
Hi Geliang,

(only with MPTCP ML in cc)

On 07/05/2024 12:53, Matthieu Baerts (NGI0) wrote:
> In this series from Geliang, modifying MPTCP BPF selftests, we have:
> 
> - SIGINT support
> 
> - A new macro to reduce duplicated code
> 
> - A new MPTCP subflow BPF program setting socket options per subflow: it
>   looks better to have this old test program in the BPF selftests to
>   track regressions and to serve as example.
> 
>   Note: Nicolas is no longer working for Tessares, but he did this work
>   while working for them, and his email address is no longer available.
> 
> - A new MPTCP BPF subtest validating the new BPF program.
> 
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> ---
> Geliang Tang (3):
>       selftests/bpf: Handle SIGINT when creating netns

Regarding this patch, do you mind looking for a new version that is
generic as requested by Alexei, please?

I guess he meant adding a new helper in network_helpers.c doing "ip
netns add" + "signal(SIGINT)" + "open_netns()", and using it everywhere
"ip netns add" + "open_netns()" are used. (I guess you will need another
helper to "close_netns()" + "ip netns del" + remove the signal handler
or the netns name.)
Be careful that sometimes, more than one netns is used.

>       selftests/bpf: Add RUN_MPTCP_TEST macro
>       selftests/bpf: Add mptcp subflow subtest
> 
> Nicolas Rybowski (1):
>       selftests/bpf: Add mptcp subflow example

For your information, I modified our tree to apply comments from Alexei:

New patches for t/upstream:
- 12609b68c8d9: tg:msg: clarify the commit message
- a4ad7c6dee6a: Revert "selftests/bpf: Add RUN_MPTCP_TEST macro"
- f457d8911a38: conflict in t/selftests-bpf-Add-mptcp-subflow-subtest
- 5072ff915f8d: Revert "selftests/bpf: Handle SIGINT when creating netns"
- 9df135860724: conflict in t/selftests-bpf-Add-bpf-scheduler-test
- 8ef1339edc8a: conflict in t/selftests-bpf-add-bpf_first-scheduler
- 2f5ced304cc1: conflict in t/selftests-bpf-Add-bpf_bkup-scheduler
- e9bafe786620: conflict in t/selftests-bpf-Add-bpf_rr-scheduler
- dca93e3c7e9a: conflict in t/selftests-bpf-Add-bpf_red-scheduler
- 5349d85a8c73: conflict in t/selftests-bpf-Add-bpf_burst-scheduler
- Results: 304693999ba6..b74adae98e0d (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/715c505a46ae8394e40fdeb54e0ecea27f95dc5d/checks

I will also modify the tree not to remove MPTCP_SCHED_TEST() macro as
asked by Alexei.

Cheers,
Matt
Matthieu Baerts May 9, 2024, 3:12 p.m. UTC | #2
Hi Geliang,

On 09/05/2024 16:39, Matthieu Baerts wrote:

(...)

> I will also modify the tree not to remove MPTCP_SCHED_TEST() macro as
> asked by Alexei.

Just did:

New patches for t/upstream:
- a9e30246511e: Squash to "selftests/bpf: Add bpf_first scheduler & test"
- f023706acba3: conflict in t/selftests-bpf-Add-bpf_bkup-scheduler
- a8d18a32b4cf: conflict in t/selftests-bpf-Add-bpf_rr-scheduler
- e85440cbea7c: conflict in t/selftests-bpf-Add-bpf_red-scheduler
- be15c1b23526: conflict in t/selftests-bpf-Add-bpf_burst-scheduler
- Results: b74adae98e0d..5bc872cb274e (export)

Tests are now in progress:

- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/b185135fda4d0d1b180a317420cedebcf20c6662/checks

Cheers,
Matt
Geliang Tang May 11, 2024, 9:23 a.m. UTC | #3
On Thu, 2024-05-09 at 16:39 +0200, Matthieu Baerts wrote:
> Hi Geliang,
> 
> (only with MPTCP ML in cc)
> 
> On 07/05/2024 12:53, Matthieu Baerts (NGI0) wrote:
> > In this series from Geliang, modifying MPTCP BPF selftests, we
> > have:
> > 
> > - SIGINT support
> > 
> > - A new macro to reduce duplicated code
> > 
> > - A new MPTCP subflow BPF program setting socket options per
> > subflow: it
> >   looks better to have this old test program in the BPF selftests
> > to
> >   track regressions and to serve as example.
> > 
> >   Note: Nicolas is no longer working for Tessares, but he did this
> > work
> >   while working for them, and his email address is no longer
> > available.
> > 
> > - A new MPTCP BPF subtest validating the new BPF program.
> > 
> > Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> > ---
> > Geliang Tang (3):
> >       selftests/bpf: Handle SIGINT when creating netns
> 
> Regarding this patch, do you mind looking for a new version that is
> generic as requested by Alexei, please?

Sure. I'll send them to BPF ML directly and cc MPTCP ML when I finish.

Thanks,
-Geliang

> 
> I guess he meant adding a new helper in network_helpers.c doing "ip
> netns add" + "signal(SIGINT)" + "open_netns()", and using it
> everywhere
> "ip netns add" + "open_netns()" are used. (I guess you will need
> another
> helper to "close_netns()" + "ip netns del" + remove the signal
> handler
> or the netns name.)
> Be careful that sometimes, more than one netns is used.
> 
> >       selftests/bpf: Add RUN_MPTCP_TEST macro
> >       selftests/bpf: Add mptcp subflow subtest
> > 
> > Nicolas Rybowski (1):
> >       selftests/bpf: Add mptcp subflow example
> 
> For your information, I modified our tree to apply comments from
> Alexei:
> 
> New patches for t/upstream:
> - 12609b68c8d9: tg:msg: clarify the commit message
> - a4ad7c6dee6a: Revert "selftests/bpf: Add RUN_MPTCP_TEST macro"
> - f457d8911a38: conflict in t/selftests-bpf-Add-mptcp-subflow-subtest
> - 5072ff915f8d: Revert "selftests/bpf: Handle SIGINT when creating
> netns"
> - 9df135860724: conflict in t/selftests-bpf-Add-bpf-scheduler-test
> - 8ef1339edc8a: conflict in t/selftests-bpf-add-bpf_first-scheduler
> - 2f5ced304cc1: conflict in t/selftests-bpf-Add-bpf_bkup-scheduler
> - e9bafe786620: conflict in t/selftests-bpf-Add-bpf_rr-scheduler
> - dca93e3c7e9a: conflict in t/selftests-bpf-Add-bpf_red-scheduler
> - 5349d85a8c73: conflict in t/selftests-bpf-Add-bpf_burst-scheduler
> - Results: 304693999ba6..b74adae98e0d (export)
> 
> Tests are now in progress:
> 
> - export:
> https://github.com/multipath-tcp/mptcp_net-next/commit/715c505a46ae8394e40fdeb54e0ecea27f95dc5d/checks
> 
> I will also modify the tree not to remove MPTCP_SCHED_TEST() macro as
> asked by Alexei.
> 
> Cheers,
> Matt