BPF List
 help / color / mirror / Atom feed
From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Matthieu Baerts <matthieu.baerts@tessares.net>,
	Martin KaFai Lau <kafai@fb.com>,
	bpf@vger.kernel.org, Song Liu <songliubraving@fb.com>,
	Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@chromium.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	mptcp@lists.linux.dev
Subject: Re: [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled
Date: Tue, 2 Aug 2022 15:36:55 -0700 (PDT)	[thread overview]
Message-ID: <341f1b39-24e1-3c80-41e0-a4ebac91297@linux.intel.com> (raw)
In-Reply-To: <20220802163324.1873044-1-jolsa@kernel.org>

On Tue, 2 Aug 2022, Jiri Olsa wrote:

> 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>

Thanks Jiri, v2 looks good to merge in bpf-next:

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>


> ---
> 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
>
>

--
Mat Martineau
Intel

  reply	other threads:[~2022-08-02 22:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-02 16:33 [PATCHv2 bpf-next] mptcp: Add struct mptcp_sock definition when CONFIG_MPTCP is disabled Jiri Olsa
2022-08-02 22:36 ` Mat Martineau [this message]
2022-08-08 13:40 ` patchwork-bot+netdevbpf

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=341f1b39-24e1-3c80-41e0-a4ebac91297@linux.intel.com \
    --to=mathew.j.martineau@linux.intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@chromium.org \
    --cc=matthieu.baerts@tessares.net \
    --cc=mptcp@lists.linux.dev \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /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