Lines Matching refs:data_end
232 bool parse_udp(void *data, void *data_end, in parse_udp() argument
241 if (udp + 1 > data_end) in parse_udp()
254 bool parse_tcp(void *data, void *data_end, in parse_tcp() argument
263 if (tcp + 1 > data_end) in parse_tcp()
286 void *data_end; in encap_v6() local
292 data_end = (void *)(long)xdp->data_end; in encap_v6()
296 if (new_eth + 1 > data_end || in encap_v6()
297 old_eth + 1 > data_end || ip6h + 1 > data_end) in encap_v6()
332 void *data_end; in encap_v4() local
340 data_end = (void *)(long)xdp->data_end; in encap_v4()
344 if (new_eth + 1 > data_end || in encap_v4()
345 old_eth + 1 > data_end || iph + 1 > data_end) in encap_v4()
375 bool decap_v6(struct xdp_md *xdp, void **data, void **data_end, bool inner_v4) in decap_v6() argument
391 *data_end = (void *)(long)xdp->data_end; in decap_v6()
396 bool decap_v4(struct xdp_md *xdp, void **data, void **data_end) in decap_v4() argument
409 *data_end = (void *)(long)xdp->data_end; in decap_v4()
414 int swap_mac_and_send(void *data, void *data_end) in swap_mac_and_send() argument
427 int send_icmp_reply(void *data, void *data_end) in send_icmp_reply() argument
438 + sizeof(struct iphdr) + sizeof(struct icmphdr) > data_end) in send_icmp_reply()
456 return swap_mac_and_send(data, data_end); in send_icmp_reply()
460 int send_icmp6_reply(void *data, void *data_end) in send_icmp6_reply() argument
468 + sizeof(struct ipv6hdr) + sizeof(struct icmp6hdr) > data_end) in send_icmp6_reply()
480 return swap_mac_and_send(data, data_end); in send_icmp6_reply()
484 int parse_icmpv6(void *data, void *data_end, __u64 off, in parse_icmpv6() argument
491 if (icmp_hdr + 1 > data_end) in parse_icmpv6()
494 return send_icmp6_reply(data, data_end); in parse_icmpv6()
499 if (ip6h + 1 > data_end) in parse_icmpv6()
509 int parse_icmp(void *data, void *data_end, __u64 off, in parse_icmp() argument
516 if (icmp_hdr + 1 > data_end) in parse_icmp()
519 return send_icmp_reply(data, data_end); in parse_icmp()
524 if (iph + 1 > data_end) in parse_icmp()
631 void *data_end) in process_l3_headers_v6() argument
638 if (ip6h + 1 > data_end) in process_l3_headers_v6()
648 action = parse_icmpv6(data, data_end, off, pckt); in process_l3_headers_v6()
662 void *data_end) in process_l3_headers_v4() argument
669 if (iph + 1 > data_end) in process_l3_headers_v4()
680 action = parse_icmp(data, data_end, off, pckt); in process_l3_headers_v4()
691 static int process_packet(void *data, __u64 off, void *data_end, in process_packet() argument
714 &pkt_bytes, data, data_end); in process_packet()
717 &pkt_bytes, data, data_end); in process_packet()
722 if (!parse_tcp(data, data_end, is_ipv6, &pckt)) in process_packet()
725 if (!parse_udp(data, data_end, is_ipv6, &pckt)) in process_packet()
746 if (data_end - data > 1400) in process_packet()
793 data_end = (void *)(long)xdp->data_end; in process_packet()
794 if (data + 4 > data_end) in process_packet()
804 void *data_end = (void *)(long)ctx->data_end; in balancer_ingress_v4() local
810 if (data + nh_off > data_end) in balancer_ingress_v4()
814 return process_packet(data, nh_off, data_end, 0, ctx); in balancer_ingress_v4()
823 void *data_end = (void *)(long)ctx->data_end; in balancer_ingress_v6() local
829 if (data + nh_off > data_end) in balancer_ingress_v6()
833 return process_packet(data, nh_off, data_end, 1, ctx); in balancer_ingress_v6()