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:
		
							parent
							
								
									fa206dccd8
								
							
						
					
					
						commit
						4d18f6de6a
					
				| @ -14,7 +14,7 @@ | ||||
| 
 | ||||
| #include <bpf/bpf.h> | ||||
| 
 | ||||
| #include "bpf/libbpf.h" | ||||
| #include "libbpf.h" | ||||
| #include "bpf_insn.h" | ||||
| #include "sock_example.h" | ||||
| 
 | ||||
|  | ||||
| @ -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 */ | ||||
|  | ||||
| @ -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) | ||||
| { | ||||
|  | ||||
| @ -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> | ||||
|  | ||||
| @ -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> | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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 | ||||
| 
 | ||||
|  | ||||
| @ -24,7 +24,7 @@ | ||||
| #include <fcntl.h> | ||||
| #include <libgen.h> | ||||
| 
 | ||||
| #include "bpf/libbpf.h" | ||||
| #include "libbpf.h" | ||||
| #include <bpf/bpf.h> | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -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" | ||||
| 
 | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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> | ||||
| 
 | ||||
|  | ||||
| @ -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; | ||||
|  | ||||
| @ -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" | ||||
|  | ||||
| @ -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 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user