diff mbox series

[mptcp-next,v2,2/3] Squash to "bpf: Export mptcp packet scheduler helpers"

Message ID 02394532426ceb8b5d9baa3d6ed25c1dfe60208c.1729765157.git.tanggeliang@kylinos.cn (mailing list archive)
State Superseded, archived
Headers show
Series Fixes for "use bpf_iter in bpf schedulers" v8 | expand

Checks

Context Check Description
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 19 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/build warning Build error with: make C=1 net/mptcp/bpf.o

Commit Message

Geliang Tang Oct. 24, 2024, 10:22 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

Should use mptcp_stream_memory_free in burst scheduler, not
tcp_stream_memory_free. Add a wrapper for it.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 net/mptcp/bpf.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index 13bdcbe34e1f..72d8be2f3853 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -284,6 +284,11 @@  __bpf_kfunc static void bpf_mptcp_sock_release(struct mptcp_sock *msk)
 	WARN_ON_ONCE(!sk || !refcount_dec_not_one(&sk->sk_refcnt));
 }
 
+__bpf_kfunc bool bpf_mptcp_stream_memory_free(const struct sock *sk, int wake)
+{
+	return mptcp_stream_memory_free(sk, wake);
+}
+
 __bpf_kfunc static bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
 {
 	return tcp_rtx_queue_empty(sk);
@@ -311,7 +316,7 @@  BTF_KFUNCS_START(bpf_mptcp_sched_kfunc_ids)
 BTF_ID_FLAGS(func, mptcp_subflow_active)
 BTF_ID_FLAGS(func, mptcp_set_timeout)
 BTF_ID_FLAGS(func, mptcp_wnd_end)
-BTF_ID_FLAGS(func, tcp_stream_memory_free)
+BTF_ID_FLAGS(func, bpf_mptcp_stream_memory_free)
 BTF_ID_FLAGS(func, bpf_mptcp_subflow_queues_empty)
 BTF_ID_FLAGS(func, mptcp_pm_subflow_chk_stale)
 BTF_KFUNCS_END(bpf_mptcp_sched_kfunc_ids)