BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Andrii Nakryiko <andriin@fb.com>, <bpf@vger.kernel.org>,
	Martin KaFai Lau <kafai@fb.com>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
	Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>,
	Alexei Starovoitov <ast@kernel.org>
Subject: [PATCH bpf-next 2/8] bpf: change btf_iter func proto prefix to "bpf_iter_"
Date: Tue, 12 May 2020 08:52:33 -0700	[thread overview]
Message-ID: <20200512155233.1080305-1-yhs@fb.com> (raw)
In-Reply-To: <20200512155232.1080167-1-yhs@fb.com>

This is to be consistent with tracing and lsm programs
which have prefix "bpf_trace_" and "bpf_lsm_" respectively.

Suggested-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Yonghong Song <yhs@fb.com>
---
 include/linux/bpf.h    | 6 +++---
 tools/lib/bpf/libbpf.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index cf4b6e44f2bc..ab94dfd8826f 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -1131,10 +1131,10 @@ struct bpf_link *bpf_link_get_from_fd(u32 ufd);
 int bpf_obj_pin_user(u32 ufd, const char __user *pathname);
 int bpf_obj_get_user(const char __user *pathname, int flags);
 
-#define BPF_ITER_FUNC_PREFIX "__bpf_iter__"
+#define BPF_ITER_FUNC_PREFIX "bpf_iter_"
 #define DEFINE_BPF_ITER_FUNC(target, args...)			\
-	extern int __bpf_iter__ ## target(args);		\
-	int __init __bpf_iter__ ## target(args) { return 0; }
+	extern int bpf_iter_ ## target(args);			\
+	int __init bpf_iter_ ## target(args) { return 0; }
 
 typedef int (*bpf_iter_init_seq_priv_t)(void *private_data);
 typedef void (*bpf_iter_fini_seq_priv_t)(void *private_data);
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 3da66540b54b..d063c247615f 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -6897,7 +6897,7 @@ static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
 
 #define BTF_TRACE_PREFIX "btf_trace_"
 #define BTF_LSM_PREFIX "bpf_lsm_"
-#define BTF_ITER_PREFIX "__bpf_iter__"
+#define BTF_ITER_PREFIX "bpf_iter_"
 #define BTF_MAX_NAME_SIZE 128
 
 static int find_btf_by_prefix_kind(const struct btf *btf, const char *prefix,
-- 
2.24.1


  parent reply	other threads:[~2020-05-12 15:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-12 15:52 [PATCH bpf-next 0/8] misc fixes for bpf_iter Yonghong Song
2020-05-12 15:52 ` [PATCH bpf-next 1/8] tools/bpf: selftests : explain bpf_iter test failures with llvm 10.0.0 Yonghong Song
2020-05-12 15:52 ` Yonghong Song [this message]
2020-05-12 22:21   ` [PATCH bpf-next 2/8] bpf: change btf_iter func proto prefix to "bpf_iter_" Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 3/8] bpf: add comments to interpret bpf_prog return values Yonghong Song
2020-05-12 22:21   ` Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 4/8] bpf: add WARN_ONCE if bpf_seq_read show() return a positive number Yonghong Song
2020-05-12 22:23   ` Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 5/8] bpf: net: refactor bpf_iter target registration Yonghong Song
2020-05-12 22:19   ` Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 6/8] bpf: change func bpf_iter_unreg_target() signature Yonghong Song
2020-05-12 22:24   ` Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 7/8] bpf: enable bpf_iter targets registering ctx argument types Yonghong Song
2020-05-12 22:29   ` Andrii Nakryiko
2020-05-12 15:52 ` [PATCH bpf-next 8/8] samples/bpf: remove compiler warnings Yonghong Song
2020-05-12 22:30   ` Andrii Nakryiko

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=20200512155233.1080305-1-yhs@fb.com \
    --to=yhs@fb.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --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