From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
To: mptcp@lists.linux.dev
Cc: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>,
Geliang Tang <geliang@kernel.org>
Subject: [PATCH mptcp-next] Squash to "add mptcp_subflow bpf_iter" v9
Date: Tue, 15 Oct 2024 17:17:38 +0200 [thread overview]
Message-ID: <20241015151737.4111686-2-matttbe@kernel.org> (raw)
The CI reported these issues with this series:
net/mptcp/bpf.c:215:42: warning: symbol 'bpf_mptcp_subflow_ctx' was not declared. Should it be static?
net/mptcp/bpf.c:221:25: warning: symbol 'bpf_mptcp_subflow_tcp_sock' was not declared. Should it be static?
net/mptcp/bpf.c:227:17: warning: symbol 'bpf_iter_mptcp_subflow_new' was not declared. Should it be static?
net/mptcp/bpf.c:242:42: warning: symbol 'bpf_iter_mptcp_subflow_next' was not declared. Should it be static?
net/mptcp/bpf.c:254:18: warning: symbol 'bpf_iter_mptcp_subflow_destroy' was not declared. Should it be static?
net/mptcp/bpf.c:258:31: warning: symbol 'bpf_mptcp_sock_acquire' was not declared. Should it be static?
net/mptcp/bpf.c:267:18: warning: symbol 'bpf_mptcp_sock_release' was not declared. Should it be static?
On my side, adding static seems to be enough to fix them locally.
While at it, I also removed the export of two previous kfunc: it looks
like it is not needed to export them in protocol.h, no? If it is, then I
guess all these new kfunc should be exported too.
Tested with:
touch net/mptcp/bpf.c
make C=1 net/mptcp/bpf.o
@Geliang: if the CI is happy with these modifications, can you include
them in your future v10 please?
Cc: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
---
Based-on: <cover.1728466623.git.tanggeliang@kylinos.cn>
---
net/mptcp/bpf.c | 23 +++++++++++++----------
net/mptcp/protocol.h | 3 ---
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/net/mptcp/bpf.c b/net/mptcp/bpf.c
index 9b87eee13955..dfdad3eaedfd 100644
--- a/net/mptcp/bpf.c
+++ b/net/mptcp/bpf.c
@@ -212,20 +212,21 @@ struct bpf_iter_mptcp_subflow_kern {
__bpf_kfunc_start_defs();
-__bpf_kfunc struct mptcp_subflow_context *
+__bpf_kfunc static struct mptcp_subflow_context *
bpf_mptcp_subflow_ctx(const struct sock *sk)
{
return mptcp_subflow_ctx(sk);
}
-__bpf_kfunc struct sock *
+__bpf_kfunc static struct sock *
bpf_mptcp_subflow_tcp_sock(const struct mptcp_subflow_context *subflow)
{
return mptcp_subflow_tcp_sock(subflow);
}
-__bpf_kfunc int bpf_iter_mptcp_subflow_new(struct bpf_iter_mptcp_subflow *it,
- struct mptcp_sock *msk)
+__bpf_kfunc static int
+bpf_iter_mptcp_subflow_new(struct bpf_iter_mptcp_subflow *it,
+ struct mptcp_sock *msk)
{
struct bpf_iter_mptcp_subflow_kern *kit = (void *)it;
@@ -239,7 +240,7 @@ __bpf_kfunc int bpf_iter_mptcp_subflow_new(struct bpf_iter_mptcp_subflow *it,
return 0;
}
-__bpf_kfunc struct mptcp_subflow_context *
+__bpf_kfunc static struct mptcp_subflow_context *
bpf_iter_mptcp_subflow_next(struct bpf_iter_mptcp_subflow *it)
{
struct bpf_iter_mptcp_subflow_kern *kit = (void *)it;
@@ -251,11 +252,13 @@ bpf_iter_mptcp_subflow_next(struct bpf_iter_mptcp_subflow *it)
return list_entry(kit->pos, struct mptcp_subflow_context, node);
}
-__bpf_kfunc void bpf_iter_mptcp_subflow_destroy(struct bpf_iter_mptcp_subflow *it)
+__bpf_kfunc static void
+bpf_iter_mptcp_subflow_destroy(struct bpf_iter_mptcp_subflow *it)
{
}
-__bpf_kfunc struct mptcp_sock *bpf_mptcp_sock_acquire(struct mptcp_sock *msk)
+__bpf_kfunc static struct mptcp_sock *
+bpf_mptcp_sock_acquire(struct mptcp_sock *msk)
{
struct sock *sk = (struct sock *)msk;
@@ -264,14 +267,14 @@ __bpf_kfunc struct mptcp_sock *bpf_mptcp_sock_acquire(struct mptcp_sock *msk)
return NULL;
}
-__bpf_kfunc void bpf_mptcp_sock_release(struct mptcp_sock *msk)
+__bpf_kfunc static void bpf_mptcp_sock_release(struct mptcp_sock *msk)
{
struct sock *sk = (struct sock *)msk;
WARN_ON_ONCE(!sk || !refcount_dec_not_one(&sk->sk_refcnt));
}
-__bpf_kfunc struct mptcp_subflow_context *
+__bpf_kfunc static struct mptcp_subflow_context *
bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int pos)
{
if (pos >= MPTCP_SUBFLOWS_MAX)
@@ -279,7 +282,7 @@ bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int p
return data->contexts[pos];
}
-__bpf_kfunc bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
+__bpf_kfunc static bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
{
return tcp_rtx_queue_empty(sk);
}
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index b963e68451b1..7848a1989d17 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -722,9 +722,6 @@ void mptcp_subflow_queue_clean(struct sock *sk, struct sock *ssk);
void mptcp_sock_graft(struct sock *sk, struct socket *parent);
u64 mptcp_wnd_end(const struct mptcp_sock *msk);
void mptcp_set_timeout(struct sock *sk);
-bool bpf_mptcp_subflow_queues_empty(struct sock *sk);
-struct mptcp_subflow_context *
-bpf_mptcp_subflow_ctx_by_pos(const struct mptcp_sched_data *data, unsigned int pos);
struct sock *__mptcp_nmpc_sk(struct mptcp_sock *msk);
bool __mptcp_close(struct sock *sk, long timeout);
void mptcp_cancel_work(struct sock *sk);
--
2.45.2
next reply other threads:[~2024-10-15 15:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 15:17 Matthieu Baerts (NGI0) [this message]
2024-10-15 15:42 ` [PATCH mptcp-next] Squash to "add mptcp_subflow bpf_iter" v9 MPTCP CI
2024-10-15 15:50 ` Matthieu Baerts
2024-10-15 16:30 ` MPTCP CI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241015151737.4111686-2-matttbe@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox