Skip to content

Commit

Permalink
Squash to "bpf: Export more bpf_burst related functions"
Browse files Browse the repository at this point in the history
Add "ignore -Wmissing-prototypes" for bpf_mptcp_subflow_queues_empty(),
drop the declarations in protocol.h.

Drop bpf_mptcp_subflow_memory_free(), it will be defined in BPF context.

Update bpf_mptcp_subflow_queues_empty().

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and intel-lab-lkp committed Aug 3, 2023
1 parent c066ec9 commit e470801
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 8 additions & 7 deletions net/mptcp/bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,24 +144,25 @@ struct bpf_struct_ops bpf_mptcp_sched_ops = {
.name = "mptcp_sched_ops",
};

bool bpf_mptcp_subflow_memory_free(const struct sock *sk)
{
return sk_stream_memory_free(sk);
}
__diag_push();
__diag_ignore_all("-Wmissing-prototypes",
"kfuncs which will be used in BPF programs");

bool bpf_mptcp_subflow_queues_empty(const struct sock *sk)
bool bpf_mptcp_subflow_queues_empty(struct sock *sk)
{
return tcp_rtx_and_write_queues_empty(sk);
return tcp_rtx_queue_empty(sk);
}

__diag_pop();

BTF_SET8_START(bpf_mptcp_sched_kfunc_ids)
BTF_ID_FLAGS(func, mptcp_subflow_set_scheduled)
BTF_ID_FLAGS(func, mptcp_sched_data_set_contexts)
BTF_ID_FLAGS(func, mptcp_subflow_ctx_by_pos)
BTF_ID_FLAGS(func, mptcp_subflow_active)
BTF_ID_FLAGS(func, mptcp_set_timeout)
BTF_ID_FLAGS(func, mptcp_wnd_end)
BTF_ID_FLAGS(func, bpf_mptcp_subflow_memory_free)
BTF_ID_FLAGS(func, tcp_stream_memory_free)
BTF_ID_FLAGS(func, bpf_mptcp_subflow_queues_empty)
BTF_ID_FLAGS(func, mptcp_pm_subflow_chk_stale)
BTF_SET8_END(bpf_mptcp_sched_kfunc_ids)
Expand Down
2 changes: 0 additions & 2 deletions net/mptcp/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,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_memory_free(const struct sock *sk);
bool bpf_mptcp_subflow_queues_empty(const struct sock *sk);
struct sock *__mptcp_nmpc_sk(struct mptcp_sock *msk);
bool __mptcp_close(struct sock *sk, long timeout);
void mptcp_cancel_work(struct sock *sk);
Expand Down

0 comments on commit e470801

Please sign in to comment.