Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler: new callback to initiate optimisations #344

Open
Tracked by #350
matttbe opened this issue Feb 1, 2023 · 2 comments
Open
Tracked by #350

scheduler: new callback to initiate optimisations #344

matttbe opened this issue Feb 1, 2023 · 2 comments
Labels
enhancement sched packets scheduler

Comments

@matttbe
Copy link
Member

matttbe commented Feb 1, 2023

Currently, the packet scheduler is only invoked before queuing data and to select the next subflow.

If a packet scheduler wants to do some optimisations ("penalisation", "opportunistic retransmissions", mark subflows as "stale", force probing a subflow, etc.), it will need to react quicker and at different moment: e.g. when MPTCP and TCP congestion windows are being updated, typically when ACK are received, and RTO are fired.

It is important not to limit to MPTCP level events but to TCP level events: e.g. when a TCP ACK is received (at subflow level): RTT has maybe changed, maybe the subflow is no longer "stale". This is probably linked to #343.

@matttbe matttbe added enhancement sched packets scheduler labels Feb 1, 2023
@sferlin
Copy link

sferlin commented May 2, 2023

When would you add such a callback? As we are talking about updates on the TCP level that happen at least 1x/RTT, by the time, you have RTT measurements on the MPTCP level and you could perform "optimisations" on sub-RTT level. Assuming that the multipath scheduler would operate with some knowledge about the RTT of the subflows, you could have such callbacks operating with this granularity.

Potential corner case:
If you want to set a subflow to "stale" and there is data inflight. In MPTCP, (afaicr) you can ack data from different subflows i.e. not only the subflow that has sent the data. This might or might not be a problem, which needs some investigation.

@matttbe
Copy link
Member Author

matttbe commented Jun 2, 2023

Hi @sferlin,

For the moment, a new packet scheduler will only be invoked before queuing data and to select the next subflow. That's not enough to take decisions like optimisations, etc. It should be called more often: not regularly (a new scheduler can do that without the help from the core) but in case of events like RTO, subflow events, etc. From there, the scheduler can also record the time since the last optimisation and decide not to do anything, e.g. to do something at a rate of max 1 RTT.

(I'm not sure I'm replying to your question, don't hesitate if I don't)

geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 12, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 13, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 13, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 13, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 15, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 16, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 16, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 16, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 16, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 16, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 19, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 20, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 20, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 21, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 21, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 22, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 22, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 22, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 22, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 23, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 24, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 25, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Mar 29, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 7, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 7, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 7, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 7, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 10, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 10, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 11, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 11, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 12, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 13, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 13, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 14, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 15, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 15, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 18, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
matttbe pushed a commit that referenced this issue May 20, 2024
Recent additions in BPF like cpu v4 instructions, test_bpf module
exhibits the following failures:

  test_bpf: #82 ALU_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
  test_bpf: #83 ALU_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
  test_bpf: #84 ALU64_MOVSX | BPF_B jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
  test_bpf: #85 ALU64_MOVSX | BPF_H jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)
  test_bpf: #86 ALU64_MOVSX | BPF_W jited:1 ret 2 != 1 (0x2 != 0x1)FAIL (1 times)

  test_bpf: #165 ALU_SDIV_X: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times)
  test_bpf: #166 ALU_SDIV_K: -6 / 2 = -3 jited:1 ret 2147483645 != -3 (0x7ffffffd != 0xfffffffd)FAIL (1 times)

  test_bpf: #169 ALU_SMOD_X: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times)
  test_bpf: #170 ALU_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times)

  test_bpf: #172 ALU64_SMOD_K: -7 % 2 = -1 jited:1 ret 1 != -1 (0x1 != 0xffffffff)FAIL (1 times)

  test_bpf: #313 BSWAP 16: 0x0123456789abcdef -> 0xefcd
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 301 PASS
  test_bpf: #314 BSWAP 32: 0x0123456789abcdef -> 0xefcdab89
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 555 PASS
  test_bpf: #315 BSWAP 64: 0x0123456789abcdef -> 0x67452301
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 268 PASS
  test_bpf: #316 BSWAP 64: 0x0123456789abcdef >> 32 -> 0xefcdab89
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 269 PASS
  test_bpf: #317 BSWAP 16: 0xfedcba9876543210 -> 0x1032
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 460 PASS
  test_bpf: #318 BSWAP 32: 0xfedcba9876543210 -> 0x10325476
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 320 PASS
  test_bpf: #319 BSWAP 64: 0xfedcba9876543210 -> 0x98badcfe
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 222 PASS
  test_bpf: #320 BSWAP 64: 0xfedcba9876543210 >> 32 -> 0x10325476
  eBPF filter opcode 00d7 (@2) unsupported
  jited:0 273 PASS

  test_bpf: #344 BPF_LDX_MEMSX | BPF_B
  eBPF filter opcode 0091 (@5) unsupported
  jited:0 432 PASS
  test_bpf: #345 BPF_LDX_MEMSX | BPF_H
  eBPF filter opcode 0089 (@5) unsupported
  jited:0 381 PASS
  test_bpf: #346 BPF_LDX_MEMSX | BPF_W
  eBPF filter opcode 0081 (@5) unsupported
  jited:0 505 PASS

  test_bpf: #490 JMP32_JA: Unconditional jump: if (true) return 1
  eBPF filter opcode 0006 (@1) unsupported
  jited:0 261 PASS

  test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed]

Fix them by adding missing processing.

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/91de862dda99d170697eb79ffb478678af7e0b27.1709652689.git.christophe.leroy@csgroup.eu
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 22, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 23, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 23, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 24, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 27, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 29, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 29, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 29, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 29, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 30, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 30, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue May 31, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
geliangtang added a commit to geliangtang/mptcp_net-next that referenced this issue Jun 4, 2024
This patch adds a new interface data_init() for struct mptcp_sched_ops.
It's a new callback to initiate optimisations.

Closes: multipath-tcp#344
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
matttbe pushed a commit that referenced this issue Jul 10, 2024
Add a test case which replaces an active ingress qdisc while keeping the
miniq in-tact during the transition period to the new clsact qdisc.

  # ./vmtest.sh -- ./test_progs -t tc_link
  [...]
  ./test_progs -t tc_link
  [    3.412871] bpf_testmod: loading out-of-tree module taints kernel.
  [    3.413343] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
  #332     tc_links_after:OK
  #333     tc_links_append:OK
  #334     tc_links_basic:OK
  #335     tc_links_before:OK
  #336     tc_links_chain_classic:OK
  #337     tc_links_chain_mixed:OK
  #338     tc_links_dev_chain0:OK
  #339     tc_links_dev_cleanup:OK
  #340     tc_links_dev_mixed:OK
  #341     tc_links_ingress:OK
  #342     tc_links_invalid:OK
  #343     tc_links_prepend:OK
  #344     tc_links_replace:OK
  #345     tc_links_revision:OK
  Summary: 14/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20240708133130.11609-2-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement sched packets scheduler
Projects
Status: Needs triage
Development

No branches or pull requests

2 participants