[PATCH mptcp-next] Squash to "mptcp: add struct mptcp_sched_ops v18"

Geliang Tang posted 1 patch 1 week, 6 days ago
Failed in applying to current master (apply log)
include/net/mptcp.h                             | 6 +++---
tools/testing/selftests/bpf/bpf_mptcp_helpers.h | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
[PATCH mptcp-next] Squash to "mptcp: add struct mptcp_sched_ops v18"
Posted by Geliang Tang 1 week, 6 days ago
Add const for all msks in mptcp_sched_ops.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 include/net/mptcp.h                             | 6 +++---
 tools/testing/selftests/bpf/bpf_mptcp_helpers.h | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index bea7608d72d3..b596ba7a8494 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -103,15 +103,15 @@ struct mptcp_sched_data {
 };
 
 struct mptcp_sched_ops {
-	void (*get_subflow)(struct mptcp_sock *msk, bool reinject,
+	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
 			    struct mptcp_sched_data *data);
 
 	char			name[MPTCP_SCHED_NAME_MAX];
 	struct module		*owner;
 	struct list_head	list;
 
-	void (*init)(struct mptcp_sock *msk);
-	void (*release)(struct mptcp_sock *msk);
+	void (*init)(const struct mptcp_sock *msk);
+	void (*release)(const struct mptcp_sock *msk);
 } ____cacheline_aligned_in_smp;
 
 #ifdef CONFIG_MPTCP
diff --git a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h b/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
index 5b8eef4f1b4e..fd54708f6227 100644
--- a/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
+++ b/tools/testing/selftests/bpf/bpf_mptcp_helpers.h
@@ -16,10 +16,10 @@ struct mptcp_sched_data {
 struct mptcp_sched_ops {
 	char name[MPTCP_SCHED_NAME_MAX];
 
-	void (*init)(struct mptcp_sock *msk);
-	void (*release)(struct mptcp_sock *msk);
+	void (*init)(const struct mptcp_sock *msk);
+	void (*release)(const struct mptcp_sock *msk);
 
-	void (*get_subflow)(struct mptcp_sock *msk, bool reinject,
+	void (*get_subflow)(const struct mptcp_sock *msk, bool reinject,
 			    struct mptcp_sched_data *data);
 	void *owner;
 };
-- 
2.34.1


[PATCH mptcp-next] Squash to "selftests: bpf: add bpf_rr scheduler v10"
Posted by Geliang Tang 1 week, 6 days ago
Add const for all msks in mptcp_sched_ops in mptcp_bpf_rr.c

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c b/tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c
index 3619bd622b94..fba3394ac027 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_bpf_rr.c
@@ -9,16 +9,16 @@
 char _license[] SEC("license") = "GPL";
 
 SEC("struct_ops/mptcp_sched_rr_init")
-void BPF_PROG(mptcp_sched_rr_init, struct mptcp_sock *msk)
+void BPF_PROG(mptcp_sched_rr_init, const struct mptcp_sock *msk)
 {
 }
 
 SEC("struct_ops/mptcp_sched_rr_release")
-void BPF_PROG(mptcp_sched_rr_release, struct mptcp_sock *msk)
+void BPF_PROG(mptcp_sched_rr_release, const struct mptcp_sock *msk)
 {
 }
 
-void BPF_STRUCT_OPS(bpf_rr_get_subflow, struct mptcp_sock *msk,
+void BPF_STRUCT_OPS(bpf_rr_get_subflow, const struct mptcp_sock *msk,
 		    bool reinject, struct mptcp_sched_data *data)
 {
 	struct mptcp_subflow_context *subflow;
-- 
2.34.1


[PATCH mptcp-next] Squash to "selftests: bpf: add bpf_first scheduler v18"
Posted by Geliang Tang 1 week, 6 days ago
Add const for all msks in mptcp_sched_ops in mptcp_bpf_first.c

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 tools/testing/selftests/bpf/progs/mptcp_bpf_first.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c b/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
index 0ca9754c078d..8c8acf04fb92 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
+++ b/tools/testing/selftests/bpf/progs/mptcp_bpf_first.c
@@ -7,16 +7,16 @@
 char _license[] SEC("license") = "GPL";
 
 SEC("struct_ops/mptcp_sched_first_init")
-void BPF_PROG(mptcp_sched_first_init, struct mptcp_sock *msk)
+void BPF_PROG(mptcp_sched_first_init, const struct mptcp_sock *msk)
 {
 }
 
 SEC("struct_ops/mptcp_sched_first_release")
-void BPF_PROG(mptcp_sched_first_release, struct mptcp_sock *msk)
+void BPF_PROG(mptcp_sched_first_release, const struct mptcp_sock *msk)
 {
 }
 
-void BPF_STRUCT_OPS(bpf_first_get_subflow, struct mptcp_sock *msk,
+void BPF_STRUCT_OPS(bpf_first_get_subflow, const struct mptcp_sock *msk,
 		    bool reinject, struct mptcp_sched_data *data)
 {
 	data->sock = msk->first;
-- 
2.34.1