vxlan: check return value of gro_cells_init()
[linux/fpc-iii.git] / tools / perf / include / bpf / stdio.h
blob2899cb7bfed8df5be879a4f378611cadb58df641
1 // SPDX-License-Identifier: GPL-2.0
3 #include <bpf.h>
5 struct bpf_map SEC("maps") __bpf_stdout__ = {
6 .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY,
7 .key_size = sizeof(int),
8 .value_size = sizeof(u32),
9 .max_entries = __NR_CPUS__,
12 static int (*perf_event_output)(void *, struct bpf_map *, int, void *, unsigned long) =
13 (void *)BPF_FUNC_perf_event_output;
15 #define puts(from) \
16 ({ const int __len = sizeof(from); \
17 char __from[__len] = from; \
18 perf_event_output(args, &__bpf_stdout__, BPF_F_CURRENT_CPU, \
19 &__from, __len & (sizeof(from) - 1)); })