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

Geliang Tang posted 1 patch 1 month, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/93e203493c3ce7a0c7b4e17146baa37a9db2f568.1709626306.git.geliang@kernel.org
net/mptcp/bpf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_kfunc_set"
Posted by Geliang Tang 1 month, 3 weeks ago
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(-)

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
-- 
2.40.1
Re: [PATCH mptcp-next] Squash to "bpf: Add bpf_mptcp_sched_kfunc_set"
Posted by Matthieu Baerts 1 month, 3 weeks ago
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
-- 
Sponsored by the NGI0 Core fund.