* [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10
@ 2024-10-17 10:21 Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 1/2] Squash to "bpf: Register mptcp common kfunc set" Geliang Tang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Geliang Tang @ 2024-10-17 10:21 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
There's a building error in v10:
progs/mptcp_bpf_iters.c:24:8: error: call to undeclared function 'bpf_mptcp_sk'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
24 | msk = bpf_mptcp_sk((struct sock *)sk);
| ^
progs/mptcp_bpf_iters.c:24:6: error: incompatible integer to pointer conversion assigning to 'struct mptcp_sock *' from 'int' [-Wint-conversion]
24 | msk = bpf_mptcp_sk((struct sock *)sk);
bpf_mptcp_sk() definition is missing. It will be used in patch 4.
Depends on:
- "add mptcp_subflow bpf_iter" v10
Based-on: <cover.1729063444.git.tanggeliang@kylinos.cn>
Geliang Tang (2):
Squash to "bpf: Register mptcp common kfunc set"
Squash to "selftests/bpf: Add mptcp_subflow bpf_iter test prog"
net/mptcp/bpf.c | 6 ++++++
tools/testing/selftests/bpf/progs/mptcp_bpf.h | 1 +
2 files changed, 7 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH mptcp-next 1/2] Squash to "bpf: Register mptcp common kfunc set"
2024-10-17 10:21 [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 Geliang Tang
@ 2024-10-17 10:21 ` Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 2/2] Squash to "selftests/bpf: Add mptcp_subflow bpf_iter test prog" Geliang Tang
2024-10-17 11:25 ` [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 MPTCP CI
2 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2024-10-17 10:21 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
bpf_mptcp_sk() definition is missing. It will be used in patch 4.
Please update the commit log:
'''
MPTCP helper mptcp_sk() is used to convert struct sock to mptcp_sock.
Helpers mptcp_subflow_ctx() and mptcp_subflow_tcp_sock() are used to
convert between struct mptcp_subflow_context and sock. They all will
be used in MPTCP BPF programs too. This patch defines corresponding
wrappers of them, and put the wrappers into mptcp common kfunc set
and register the set with the flag BPF_PROG_TYPE_UNSPEC to let them
accessible to all types of BPF programs.
'''
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
net/mptcp/bpf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index a2fd62c2777a..1ad7f703abb2 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -216,6 +216,11 @@ struct bpf_iter_mptcp_subflow_kern {
__bpf_kfunc_start_defs();
+__bpf_kfunc static struct mptcp_sock *bpf_mptcp_sk(struct sock *sk)
+{
+ return mptcp_sk(sk);
+}
+
__bpf_kfunc static struct mptcp_subflow_context *
bpf_mptcp_subflow_ctx(const struct sock *sk)
{
@@ -291,6 +296,7 @@ __bpf_kfunc static bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
__bpf_kfunc_end_defs();
BTF_KFUNCS_START(bpf_mptcp_common_kfunc_ids)
+BTF_ID_FLAGS(func, bpf_mptcp_sk)
BTF_ID_FLAGS(func, bpf_mptcp_subflow_ctx)
BTF_ID_FLAGS(func, bpf_mptcp_subflow_tcp_sock)
BTF_ID_FLAGS(func, bpf_iter_mptcp_subflow_new, KF_ITER_NEW | KF_TRUSTED_ARGS)
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH mptcp-next 2/2] Squash to "selftests/bpf: Add mptcp_subflow bpf_iter test prog"
2024-10-17 10:21 [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 1/2] Squash to "bpf: Register mptcp common kfunc set" Geliang Tang
@ 2024-10-17 10:21 ` Geliang Tang
2024-10-17 11:25 ` [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 MPTCP CI
2 siblings, 0 replies; 4+ messages in thread
From: Geliang Tang @ 2024-10-17 10:21 UTC (permalink / raw)
To: mptcp; +Cc: Geliang Tang
From: Geliang Tang <tanggeliang@kylinos.cn>
Export bpf_mptcp_sk(), it is used in this test program.
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
---
tools/testing/selftests/bpf/progs/mptcp_bpf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/progs/mptcp_bpf.h b/tools/testing/selftests/bpf/progs/mptcp_bpf.h
index b1f6e1fb467e..3b20cfd44505 100644
--- a/tools/testing/selftests/bpf/progs/mptcp_bpf.h
+++ b/tools/testing/selftests/bpf/progs/mptcp_bpf.h
@@ -46,6 +46,7 @@ mptcp_subflow_tcp_sock(const struct mptcp_subflow_context *subflow)
extern struct mptcp_sock *bpf_mptcp_sock_acquire(struct mptcp_sock *msk) __ksym;
extern void bpf_mptcp_sock_release(struct mptcp_sock *msk) __ksym;
+extern struct mptcp_sock *bpf_mptcp_sk(struct sock *sk) __ksym;
extern struct mptcp_subflow_context *
bpf_mptcp_subflow_ctx(const struct sock *sk) __ksym;
extern struct sock *
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10
2024-10-17 10:21 [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 1/2] Squash to "bpf: Register mptcp common kfunc set" Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 2/2] Squash to "selftests/bpf: Add mptcp_subflow bpf_iter test prog" Geliang Tang
@ 2024-10-17 11:25 ` MPTCP CI
2 siblings, 0 replies; 4+ messages in thread
From: MPTCP CI @ 2024-10-17 11:25 UTC (permalink / raw)
To: Geliang Tang; +Cc: mptcp
Hi Geliang,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal: Success! ✅
- KVM Validation: debug: Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Script error! ❓
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/11383143433
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/a092947680a3
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=900181
If there are some issues, you can reproduce them using the same environment as
the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normal
For more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a
stable tests suite when executed on a public CI like here, it is possible some
reported issues are not due to your modifications. Still, do not hesitate to
help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-17 11:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 10:21 [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 1/2] Squash to "bpf: Register mptcp common kfunc set" Geliang Tang
2024-10-17 10:21 ` [PATCH mptcp-next 2/2] Squash to "selftests/bpf: Add mptcp_subflow bpf_iter test prog" Geliang Tang
2024-10-17 11:25 ` [PATCH mptcp-next 0/2] fixes for "add mptcp_subflow bpf_iter" v10 MPTCP CI
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).