samples: bpf: refactor header include path

Currently, header inclusion in each file is inconsistent.
For example, "libbpf.h" header is included as multiple ways.

    #include "bpf/libbpf.h"
    #include "libbpf.h"

Due to commit b552d33c80 ("samples/bpf: fix include path
in Makefile"), $(srctree)/tools/lib/bpf/ path had been included
during build, path "bpf/" in header isn't necessary anymore.

This commit removes path "bpf/" in header inclusion.

Signed-off-by: Daniel T. Lee <danieltimlee@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Daniel T. Lee 2019-06-16 00:14:47 +09:00 committed by Daniel Borkmann
parent fa206dccd8
commit 4d18f6de6a
15 changed files with 20 additions and 20 deletions

View File

@ -14,7 +14,7 @@
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include "bpf_insn.h"
#include "sock_example.h"

View File

@ -50,8 +50,8 @@
#include "cgroup_helpers.h"
#include "hbm.h"
#include "bpf_util.h"
#include "bpf/bpf.h"
#include "bpf/libbpf.h"
#include "bpf.h"
#include "libbpf.h"
bool outFlag = true;
int minRate = 1000; /* cgroup rate limit in Mbps */

View File

@ -25,7 +25,7 @@
#include "bpf_load.h"
#include "bpf_util.h"
#include "bpf/libbpf.h"
#include "libbpf.h"
static void dump_counts(int fd)
{

View File

@ -3,7 +3,7 @@
#include <assert.h>
#include <linux/bpf.h>
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include "sock_example.h"
#include <unistd.h>
#include <arpa/inet.h>

View File

@ -3,7 +3,7 @@
#include <assert.h>
#include <linux/bpf.h>
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include "sock_example.h"
#include <unistd.h>
#include <arpa/inet.h>

View File

@ -18,8 +18,8 @@
#include <net/if.h>
#include "bpf_util.h"
#include "bpf/bpf.h"
#include "bpf/libbpf.h"
#include "bpf.h"
#include "libbpf.h"
static int ifindex;
static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST;

View File

@ -18,8 +18,8 @@
#include <netinet/ether.h>
#include <unistd.h>
#include <time.h>
#include "bpf/bpf.h"
#include "bpf/libbpf.h"
#include "bpf.h"
#include "libbpf.h"
#define STATS_INTERVAL_S 2U

View File

@ -24,7 +24,7 @@
#include <fcntl.h>
#include <libgen.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include <bpf/bpf.h>

View File

@ -25,7 +25,7 @@ static const char *__doc__ =
#define MAX_PROG 6
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include "bpf_util.h"

View File

@ -24,7 +24,7 @@
#include "bpf_util.h"
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
static int ifindex_in;
static int ifindex_out;

View File

@ -24,7 +24,7 @@
#include "bpf_util.h"
#include <bpf/bpf.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
static int ifindex_in;
static int ifindex_out;

View File

@ -24,7 +24,7 @@
#include <sys/ioctl.h>
#include <sys/syscall.h>
#include "bpf_util.h"
#include "bpf/libbpf.h"
#include "libbpf.h"
#include <sys/resource.h>
#include <libgen.h>

View File

@ -22,8 +22,8 @@ static const char *__doc__ = " XDP RX-queue info extract example\n\n"
#include <arpa/inet.h>
#include <linux/if_link.h>
#include "bpf/bpf.h"
#include "bpf/libbpf.h"
#include "bpf.h"
#include "libbpf.h"
#include "bpf_util.h"
static int ifindex = -1;

View File

@ -17,7 +17,7 @@
#include <netinet/ether.h>
#include <unistd.h>
#include <time.h>
#include "bpf/libbpf.h"
#include "libbpf.h"
#include <bpf/bpf.h>
#include "bpf_util.h"
#include "xdp_tx_iptunnel_common.h"

View File

@ -27,8 +27,8 @@
#include <time.h>
#include <unistd.h>
#include "bpf/libbpf.h"
#include "bpf/xsk.h"
#include "libbpf.h"
#include "xsk.h"
#include <bpf/bpf.h>
#ifndef SOL_XDP