/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */#ifndef __BPF_LEGACY__#define __BPF_LEGACY__/* * legacy bpf_map_def with extra fields supported only by bpf_load(), do not * use outside of samples/bpf */structbpf_map_def_legacy{unsignedinttype;unsignedintkey_size;unsignedintvalue_size;unsignedintmax_entries;unsignedintmap_flags;unsignedintinner_map_idx;unsignedintnuma_node;};#define BPF_ANNOTATE_KV_PAIR(name, type_key, type_val) \ struct ____btf_map_##name { \ type_key key; \ type_val value; \ }; \ struct ____btf_map_##name \ __attribute__ ((section(".maps." #name), used)) \ ____btf_map_##name = { }/* llvm builtin functions that eBPF C program may use to * emit BPF_LD_ABS and BPF_LD_IND instructions */unsignedlonglongload_byte(void*skb,unsignedlonglongoff)asm("llvm.bpf.load.byte");unsignedlonglongload_half(void*skb,unsignedlonglongoff)asm("llvm.bpf.load.half");unsignedlonglongload_word(void*skb,unsignedlonglongoff)asm("llvm.bpf.load.word");#endif