/linux/tools/testing/selftests/bpf/progs/ |
H A D | ip_check_defrag.c | 17 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, uint32_t offset, 54 iph = bpf_dynptr_slice(&ptr, 0, iph_buf, sizeof(iph_buf)); in handle_v4() 76 ip6h = bpf_dynptr_slice(&ptr, 0, ip6h_buf, sizeof(ip6h_buf)); in handle_v6()
|
H A D | verifier_netfilter_ctx.c | 84 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, uint32_t offset, 105 iph = bpf_dynptr_slice(&ptr, 0, buffer_iph, sizeof(buffer_iph)); in with_valid_ctx_access_test6() 114 th = bpf_dynptr_slice(&ptr, ihl, buffer_th, sizeof(buffer_th)); in with_valid_ctx_access_test6()
|
H A D | test_l4lb_noinline_dynptr.c | 242 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6() 249 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_icmpv6() 267 icmp_hdr = bpf_dynptr_slice(skb_ptr, off, buffer_icmp, sizeof(buffer_icmp)); in parse_icmp() 274 iph = bpf_dynptr_slice(skb_ptr, off, buffer_ip, sizeof(buffer_ip)); in parse_icmp() 290 udp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_udp() 310 tcp = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in parse_tcp() 354 ip6h = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet() 377 iph = bpf_dynptr_slice(skb_ptr, off, buffer, sizeof(buffer)); in process_packet()
|
H A D | test_xdp_dynptr.c | 99 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_udp, sizeof(iph_buffer_udp)); in handle_ipv4() 101 iph = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, iph_buffer_tcp, sizeof(iph_buffer_tcp)); in handle_ipv4() 178 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_udp, sizeof(ip6h_buffer_udp)); in handle_ipv6() 180 ip6h = bpf_dynptr_slice(xdp_ptr, ethhdr_sz, ip6h_buffer_tcp, sizeof(ip6h_buffer_tcp)); in handle_ipv6() 241 eth = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in _xdp_tx_iptunnel()
|
H A D | test_parse_tcp_hdr_opt_dynptr.c | 39 data = bpf_dynptr_slice(ptr, *off, buffer, sizeof(buffer)); in parse_hdr_opt() 90 tcp_hdr = bpf_dynptr_slice(&ptr, off, buffer, sizeof(buffer)); in xdp_ingress_v6()
|
H A D | dynptr_fail.c | 1082 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_slice_write() 1103 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice1() 1156 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in skb_invalid_data_slice3() 1205 hdr = bpf_dynptr_slice(&ptr, 0, buffer, sizeof(buffer)); in xdp_invalid_data_slice1() 1325 hdr = bpf_dynptr_slice(&ptr, 0, buffer, hdr_size); in dynptr_slice_var_len1() 1710 data = bpf_dynptr_slice(&ptr, 0, buffer, 9); in test_dynptr_skb_small_buff()
|
H A D | dynptr_success.c | 523 data = bpf_dynptr_slice(&ptr, 0, NULL, 1); in test_dynptr_skb_no_buff() 540 data = bpf_dynptr_slice(&ptr, 0, NULL, 10); in test_dynptr_skb_strcmp()
|
H A D | verifier_global_subprogs.c | 371 d = bpf_dynptr_slice(dptr, 0, &buf, sizeof(long)); in subprog_dynptr()
|
H A D | test_tunnel_kern.c | 997 iph = bpf_dynptr_slice(&ptr, off, iph_buf, sizeof(iph_buf)); in xfrm_get_state_xdp() 1002 esph = bpf_dynptr_slice(&ptr, off, esph_buf, sizeof(esph_buf)); in xfrm_get_state_xdp()
|
/linux/tools/testing/selftests/bpf/ |
H A D | bpf_kfuncs.h | 28 extern void *bpf_dynptr_slice(const struct bpf_dynptr *ptr, __u32 offset,
|
/linux/kernel/bpf/ |
H A D | helpers.c | 2552 __bpf_kfunc void *bpf_dynptr_slice(const struct bpf_dynptr *p, u32 offset, in bpf_dynptr_slice() function 2667 return bpf_dynptr_slice(p, offset, buffer__opt, buffer__szk); in bpf_dynptr_slice_rdwr() 3093 BTF_ID_FLAGS(func, bpf_dynptr_slice, KF_RET_NULL) 3171 return bpf_dynptr_slice(p, 0, NULL, len); in __bpf_dynptr_data()
|
H A D | verifier.c | 11272 BTF_ID(func, bpf_dynptr_slice) in BTF_ID() 11301 BTF_ID(func, bpf_dynptr_slice) in BTF_ID()
|
/linux/Documentation/bpf/ |
H A D | kfuncs.rst | 128 __bpf_kfunc void *bpf_dynptr_slice(..., void *buffer__opt, u32 buffer__szk)
|