diff options
Diffstat (limited to 'samples/bpf/bpf_helpers.h')
| -rw-r--r-- | samples/bpf/bpf_helpers.h | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/samples/bpf/bpf_helpers.h b/samples/bpf/bpf_helpers.h index 90f44bd2045e..faaffe2e139a 100644 --- a/samples/bpf/bpf_helpers.h +++ b/samples/bpf/bpf_helpers.h @@ -57,6 +57,8 @@ static int (*bpf_skb_set_tunnel_opt)(void *ctx, void *md, int size) =  	(void *) BPF_FUNC_skb_set_tunnel_opt;  static unsigned long long (*bpf_get_prandom_u32)(void) =  	(void *) BPF_FUNC_get_prandom_u32; +static int (*bpf_xdp_adjust_head)(void *ctx, int offset) = +	(void *) BPF_FUNC_xdp_adjust_head;  /* llvm builtin functions that eBPF C program may use to   * emit BPF_LD_ABS and BPF_LD_IND instructions @@ -80,6 +82,8 @@ struct bpf_map_def {  	unsigned int map_flags;  }; +static int (*bpf_skb_load_bytes)(void *ctx, int off, void *to, int len) = +	(void *) BPF_FUNC_skb_load_bytes;  static int (*bpf_skb_store_bytes)(void *ctx, int off, void *from, int len, int flags) =  	(void *) BPF_FUNC_skb_store_bytes;  static int (*bpf_l3_csum_replace)(void *ctx, int off, int from, int to, int flags) = @@ -88,6 +92,8 @@ static int (*bpf_l4_csum_replace)(void *ctx, int off, int from, int to, int flag  	(void *) BPF_FUNC_l4_csum_replace;  static int (*bpf_skb_under_cgroup)(void *ctx, void *map, int index) =  	(void *) BPF_FUNC_skb_under_cgroup; +static int (*bpf_skb_change_head)(void *, int len, int flags) = +	(void *) BPF_FUNC_skb_change_head;  #if defined(__x86_64__) @@ -113,7 +119,7 @@ static int (*bpf_skb_under_cgroup)(void *ctx, void *map, int index) =  #define PT_REGS_FP(x) ((x)->gprs[11]) /* Works only with CONFIG_FRAME_POINTER */  #define PT_REGS_RC(x) ((x)->gprs[2])  #define PT_REGS_SP(x) ((x)->gprs[15]) -#define PT_REGS_IP(x) ((x)->ip) +#define PT_REGS_IP(x) ((x)->psw.addr)  #elif defined(__aarch64__)  |