Home
last modified time | relevance | path

Searched refs:xdp_ptr (Results 1 – 2 of 2) sorted by relevance

/linux-6.6.21/tools/testing/selftests/bpf/progs/
Dtest_xdp_dynptr.c77 static __always_inline int handle_ipv4(struct xdp_md *xdp, struct bpf_dynptr *xdp_ptr) in handle_ipv4() argument
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()
159 static __always_inline int handle_ipv6(struct xdp_md *xdp, struct bpf_dynptr *xdp_ptr) in handle_ipv6() argument
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()
/linux-6.6.21/kernel/bpf/
Dhelpers.c2296 void *xdp_ptr = bpf_xdp_pointer(ptr->data, ptr->offset + offset, len); in bpf_dynptr_slice() local
2297 if (!IS_ERR_OR_NULL(xdp_ptr)) in bpf_dynptr_slice()
2298 return xdp_ptr; in bpf_dynptr_slice()