bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Song Liu <songliubraving@fb.com>
To: Network Development <netdev@vger.kernel.org>,
	bpf <bpf@vger.kernel.org>, Jiri Olsa <jolsa@redhat.com>,
	Jiri Olsa <jolsa@kernel.org>
Cc: Kernel Team <Kernel-team@fb.com>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	"kpsingh@chromium.org" <kpsingh@chromium.org>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix compilation error in progs/profiler.inc.h
Date: Wed, 14 Oct 2020 16:01:06 +0000	[thread overview]
Message-ID: <96F50C6A-1A46-441D-AAEE-A67D7D5A903D@fb.com> (raw)
In-Reply-To: <20201014043638.3770558-1-songliubraving@fb.com>



> On Oct 13, 2020, at 9:36 PM, Song Liu <songliubraving@fb.com> wrote:
> 
> Fix the following error when compiling selftests/bpf
> 
> progs/profiler.inc.h:246:5: error: redefinition of 'pids_cgrp_id' as different kind of symbol
> 
> pids_cgrp_id is used in cgroup code, and included in vmlinux.h. Fix the
> error by renaming pids_cgrp_id as pids_cgroup_id.
> 
> Fixes: 03d4d13fab3f ("selftests/bpf: Add profiler test")
> Signed-off-by: Song Liu <songliubraving@fb.com>

I forgot to mention

Reported-by: Jiri Olsa <jolsa@kernel.org>

> ---
> tools/testing/selftests/bpf/progs/profiler.inc.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/testing/selftests/bpf/progs/profiler.inc.h b/tools/testing/selftests/bpf/progs/profiler.inc.h
> index 00578311a4233..b554c1e40b9fb 100644
> --- a/tools/testing/selftests/bpf/progs/profiler.inc.h
> +++ b/tools/testing/selftests/bpf/progs/profiler.inc.h
> @@ -243,7 +243,7 @@ static ino_t get_inode_from_kernfs(struct kernfs_node* node)
> 	}
> }
> 
> -int pids_cgrp_id = 1;
> +int pids_cgroup_id = 1;
> 
> static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
> 					 struct task_struct* task,
> @@ -262,7 +262,7 @@ static INLINE void* populate_cgroup_info(struct cgroup_data_t* cgroup_data,
> 				BPF_CORE_READ(task, cgroups, subsys[i]);
> 			if (subsys != NULL) {
> 				int subsys_id = BPF_CORE_READ(subsys, ss, id);
> -				if (subsys_id == pids_cgrp_id) {
> +				if (subsys_id == pids_cgroup_id) {
> 					proc_kernfs = BPF_CORE_READ(subsys, cgroup, kn);
> 					root_kernfs = BPF_CORE_READ(subsys, ss, root, kf_root, kn);
> 					break;
> -- 
> 2.24.1
> 


  reply	other threads:[~2020-10-14 16:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14  4:36 [PATCH bpf-next] selftests/bpf: fix compilation error in progs/profiler.inc.h Song Liu
2020-10-14 16:01 ` Song Liu [this message]
2020-10-15  4:24   ` John Fastabend
2020-10-15  4:29 ` Alexei Starovoitov
2020-10-15  5:50   ` Song Liu
2020-10-15 19:02     ` Daniel Borkmann

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=96F50C6A-1A46-441D-AAEE-A67D7D5A903D@fb.com \
    --to=songliubraving@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kpsingh@chromium.org \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).