diff mbox series

[mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_kfunc_set"

Message ID 93e203493c3ce7a0c7b4e17146baa37a9db2f568.1709626306.git.geliang@kernel.org (mailing list archive)
State Accepted, archived
Commit c3d85ae04856
Delegated to: Matthieu Baerts
Headers show
Series [mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_kfunc_set" | expand

Checks

Context Check Description
matttbe/build success Build and static analysis OK
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 24 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/KVM_Validation__normal warning Unstable: 2 failed test(s): packetdrill_regressions selftest_mptcp_join
matttbe/KVM_Validation__debug__except_selftest_mptcp_join_ success Success! ✅
matttbe/KVM_Validation__debug__only_selftest_mptcp_join_ warning Unstable: 1 failed test(s): selftest_mptcp_join

Commit Message

Geliang Tang March 5, 2024, 8:12 a.m. UTC
Fix the error reported by CI:

[    2.292207] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[    2.292735] RIP: 0010:register_btf_kfunc_id_set (kernel/bpf/btf.c:8185 (discriminator 1))

Signed-off-by: Geliang Tang <geliang@kernel.org>
---
 net/mptcp/bpf.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

MPTCP CI March 5, 2024, 9:02 a.m. UTC | #1
Hi Geliang,

Thank you for your modifications, that's great!

Our CI (GitHub Action) did some validations and here is its report:

- KVM Validation: normal:
  - Unstable: 2 failed test(s): packetdrill_regressions selftest_mptcp_join 
Matthieu Baerts March 5, 2024, 9:10 a.m. UTC | #2
Hi Geliang,

On 05/03/2024 09:12, Geliang Tang wrote:
> Fix the error reported by CI:
> 
> [    2.292207] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [    2.292735] RIP: 0010:register_btf_kfunc_id_set (kernel/bpf/btf.c:8185 (discriminator 1))

Thank you for this fix! It looks good to me!

Don't forget to add the reference to help to understand why this fixes
the issue ;)

Fixes: 6f3189f38a3e ("bpf: treewide: Annotate BPF kfuncs in BTF")

New patches for t/upstream:
- c3d85ae04856: Squash to "bpf: Add bpf_mptcp_sched_kfunc_set"
- 50df29df70c3: conflict in t/bpf-Export-more-bpf_burst-related-functions
- Results: f438f7163a0b..7aa11e192204 (export)

Tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20240305T090733

Cheers,
Matt
MPTCP CI March 5, 2024, 9:31 a.m. UTC | #3
Hi Geliang,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- KVM Validation: debug (except selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6514107336097792
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6514107336097792/summary/summary.txt

- {"code":404,"message":
  - "Can't find artifacts containing file conclusion.txt"}:
  - Task: https://cirrus-ci.com/task/5290875752808448
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/5290875752808448/summary/summary.txt

Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/29b98e5b5bd5


If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:

    $ cd [kernel source code]
    $ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
        --pull always mptcp/mptcp-upstream-virtme-docker:latest \
        auto-debug

For more details:

    https://github.com/multipath-tcp/mptcp-upstream-virtme-docker


Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)

Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
MPTCP CI March 5, 2024, 10:08 a.m. UTC | #4
Hi Geliang,

Thank you for your modifications, that's great!

Our CI (Cirrus) did some validations with a debug kernel and here is its report:

- KVM Validation: debug (except selftest_mptcp_join):
  - Success! ✅:
  - Task: https://cirrus-ci.com/task/6514107336097792
  - Summary: https://api.cirrus-ci.com/v1/artifact/task/6514107336097792/summary/summary.txt

- KVM Validation: debug (only selftest_mptcp_join):
  - Unstable: 1 failed test(s): selftest_mptcp_join 
diff mbox series

Patch

diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index 6ba531032fce..208e5d3f066f 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -215,7 +215,7 @@  __bpf_kfunc bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
 
 __diag_pop();
 
-BTF_SET8_START(bpf_mptcp_sched_kfunc_ids)
+BTF_KFUNCS_START(bpf_mptcp_sched_kfunc_ids)
 BTF_ID_FLAGS(func, mptcp_subflow_set_scheduled)
 BTF_ID_FLAGS(func, bpf_mptcp_subflow_ctx_by_pos)
 BTF_ID_FLAGS(func, mptcp_subflow_active)
@@ -224,7 +224,7 @@  BTF_ID_FLAGS(func, mptcp_wnd_end)
 BTF_ID_FLAGS(func, tcp_stream_memory_free)
 BTF_ID_FLAGS(func, bpf_mptcp_subflow_queues_empty)
 BTF_ID_FLAGS(func, mptcp_pm_subflow_chk_stale)
-BTF_SET8_END(bpf_mptcp_sched_kfunc_ids)
+BTF_KFUNCS_END(bpf_mptcp_sched_kfunc_ids)
 
 static const struct btf_kfunc_id_set bpf_mptcp_sched_kfunc_set = {
 	.owner	= THIS_MODULE,
@@ -237,7 +237,7 @@  static int __init bpf_mptcp_kfunc_init(void)
 
 	ret = register_btf_fmodret_id_set(&bpf_mptcp_fmodret_set);
 	ret = ret ?: register_btf_kfunc_id_set(BPF_PROG_TYPE_STRUCT_OPS,
-						&bpf_mptcp_sched_kfunc_set);
+					       &bpf_mptcp_sched_kfunc_set);
 #ifdef CONFIG_BPF_JIT
 	ret = ret ?: register_bpf_struct_ops(&bpf_mptcp_sched_ops, mptcp_sched_ops);
 #endif