diff mbox series

[mptcp-next,v15,8/8] mptcp: drop subflow contexts in mptcp_sched_data

Message ID c5c2a3787d92bb5679ca9d256a8f15fff66c5cdd.1739788598.git.tanggeliang@kylinos.cn (mailing list archive)
State New
Delegated to: Mat Martineau
Headers show
Series use bpf_iter in bpf schedulers | expand

Commit Message

Geliang Tang Feb. 17, 2025, 10:41 a.m. UTC
From: Geliang Tang <tanggeliang@kylinos.cn>

The mptcp_subflow bpf_iter is added now, it's better to use the helper
bpf_for_each(mptcp_subflow) 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. And
keep struct mptcp_sched_data for future use.

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 2c85ca92bb1c..df87114deb1c 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 mptcp_sched_ops {