From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliang.tang@suse.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next] Squash to "selftests: bpf: test bpf_skc_to_mptcp_sock"
Date: Tue, 26 Apr 2022 17:20:04 -0700 (PDT) [thread overview]
Message-ID: <d521e76e-729a-cc7f-9ad5-e4e26f3da8d@linux.intel.com> (raw)
In-Reply-To: <50d4d7a13beec75c5172d81c2c6d037fb74efd79.1650947056.git.geliang.tang@suse.com>
On Tue, 26 Apr 2022, Geliang Tang wrote:
> Add CONFIG_MPTCP check.
>
> When CONFIG_MPTCP is not enabled, we'll get a clearer error message:
>
> libbpf: extern CONFIG_MPTCP (strong) not resolved
> libbpf: failed to load object './mptcp_sock.o'
>
> The message before is like this:
>
> libbpf: prog '_sockops': BPF program load failed: Invalid argument
> libbpf: prog '_sockops': -- BEGIN PROG LOAD LOG --
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> tools/testing/selftests/bpf/progs/mptcp_sock.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
Looks like this also requires CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC,
can you also add those to tools/testing/selftests/bpf/config? Maybe that
should be a separate commit, since other bpf test progs appear to rely on
this undocumented config requirement.
- Mat
> diff --git a/tools/testing/selftests/bpf/progs/mptcp_sock.c b/tools/testing/selftests/bpf/progs/mptcp_sock.c
> index 5cfaec4e7245..7b6a25e37de8 100644
> --- a/tools/testing/selftests/bpf/progs/mptcp_sock.c
> +++ b/tools/testing/selftests/bpf/progs/mptcp_sock.c
> @@ -7,6 +7,7 @@
>
> char _license[] SEC("license") = "GPL";
> __u32 _version SEC("version") = 1;
> +extern bool CONFIG_MPTCP __kconfig;
>
> struct mptcp_storage {
> __u32 invoked;
> @@ -46,6 +47,9 @@ int _sockops(struct bpf_sock_ops *ctx)
> if (!storage)
> return 1;
> } else {
> + if (!CONFIG_MPTCP)
> + return 1;
> +
> msk = bpf_skc_to_mptcp_sock(sk);
> if (!msk)
> return 1;
> --
> 2.34.1
>
>
>
--
Mat Martineau
Intel
next prev parent reply other threads:[~2022-04-27 0:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-26 4:26 [PATCH mptcp-next] Squash to "bpf: add bpf_skc_to_mptcp_sock_proto" Geliang Tang
2022-04-26 4:26 ` [PATCH mptcp-next] Squash to "selftests: bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
2022-04-26 6:16 ` Squash to "selftests: bpf: test bpf_skc_to_mptcp_sock": Tests Results MPTCP CI
2022-04-27 0:20 ` Mat Martineau [this message]
2022-04-27 0:22 ` [PATCH mptcp-next] Squash to "selftests: bpf: test bpf_skc_to_mptcp_sock" Mat Martineau
2022-04-27 15:27 ` Geliang Tang
2022-04-27 21:47 ` Mat Martineau
2022-04-28 2:51 ` Geliang Tang
2022-04-27 16:33 ` Matthieu Baerts
2022-04-26 6:17 ` Squash to "bpf: add bpf_skc_to_mptcp_sock_proto": Tests Results MPTCP CI
2022-04-27 0:17 ` [PATCH mptcp-next] Squash to "bpf: add bpf_skc_to_mptcp_sock_proto" Mat Martineau
-- strict thread matches above, loose matches on Subject: below --
2022-05-07 6:17 [PATCH mptcp-next] Squash to "selftests: bpf: add MPTCP test base" Geliang Tang
2022-05-07 6:17 ` [PATCH mptcp-next] Squash to "selftests: bpf: test bpf_skc_to_mptcp_sock" Geliang Tang
2022-03-31 4:02 Geliang Tang
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=d521e76e-729a-cc7f-9ad5-e4e26f3da8d@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliang.tang@suse.com \
--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