[LTP] [PATCH 1/2] Essential headers for BPF map creation
Petr Vorel
pvorel@suse.cz
Wed Jul 24 11:27:15 CEST 2019
Hi Richie,
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> ---
> include/lapi/bpf.h | 242 +++++++++++++++++++++++++++++++
> include/lapi/syscalls/aarch64.in | 1 +
> include/lapi/syscalls/i386.in | 1 +
> include/lapi/syscalls/s390.in | 1 +
> include/lapi/syscalls/sparc.in | 1 +
> include/lapi/syscalls/x86_64.in | 1 +
> 6 files changed, 247 insertions(+)
> create mode 100644 include/lapi/bpf.h
> diff --git a/include/lapi/bpf.h b/include/lapi/bpf.h
> new file mode 100644
> index 000000000..369de0175
> --- /dev/null
> +++ b/include/lapi/bpf.h
> @@ -0,0 +1,242 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2019 Richard Palethorpe <rpalethorpe@suse.com>
> + *
> + * Essential Extended Berkeley Packet Filter (eBPF) headers
> + *
> + * Mostly copied/adapted from linux/bpf.h and libbpf so that we can perform
> + * some eBPF testing without any external dependencies.
Probably the only sane way. But it will be uncomfortable to keep the header
updated. Simple copy of include/uapi/linux/bpf.h would be easier
(but we'd require to have kernel headers anyway (<linux/types.h> and
<linux/bpf_common.h>).
Kind regards,
Petr
More information about the ltp
mailing list