Home
last modified time | relevance | path

Searched refs:data_end (Results 1 – 17 of 17) sorted by relevance

/samples/bpf/
Dparse_varlen.c22 static int tcp(void *data, uint64_t tp_off, void *data_end) in tcp() argument
26 if (tcp + 1 > data_end) in tcp()
33 static int udp(void *data, uint64_t tp_off, void *data_end) in udp() argument
37 if (udp + 1 > data_end) in udp()
51 static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) in parse_ipv4() argument
57 if (iph + 1 > data_end) in parse_ipv4()
66 if (iph + 1 > data_end) in parse_ipv4()
72 return tcp(data, nh_off + ihl_len, data_end); in parse_ipv4()
74 return udp(data, nh_off + ihl_len, data_end); in parse_ipv4()
78 static int parse_ipv6(void *data, uint64_t nh_off, void *data_end) in parse_ipv6() argument
[all …]
Dxdp1_kern.c24 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument
28 if (iph + 1 > data_end) in parse_ipv4()
33 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument
37 if (ip6h + 1 > data_end) in parse_ipv6()
45 void *data_end = (void *)(long)ctx->data_end; in xdp_prog1() local
55 if (data + nh_off > data_end) in xdp_prog1()
65 if (data + nh_off > data_end) in xdp_prog1()
74 if (data + nh_off > data_end) in xdp_prog1()
80 ipproto = parse_ipv4(data, nh_off, data_end); in xdp_prog1()
82 ipproto = parse_ipv6(data, nh_off, data_end); in xdp_prog1()
Dxdp_tx_iptunnel_kern.c45 static __always_inline int get_dport(void *trans_data, void *data_end, in get_dport() argument
54 if (th + 1 > data_end) in get_dport()
59 if (uh + 1 > data_end) in get_dport()
79 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4() local
92 if (iph + 1 > data_end) in handle_ipv4()
95 dport = get_dport(iph + 1, data_end, iph->protocol); in handle_ipv4()
116 data_end = (void *)(long)xdp->data_end; in handle_ipv4()
122 if (new_eth + 1 > data_end || in handle_ipv4()
123 old_eth + 1 > data_end || in handle_ipv4()
124 iph + 1 > data_end) in handle_ipv4()
[all …]
Dxdp2_kern.c40 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument
44 if (iph + 1 > data_end) in parse_ipv4()
49 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument
53 if (ip6h + 1 > data_end) in parse_ipv6()
61 void *data_end = (void *)(long)ctx->data_end; in xdp_prog1() local
71 if (data + nh_off > data_end) in xdp_prog1()
81 if (data + nh_off > data_end) in xdp_prog1()
90 if (data + nh_off > data_end) in xdp_prog1()
96 ipproto = parse_ipv4(data, nh_off, data_end); in xdp_prog1()
98 ipproto = parse_ipv6(data, nh_off, data_end); in xdp_prog1()
Dtc_l2_redirect_kern.c64 void *data_end = (void *)(long)skb->data_end; in _l2_to_iptun_ingress_forward() local
69 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_forward()
80 if (data + sizeof(*eth) + sizeof(*iph) > data_end) in _l2_to_iptun_ingress_forward()
93 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in _l2_to_iptun_ingress_forward()
115 void *data_end = (void *)(long)skb->data_end; in _l2_to_iptun_ingress_redirect() local
120 if (data + sizeof(*eth) > data_end) in _l2_to_iptun_ingress_redirect()
132 if (data + sizeof(*eth) + sizeof(*iph) > data_end) in _l2_to_iptun_ingress_redirect()
156 void *data_end = (void *)(long)skb->data_end; in _l2_to_ip6tun_ingress_redirect() local
159 if (data + sizeof(*eth) > data_end) in _l2_to_ip6tun_ingress_redirect()
170 if (data + sizeof(*eth) + sizeof(*iph) > data_end) in _l2_to_ip6tun_ingress_redirect()
[all …]
Dxdp_redirect_cpu_kern.c115 bool parse_eth(struct ethhdr *eth, void *data_end, in parse_eth() argument
122 if ((void *)eth + offset > data_end) in parse_eth()
137 if ((void *)eth + offset > data_end) in parse_eth()
147 if ((void *)eth + offset > data_end) in parse_eth()
160 void *data_end = (void *)(long)ctx->data_end; in get_dest_port_ipv4_udp() local
166 if (iph + 1 > data_end) in get_dest_port_ipv4_udp()
172 if (udph + 1 > data_end) in get_dest_port_ipv4_udp()
182 void *data_end = (void *)(long)ctx->data_end; in get_proto_ipv4() local
186 if (iph + 1 > data_end) in get_proto_ipv4()
194 void *data_end = (void *)(long)ctx->data_end; in get_proto_ipv6() local
[all …]
Dxdp_sample_pkts_kern.c18 void *data_end = (void *)(long)ctx->data_end; in xdp_sample_prog() local
27 if (data < data_end) { in xdp_sample_prog()
43 metadata.pkt_len = (u16)(data_end - data); in xdp_sample_prog()
Dxdp_adjust_tail_kern.c77 void *data_end = (void *)(long)xdp->data_end; in send_icmp4_too_big() local
79 if (data + (ICMP_TOOBIG_SIZE + headroom) > data_end) in send_icmp4_too_big()
122 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4() local
124 int pckt_size = data_end - data; in handle_ipv4()
139 void *data_end = (void *)(long)xdp->data_end; in _xdp_icmp() local
144 if (eth + 1 > data_end) in _xdp_icmp()
Dparse_simple.c33 void *data_end = (void *)(long)skb->data_end; in handle_ingress() local
36 if (data + sizeof(*eth) + sizeof(*iph) + sizeof(*udp) > data_end) in handle_ingress()
Dxdp2skb_meta_kern.c35 void *data, *data_end; in _xdp_mark() local
66 void *data_end = (void *)(unsigned long)ctx->data_end; in _tc_mark() local
Dxdp_router_ipv4_kern.c96 static inline int parse_ipv4(void *data, u64 nh_off, void *data_end, in parse_ipv4() argument
101 if (iph + 1 > data_end) in parse_ipv4()
111 void *data_end = (void *)(long)ctx->data_end; in xdp_router_ipv4_prog() local
124 if (data + nh_off > data_end) in xdp_router_ipv4_prog()
134 if (data + nh_off > data_end) in xdp_router_ipv4_prog()
144 ipproto = parse_ipv4(data, nh_off, data_end, &src_ip, &dest_ip); in xdp_router_ipv4_prog()
Dtest_cgrp2_tc_kern.c47 void *data_end = (void *)(long)skb->data_end; in handle_egress() local
53 if (data + sizeof(*eth) + sizeof(*ip6h) > data_end) in handle_egress()
Dxdp_redirect_map_kern.c58 void *data_end = (void *)(long)ctx->data_end; in xdp_redirect_map_prog() local
68 if (data + nh_off > data_end) in xdp_redirect_map_prog()
Dxdp_redirect_kern.c58 void *data_end = (void *)(long)ctx->data_end; in xdp_redirect_prog() local
68 if (data + nh_off > data_end) in xdp_redirect_prog()
Dxdp_fwd_kern.c45 void *data_end = (void *)(long)ctx->data_end; in xdp_fwd_flags() local
56 if (data + nh_off > data_end) in xdp_fwd_flags()
65 if (iph + 1 > data_end) in xdp_fwd_flags()
84 if (ip6h + 1 > data_end) in xdp_fwd_flags()
Dxdp_rxq_info_kern.c77 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum0() local
123 if (eth + 1 > data_end) in xdp_prognum0()
Dtest_lwt_bpf.c71 void *data_end = (void *)(long)skb->data_end; in do_test_data() local
74 if (data + sizeof(*iph) > data_end) { in do_test_data()