Message ID | fe22b329dce74ee3a740af5ba669a2d6693369dc.1741226722.git.tanggeliang@kylinos.cn (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | 16789699fd1b503ee7befee51f9a558f85ae1e5b |
Delegated to: | Matthieu Baerts |
Headers | show |
Series | cleanups for bpf schedulers | expand |
Context | Check | Description |
---|---|---|
matttbe/build | success | Build and static analysis OK |
matttbe/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 36 lines checked |
matttbe/shellcheck | success | MPTCP selftests files have not been modified |
matttbe/KVM_Validation__normal | success | Success! ✅ |
matttbe/KVM_Validation__debug | success | Success! ✅ |
matttbe/KVM_Validation__btf-normal__only_bpftest_all_ | success | Success! ✅ |
matttbe/KVM_Validation__btf-debug__only_bpftest_all_ | success | Success! ✅ |
diff --git a/tools/testing/selftests/bpf/prog_tests/mptcp.c b/tools/testing/selftests/bpf/prog_tests/mptcp.c index c069c08371e4..0951313b1189 100644 --- a/tools/testing/selftests/bpf/prog_tests/mptcp.c +++ b/tools/testing/selftests/bpf/prog_tests/mptcp.c @@ -741,7 +741,7 @@ static void test_burst(void) if (!ASSERT_OK(mptcp_bpf_burst__load(skel), "load: burst")) goto skel_destroy; - test_bpf_sched(skel->obj, "burst", WITH_DATA, WITH_DATA); + test_bpf_sched(skel->maps.burst, "burst", WITH_DATA, WITH_DATA); skel_destroy: mptcp_bpf_burst__destroy(skel); } diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c b/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c index 6d930ff0f09f..693fab55f7be 100644 --- a/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c +++ b/tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c @@ -9,6 +9,10 @@ char _license[] SEC("license") = "GPL"; #define MPTCP_SEND_BURST_SIZE 65428 +#define SSK_MODE_ACTIVE 0 +#define SSK_MODE_BACKUP 1 +#define SSK_MODE_MAX 2 + #define min(a, b) ((a) < (b) ? (a) : (b)) extern bool mptcp_subflow_active(struct mptcp_subflow_context *subflow) __ksym; @@ -18,10 +22,6 @@ extern bool bpf_sk_stream_memory_free(const struct sock *sk) __ksym; extern bool bpf_mptcp_subflow_queues_empty(struct sock *sk) __ksym; extern void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk) __ksym; -#define SSK_MODE_ACTIVE 0 -#define SSK_MODE_BACKUP 1 -#define SSK_MODE_MAX 2 - static __always_inline __u64 div_u64(__u64 dividend, __u32 divisor) { return dividend / divisor; @@ -163,7 +163,7 @@ int BPF_PROG(bpf_burst_get_retrans, struct mptcp_sock *msk) return 0; } -SEC(".struct_ops") +SEC(".struct_ops.link") struct mptcp_sched_ops burst = { .init = (void *)mptcp_sched_burst_init, .release = (void *)mptcp_sched_burst_release,