mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled
@ 2022-08-02 16:33 Jiri Olsa
  2022-08-02 19:16 ` mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled: Tests Results MPTCP CI
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jiri Olsa @ 2022-08-02 16:33 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Mat Martineau, Matthieu Baerts
  Cc: Martin KaFai Lau, bpf, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, mptcp

The btf_sock_ids array needs struct mptcp_sock BTF ID for
the bpf_skc_to_mptcp_sock helper.

When CONFIG_MPTCP is disabled, the 'struct mptcp_sock' is not
defined and resolve_btfids will complain with:

  BTFIDS  vmlinux
WARN: resolve_btfids: unresolved symbol mptcp_sock

Adding empty difinition for struct mptcp_sock when CONFIG_MPTCP
is disabled.

Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 include/net/mptcp.h | 4 ++++
 1 file changed, 4 insertions(+)

v2 changes:
  - moved the new empty struct declaration next to the inline
    bpf_mptcp_sock_from_subflow function [Mat]

diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index ac9cf7271d46..412479ebf5ad 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -291,4 +291,8 @@ struct mptcp_sock *bpf_mptcp_sock_from_subflow(struct sock *sk);
 static inline struct mptcp_sock *bpf_mptcp_sock_from_subflow(struct sock *sk) { return NULL; }
 #endif
 
+#if !IS_ENABLED(CONFIG_MPTCP)
+struct mptcp_sock { };
+#endif
+
 #endif /* __NET_MPTCP_H */
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled
@ 2022-07-11 13:07 Jiri Olsa
  2022-07-11 14:41 ` mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled: Tests Results MPTCP CI
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Olsa @ 2022-07-11 13:07 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Mat Martineau, Matthieu Baerts
  Cc: netdev, bpf, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, Geliang Tang, mptcp

The btf_sock_ids array needs struct mptcp_sock BTF ID for
the bpf_skc_to_mptcp_sock helper.

When CONFIG_MPTCP is disabled, the 'struct mptcp_sock' is not
defined and resolve_btfids will complain with:

  BTFIDS  vmlinux
WARN: resolve_btfids: unresolved symbol mptcp_sock

Adding empty difinition for struct mptcp_sock when CONFIG_MPTCP
is disabled.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 include/net/mptcp.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index ac9cf7271d46..25741a52c666 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -59,6 +59,10 @@ struct mptcp_addr_info {
 	};
 };
 
+#if !IS_ENABLED(CONFIG_MPTCP)
+struct mptcp_sock { };
+#endif
+
 struct mptcp_out_options {
 #if IS_ENABLED(CONFIG_MPTCP)
 	u16 suboptions;
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-08 13:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-02 16:33 [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled Jiri Olsa
2022-08-02 19:16 ` mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled: Tests Results MPTCP CI
2022-08-02 22:36 ` [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled Mat Martineau
2022-08-03 16:31 ` Matthieu Baerts
2022-08-03 18:07 ` mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled: Tests Results MPTCP CI
2022-08-08 13:40 ` [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2022-07-11 13:07 [PATCH " Jiri Olsa
2022-07-11 14:41 ` mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled: Tests Results 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).