1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2020 Facebook */
4 #include <bpf/bpf_helpers.h>
6 char _license
[] SEC("license") = "GPL";
10 SEC("iter/bpf_map_elem")
11 int dump_bpf_hash_map(struct bpf_iter__bpf_map_elem
*ctx
)
13 void *value
= ctx
->value
;
15 if (value
== (void *)0)
18 /* negative offset, verifier failure. */
19 value_sum
+= *(__u32
*)(value
- 4);