[PATCH mptcp-next v3 0/9] BPF packet scheduler updates part 4

Geliang Tang posted 9 patches 8 months ago
Failed in applying to current master (apply log)
net/mptcp/bpf.c                               | 41 +++++++++++----
net/mptcp/protocol.h                          |  6 +--
net/mptcp/sched.c                             | 50 ++++++++-----------
tools/testing/selftests/bpf/bpf_tcp_helpers.h |  5 +-
.../selftests/bpf/progs/mptcp_bpf_bkup.c      |  6 +--
.../selftests/bpf/progs/mptcp_bpf_burst.c     | 30 ++---------
.../selftests/bpf/progs/mptcp_bpf_first.c     |  3 +-
.../selftests/bpf/progs/mptcp_bpf_red.c       |  6 +--
.../selftests/bpf/progs/mptcp_bpf_rr.c        |  9 ++--
9 files changed, 70 insertions(+), 86 deletions(-)
[PATCH mptcp-next v3 0/9] BPF packet scheduler updates part 4
Posted by Geliang Tang 8 months ago
v3:
 - store burst in msk->snd_burst instead of in sk_storage.
 - make mptcp_sched_data_set_contexts static.
 - rename mptcp_subflow_ctx_by_pos to bpf_mptcp_subflow_ctx_by_pos, and
   add "__bpf_kfunc" before it.

v2:
 - keep sched API unchanged.
 - use bpf_sk_storage_lookup to get snd_burst from BPF context.
 - applied after "add bpf_stale scheduler v3" serise.

v1:

There's a bug in bpf_burst. snd_burst stored in mptcp_burst_storage in
BPF context is not used. msk->snd_burst is still used in kernel space.
To fix this, add two new interfaces in mptcp_sched_ops to get and set
scheduler's paramters from BPF context to kernel space.

Geliang Tang (9):
  Squash to "bpf: Export more bpf_burst related functions"
  Squash to "mptcp: add sched_data helpers"
  Squash to "bpf: Add bpf_mptcp_sched_ops"
  Squash to "selftests/bpf: Add mptcp sched structs"
  Squash to "selftests/bpf: Add bpf_first scheduler"
  Squash to "selftests/bpf: Add bpf_bkup scheduler"
  Squash to "selftests/bpf: Add bpf_rr scheduler"
  Squash to "selftests/bpf: Add bpf_red scheduler"
  Squash to "selftests/bpf: Add bpf_burst scheduler"

 net/mptcp/bpf.c                               | 41 +++++++++++----
 net/mptcp/protocol.h                          |  6 +--
 net/mptcp/sched.c                             | 50 ++++++++-----------
 tools/testing/selftests/bpf/bpf_tcp_helpers.h |  5 +-
 .../selftests/bpf/progs/mptcp_bpf_bkup.c      |  6 +--
 .../selftests/bpf/progs/mptcp_bpf_burst.c     | 30 ++---------
 .../selftests/bpf/progs/mptcp_bpf_first.c     |  3 +-
 .../selftests/bpf/progs/mptcp_bpf_red.c       |  6 +--
 .../selftests/bpf/progs/mptcp_bpf_rr.c        |  9 ++--
 9 files changed, 70 insertions(+), 86 deletions(-)

-- 
2.35.3
Re: [PATCH mptcp-next v3 0/9] BPF packet scheduler updates part 4
Posted by Mat Martineau 7 months, 3 weeks ago
On Mon, 4 Sep 2023, Geliang Tang wrote:

> v3:
> - store burst in msk->snd_burst instead of in sk_storage.
> - make mptcp_sched_data_set_contexts static.
> - rename mptcp_subflow_ctx_by_pos to bpf_mptcp_subflow_ctx_by_pos, and
>   add "__bpf_kfunc" before it.
>

Hi Geliang -

Apologies for the delay on reviewing these. The series looks good to 
squash, thanks!

- Mat


> v2:
> - keep sched API unchanged.
> - use bpf_sk_storage_lookup to get snd_burst from BPF context.
> - applied after "add bpf_stale scheduler v3" serise.
>
> v1:
>
> There's a bug in bpf_burst. snd_burst stored in mptcp_burst_storage in
> BPF context is not used. msk->snd_burst is still used in kernel space.
> To fix this, add two new interfaces in mptcp_sched_ops to get and set
> scheduler's paramters from BPF context to kernel space.
>
> Geliang Tang (9):
>  Squash to "bpf: Export more bpf_burst related functions"
>  Squash to "mptcp: add sched_data helpers"
>  Squash to "bpf: Add bpf_mptcp_sched_ops"
>  Squash to "selftests/bpf: Add mptcp sched structs"
>  Squash to "selftests/bpf: Add bpf_first scheduler"
>  Squash to "selftests/bpf: Add bpf_bkup scheduler"
>  Squash to "selftests/bpf: Add bpf_rr scheduler"
>  Squash to "selftests/bpf: Add bpf_red scheduler"
>  Squash to "selftests/bpf: Add bpf_burst scheduler"
>
> net/mptcp/bpf.c                               | 41 +++++++++++----
> net/mptcp/protocol.h                          |  6 +--
> net/mptcp/sched.c                             | 50 ++++++++-----------
> tools/testing/selftests/bpf/bpf_tcp_helpers.h |  5 +-
> .../selftests/bpf/progs/mptcp_bpf_bkup.c      |  6 +--
> .../selftests/bpf/progs/mptcp_bpf_burst.c     | 30 ++---------
> .../selftests/bpf/progs/mptcp_bpf_first.c     |  3 +-
> .../selftests/bpf/progs/mptcp_bpf_red.c       |  6 +--
> .../selftests/bpf/progs/mptcp_bpf_rr.c        |  9 ++--
> 9 files changed, 70 insertions(+), 86 deletions(-)
>
> -- 
> 2.35.3
>
>
>
Re: [PATCH mptcp-next v3 0/9] BPF packet scheduler updates part 4
Posted by Matthieu Baerts 7 months, 2 weeks ago
Hi Geliang, Mat,

On 04/09/2023 11:39, Geliang Tang wrote:
> v3:
>  - store burst in msk->snd_burst instead of in sk_storage.
>  - make mptcp_sched_data_set_contexts static.
>  - rename mptcp_subflow_ctx_by_pos to bpf_mptcp_subflow_ctx_by_pos, and
>    add "__bpf_kfunc" before it.
> 
> v2:
>  - keep sched API unchanged.
>  - use bpf_sk_storage_lookup to get snd_burst from BPF context.
>  - applied after "add bpf_stale scheduler v3" serise.
> 
> v1:
> 
> There's a bug in bpf_burst. snd_burst stored in mptcp_burst_storage in
> BPF context is not used. msk->snd_burst is still used in kernel space.
> To fix this, add two new interfaces in mptcp_sched_ops to get and set
> scheduler's paramters from BPF context to kernel space.

Thank you for the patches and the review!

I just applied these patches in our tree. Please make sure I correctly
fix the different conflicts and I didn't miss any instructions.

New patches for t/upstream:
- 5eed4d815c41: "squashed" patch 1/9 in "bpf: Export more bpf_burst
related functions"
- 764bf652d4bf: "squashed" patch 2/9 (with conflicts) in "mptcp: add
sched_data helpers"
- 9906c014e61a: "squashed" patch 3/9 in "bpf: Add bpf_mptcp_sched_ops"
- 816a6f2cad25: conflict in t/bpf-Add-bpf_mptcp_sched_kfunc_set
- ff8a0c543074: "squashed" patch 4/9 (with conflicts) in "selftests/bpf:
Add mptcp sched structs"
- a0098f3f355d: "squashed" patch 5/9 in "selftests/bpf: Add bpf_first
scheduler"
- d9c7f7c37051: "squashed" patch 6/9 in "selftests/bpf: Add bpf_bkup
scheduler"
- 2e2e1a1bfb70: conflict in t/selftests-bpf-Add-bpf_rr-scheduler
- 6c22024f0008: "squashed" patch 7/9 in "selftests/bpf: Add bpf_rr
scheduler"
- 684e5a0e4824: "squashed" patch 8/9 in "selftests/bpf: Add bpf_red
scheduler"
- 6b458f5734d3: conflict in t/bpf-Export-more-bpf_burst-related-functions
- 24d78ea20a36: "squashed" patch 9/9 in "selftests/bpf: Add bpf_burst
scheduler"
- Results: 6b6b68bc221b..fe720f4b5da8 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20230916T114711

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net