Netdev List
 help / color / mirror / Atom feed
* [PATCH bpf-next] perf/bpf_counter: use bpf_map_create instead of bpf_create_map
@ 2021-12-06 23:08 Song Liu
  2021-12-07  2:37 ` Andrii Nakryiko
  0 siblings, 1 reply; 7+ messages in thread
From: Song Liu @ 2021-12-06 23:08 UTC (permalink / raw)
  To: bpf, netdev; +Cc: ast, daniel, andrii, kernel-team, acme, acme, Song Liu

bpf_create_map is deprecated. Replace it with bpf_map_create.

Fixes: 992c4225419a ("libbpf: Unify low-level map creation APIs w/ new bpf_map_create()")
Signed-off-by: Song Liu <song@kernel.org>
---
 tools/perf/util/bpf_counter.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/bpf_counter.c b/tools/perf/util/bpf_counter.c
index c17d4a43ce065..ed150a9b3a0c0 100644
--- a/tools/perf/util/bpf_counter.c
+++ b/tools/perf/util/bpf_counter.c
@@ -320,10 +320,10 @@ static int bperf_lock_attr_map(struct target *target)
 	}
 
 	if (access(path, F_OK)) {
-		map_fd = bpf_create_map(BPF_MAP_TYPE_HASH,
+		map_fd = bpf_map_create(BPF_MAP_TYPE_HASH, NULL,
 					sizeof(struct perf_event_attr),
 					sizeof(struct perf_event_attr_map_entry),
-					ATTR_MAP_SIZE, 0);
+					ATTR_MAP_SIZE, NULL);
 		if (map_fd < 0)
 			return -1;
 
-- 
2.30.2


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

end of thread, other threads:[~2021-12-07 23:11 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-06 23:08 [PATCH bpf-next] perf/bpf_counter: use bpf_map_create instead of bpf_create_map Song Liu
2021-12-07  2:37 ` Andrii Nakryiko
2021-12-07  4:32   ` Song Liu
2021-12-07  5:13     ` Andrii Nakryiko
2021-12-07  6:30       ` Song Liu
2021-12-07 23:02         ` Andrii Nakryiko
2021-12-07 23:10           ` Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox