Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d930450 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Alexei Starovoitov
Browse files

samples: bpf: rename libbpf.h to bpf_insn.h



The libbpf.h file in samples is clashing with libbpf's header.
Since it only includes a subset of filter.h instruction helpers
rename it to bpf_insn.h.  Drop the unnecessary include of bpf/bpf.h.

Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Acked-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 2bf3e2ef
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/* eBPF mini library */
#ifndef __LIBBPF_H
#define __LIBBPF_H

#include <bpf/bpf.h>
/* eBPF instruction mini library */
#ifndef __BPF_INSN_H
#define __BPF_INSN_H

struct bpf_insn;

+1 −1
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <bpf/bpf.h>
#include "libbpf.h"
#include "bpf_insn.h"

#define PORT 8888

+3 −1
Original line number Diff line number Diff line
@@ -12,8 +12,10 @@
#include <sys/types.h>
#include <sys/socket.h>

#include <bpf/bpf.h>

#include "bpf_insn.h"
#include "bpf_load.h"
#include "libbpf.h"
#include "sock_example.h"

#define BPF_F_PIN	(1 << 0)
+2 −1
Original line number Diff line number Diff line
@@ -26,7 +26,8 @@
#include <linux/if_ether.h>
#include <linux/ip.h>
#include <stddef.h>
#include "libbpf.h"
#include <bpf/bpf.h>
#include "bpf_insn.h"
#include "sock_example.h"

char bpf_log_buf[BPF_LOG_BUF_SIZE];
+2 −1
Original line number Diff line number Diff line
@@ -28,8 +28,9 @@
#include <fcntl.h>

#include <linux/bpf.h>
#include <bpf/bpf.h>

#include "libbpf.h"
#include "bpf_insn.h"

enum {
	MAP_KEY_PACKETS,
Loading