2019-11-02 19:09:42 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
#include <linux/bpf.h>
|
2020-01-20 21:06:45 +08:00
|
|
|
#include <bpf/bpf_helpers.h>
|
2019-11-02 19:09:42 +08:00
|
|
|
|
|
|
|
int _version SEC("version") = 1;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
__uint(type, BPF_MAP_TYPE_ARRAY);
|
|
|
|
__uint(max_entries, 1);
|
|
|
|
__type(key, __u32);
|
|
|
|
__type(value, __u64);
|
|
|
|
__uint(pinning, LIBBPF_PIN_BY_NAME);
|
|
|
|
} pinmap SEC(".maps");
|
|
|
|
|
|
|
|
struct {
|
|
|
|
__uint(type, BPF_MAP_TYPE_HASH);
|
|
|
|
__uint(max_entries, 1);
|
|
|
|
__type(key, __u32);
|
|
|
|
__type(value, __u64);
|
|
|
|
} nopinmap SEC(".maps");
|
|
|
|
|
|
|
|
struct {
|
2019-11-10 04:37:28 +08:00
|
|
|
__uint(type, BPF_MAP_TYPE_HASH);
|
2019-11-02 19:09:42 +08:00
|
|
|
__uint(max_entries, 1);
|
|
|
|
__type(key, __u32);
|
|
|
|
__type(value, __u64);
|
|
|
|
__uint(pinning, LIBBPF_PIN_NONE);
|
|
|
|
} nopinmap2 SEC(".maps");
|
|
|
|
|
|
|
|
char _license[] SEC("license") = "GPL";
|