diff mbox series

[mptcp-next,v2,11/11] mptcp: drop subflow contexts in mptcp_sched_data

Message ID 54a6a158b655f9e19588a1460867316f6d0cef64.1741347233.git.tanggeliang@kylinos.cn (mailing list archive)
State Changes Requested
Headers show
Series add bpf_iter_task | expand

Checks

Context Check Description
matttbe/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
matttbe/shellcheck success MPTCP selftests files have not been modified
matttbe/build success Build and static analysis OK
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! ✅

Commit Message

Geliang Tang March 7, 2025, 11:36 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

The mptcp_subflow_sched bpf_iter is added now, it's better to use the
helper bpf_for_each(mptcp_subflow_sched) to traverse all subflows on the
conn_list of an MPTCP socket and then call kfunc to modify the fields of
each subflow in the WIP MPTCP BPF packet scheduler examples, instead of
converting them to a fixed array. With this helper, we can get rid of
this subflow array "contexts" and the size of it "subflows" in struct
mptcp_sched_data.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
 include/net/mptcp.h | 4 ----
 1 file changed, 4 deletions(-)
diff mbox series

Patch

diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index bd3d1b3654dd..0083af204000 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -100,11 +100,7 @@  struct mptcp_out_options {
 #define MPTCP_SCHED_MAX		128
 #define MPTCP_SCHED_BUF_MAX	(MPTCP_SCHED_NAME_MAX * MPTCP_SCHED_MAX)
 
-#define MPTCP_SUBFLOWS_MAX	8
-
 struct mptcp_sched_data {
-	u8	subflows;
-	struct mptcp_subflow_context *contexts[MPTCP_SUBFLOWS_MAX];
 	struct task_struct *bpf_iter_task;
 };