/linux-6.3-rc2/samples/bpf/ |
A D | parse_varlen.c | 26 if (tcp + 1 > data_end) in tcp() 37 if (udp + 1 > data_end) in udp() 57 if (iph + 1 > data_end) in parse_ipv4() 66 if (iph + 1 > data_end) in parse_ipv4() 86 if (ip6h + 1 > data_end) in parse_ipv6() 93 if (iph + 1 > data_end) in parse_ipv6() 99 if (ip6h + 1 > data_end) in parse_ipv6() 117 void *data_end = (void *)(long)skb->data_end; in handle_ingress() local 121 if (data + nh_off > data_end) in handle_ingress() 131 if (data + nh_off > data_end) in handle_ingress() [all …]
|
A D | xdp_redirect_cpu.bpf.c | 99 void *data_end = (void *)(long)ctx->data_end; in get_dest_port_ipv4_udp() local 119 void *data_end = (void *)(long)ctx->data_end; in get_proto_ipv4() local 131 void *data_end = (void *)(long)ctx->data_end; in get_proto_ipv6() local 170 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum1_touch_data() local 212 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum2_round_robin() local 257 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum3_proto_separate() local 323 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum4_ddos_filter_pktgen() local 399 void *data_end = (void *)(long)ctx->data_end; in get_ipv4_hash_ip_pair() local 416 void *data_end = (void *)(long)ctx->data_end; in get_ipv6_hash_ip_pair() local 440 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum5_lb_hash_ip_pairs() local [all …]
|
A D | xdp_tx_iptunnel_kern.c | 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() 116 data_end = (void *)(long)xdp->data_end; in handle_ipv4() 124 iph + 1 > data_end) in handle_ipv4() 154 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6() local 164 if (ip6h + 1 > data_end) in handle_ipv6() 188 data_end = (void *)(long)xdp->data_end; in handle_ipv6() 218 void *data_end = (void *)(long)xdp->data_end; in _xdp_tx_iptunnel() local [all …]
|
A D | tc_l2_redirect_kern.c | 64 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() 211 void *data_end = (void *)(long)skb->data_end; in _drop_non_tun_vip() local [all …]
|
A D | xdp1_kern.c | 24 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() 47 void *data_end = &pkt[XDPBUFSIZE-1]; in xdp_prog1() local 60 if (data + nh_off > data_end) in xdp_prog1() 71 if (data + nh_off > data_end) in xdp_prog1() 81 if (data + nh_off > data_end) in xdp_prog1() 87 ipproto = parse_ipv4(data, nh_off, data_end); in xdp_prog1() 89 ipproto = parse_ipv6(data, nh_off, data_end); in xdp_prog1()
|
A D | xdp2_kern.c | 40 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() 63 void *data_end = &pkt[XDPBUFSIZE-1]; in xdp_prog1() local 76 if (data + nh_off > data_end) in xdp_prog1() 87 if (data + nh_off > data_end) in xdp_prog1() 97 if (data + nh_off > data_end) in xdp_prog1() 103 ipproto = parse_ipv4(data, nh_off, data_end); in xdp_prog1() 105 ipproto = parse_ipv6(data, nh_off, data_end); in xdp_prog1()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | test_xdp.c | 55 if (th + 1 > data_end) in get_dport() 60 if (uh + 1 > data_end) in get_dport() 80 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4() local 93 if (iph + 1 > data_end) in handle_ipv4() 115 data_end = (void *)(long)xdp->data_end; in handle_ipv4() 123 iph + 1 > data_end) in handle_ipv4() 153 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6() local 185 data_end = (void *)(long)xdp->data_end; in handle_ipv6() 191 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6() 214 void *data_end = (void *)(long)xdp->data_end; in _xdp_tx_iptunnel() local [all …]
|
A D | test_xdp_loop.c | 51 if (th + 1 > data_end) in get_dport() 56 if (uh + 1 > data_end) in get_dport() 76 void *data_end = (void *)(long)xdp->data_end; in handle_ipv4() local 89 if (iph + 1 > data_end) in handle_ipv4() 111 data_end = (void *)(long)xdp->data_end; in handle_ipv4() 119 iph + 1 > data_end) in handle_ipv4() 149 void *data_end = (void *)(long)xdp->data_end; in handle_ipv6() local 181 data_end = (void *)(long)xdp->data_end; in handle_ipv6() 187 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6() 210 void *data_end = (void *)(long)xdp->data_end; in _xdp_tx_iptunnel() local [all …]
|
A D | test_xdp_noinline.c | 286 void *data_end; in encap_v6() local 292 data_end = (void *)(long)xdp->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() 345 old_eth + 1 > data_end || iph + 1 > data_end) in encap_v4() 391 *data_end = (void *)(long)xdp->data_end; in decap_v6() 409 *data_end = (void *)(long)xdp->data_end; in decap_v4() 793 data_end = (void *)(long)xdp->data_end; in process_packet() 804 void *data_end = (void *)(long)ctx->data_end; in balancer_ingress_v4() local [all …]
|
A D | test_xdp_do_redirect.c | 19 void *data_end = (void *)(long)xdp->data_end; in xdp_redirect() local 25 if (payload + 1 > data_end) in xdp_redirect() 54 static bool check_pkt(void *data, void *data_end) in check_pkt() argument 59 if (payload + 1 > data_end) in check_pkt() 76 void *data_end = (void *)(long)xdp->data_end; in xdp_count_pkts() local 78 if (check_pkt(data, data_end)) in xdp_count_pkts() 92 void *data_end = (void *)(long)skb->data_end; in tc_count_pkts() local 94 if (check_pkt(data, data_end)) in tc_count_pkts()
|
A D | xdpwall.c | 110 if (eth + 1 > data_end) in parse_ethhdr() 195 if (tcp + 1 > data_end) in parse_tcp() 210 if (udp + 1 > data_end) in parse_udp() 262 if (udp + 1 > data_end) in parse_gue_v6() 270 if (encap_data + 1 > data_end) in parse_gue_v6() 276 if (inner_ip6h + 1 > data_end) in parse_gue_v6() 286 if (inner_ip4h + 1 > data_end) in parse_gue_v6() 299 void *data, void *data_end) in parse_ipv6_gue() argument 303 if (ip6h + 1 > data_end) in parse_ipv6_gue() 320 void *data_end = (void *)(long)(ctx->data_end); in edgewall() local [all …]
|
A D | test_btf_skc_cls_ingress.c | 33 void *data_end; in test_syncookie_helper() local 35 data_end = (void *)(long)(skb->data_end); in test_syncookie_helper() 42 if ((void *)th + 40 > data_end) { in test_syncookie_helper() 75 void *data_end; in handle_ip6_tcp() local 77 data_end = (void *)(long)(skb->data_end); in handle_ip6_tcp() 80 if (th + 1 > data_end) in handle_ip6_tcp() 89 if ((void *)tuple + tuple_len > data_end) { in handle_ip6_tcp() 153 void *data_end; in cls_ingress() local 155 data_end = (void *)(long)(skb->data_end); in cls_ingress() 158 if (eth + 1 > data_end) in cls_ingress() [all …]
|
A D | test_tc_neigh_fib.c | 27 void *data_end = ctx_ptr(skb->data_end); in fill_fib_params_v4() local 31 if (data + sizeof(struct ethhdr) > data_end) in fill_fib_params_v4() 35 if ((void *)(ip4h + 1) > data_end) in fill_fib_params_v4() 55 void *data_end = ctx_ptr(skb->data_end); in fill_fib_params_v6() local 59 if (data + sizeof(struct ethhdr) > data_end) in fill_fib_params_v6() 63 if ((void *)(ip6h + 1) > data_end) in fill_fib_params_v6() 81 void *data_end = ctx_ptr(skb->data_end); in tc_chk() local 85 if (data + sizeof(struct ethhdr) > data_end) in tc_chk() 128 void *data_end = ctx_ptr(skb->data_end); in tc_redir() local 131 if (eth + 1 > data_end) in tc_redir()
|
A D | test_xdp_vlan.c | 57 bool parse_eth_frame(struct ethhdr *eth, void *data_end, struct parse_pkt *pkt) in parse_eth_frame() argument 64 if ((void *)eth + offset + (2*sizeof(struct _vlan_hdr)) > data_end) in parse_eth_frame() 108 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum0() local 112 if (!parse_eth_frame(data, data_end, &pkt)) in xdp_prognum0() 150 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum1() local 154 if (!parse_eth_frame(data, data_end, &pkt)) in xdp_prognum1() 184 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum2() local 189 if (!parse_eth_frame(data, data_end, &pkt)) in xdp_prognum2() 243 void *data_end = (void *)(long)ctx->data_end; in xdp_prognum3() local 248 if (!parse_eth_frame(orig_eth, data_end, &pkt)) in xdp_prognum3()
|
A D | test_tc_neigh.c | 42 void *data_end = ctx_ptr(skb->data_end); in is_remote_ep_v4() local 46 if (data + sizeof(struct ethhdr) > data_end) in is_remote_ep_v4() 50 if ((void *)(ip4h + 1) > data_end) in is_remote_ep_v4() 59 void *data_end = ctx_ptr(skb->data_end); in is_remote_ep_v6() local 63 if (data + sizeof(struct ethhdr) > data_end) in is_remote_ep_v6() 67 if ((void *)(ip6h + 1) > data_end) in is_remote_ep_v6() 76 void *data_end = ctx_ptr(skb->data_end); in tc_chk() local 80 if (data + sizeof(struct ethhdr) > data_end) in tc_chk()
|
A D | test_tcp_check_syncookie_kern.c | 37 if ((void *)tcph + thlen > data_end) in gen_syncookie() 46 void *data_end) in check_syncookie() argument 61 if (ethh + 1 > data_end) in check_syncookie() 67 if (ipv4h + 1 > data_end) in check_syncookie() 74 if (tcph + 1 > data_end) in check_syncookie() 90 seq_mss = gen_syncookie(data_end, sk, ipv4h, sizeof(*ipv4h), in check_syncookie() 99 if (ipv6h + 1 > data_end) in check_syncookie() 106 if (tcph + 1 > data_end) in check_syncookie() 122 seq_mss = gen_syncookie(data_end, sk, ipv6h, sizeof(*ipv6h), in check_syncookie() 155 (void *)(long)skb->data_end); in check_syncookie_clsact() [all …]
|
A D | test_pkt_access.c | 83 void *data_end = (void *)(long)skb->data_end; in test_pkt_write_access_subprog() local 90 if (tcp + 1 > data_end) in test_pkt_write_access_subprog() 100 void *data_end = (void *)(long)skb->data_end; in test_pkt_access() local 107 if (eth + 1 > data_end) in test_pkt_access() 113 if (iph + 1 > data_end) in test_pkt_access() 121 if (ip6h + 1 > data_end) in test_pkt_access() 137 if (((void *)(tcp) + 20) > data_end || proto != 6) in test_pkt_access() 140 if (((void *)(tcp) + 18) > data_end) in test_pkt_access()
|
A D | test_xdp_meta.c | 14 __u8 *data, *data_meta, *data_end; in ing_cls() local 18 data_end = ctx_ptr(ctx, data_end); in ing_cls() 21 if (data + ETH_ALEN > data_end || in ing_cls() 34 __u8 *data, *data_meta, *data_end; in ing_xdp() local 42 data_end = ctx_ptr(ctx, data_end); in ing_xdp() 45 if (data + ETH_ALEN > data_end || in ing_xdp()
|
A D | sockmap_parse_prog.c | 8 void *data_end = (void *)(long) skb->data_end; in bpf_prog1() local 13 if (data + 10 > data_end) { in bpf_prog1() 18 data_end = (void *)(long)skb->data_end; in bpf_prog1() 20 if (data + 10 > data_end) in bpf_prog1()
|
A D | xdp_synproxy_kern.c | 188 void *data_end; member 201 if (ctx->ptr >= ctx->data_end) in tscookie_tcpopt_parse() 264 .data_end = data_end, in tscookie_init() 357 if (hdr->eth + 1 > data_end) in tcp_dissect() 365 if (hdr->ipv4 + 1 > data_end) in tcp_dissect() 381 if (hdr->ipv6 + 1 > data_end) in tcp_dissect() 399 if (hdr->tcp + 1 > data_end) in tcp_dissect() 802 void *data_end = (void *)(long)ctx->data_end; in syncookie_xdp() local 811 data_end = (void *)(long)ctx->data_end; in syncookie_xdp() 820 void *data_end = (void *)(long)skb->data_end; in syncookie_tc() local [all …]
|
A D | test_tc_edt.c | 67 void *data_end = (void *)(long)skb->data_end; in handle_tcp() local 70 if ((void *)(tcp + 1) > data_end) in handle_tcp() 81 void *data_end = (void *)(long)skb->data_end; in handle_ipv4() local 87 if (data + sizeof(struct ethhdr) > data_end) in handle_ipv4() 90 if ((void *)(iph + 1) > data_end) in handle_ipv4() 93 if (((void *)iph) + ihl > data_end) in handle_ipv4()
|
A D | test_check_mtu.c | 61 void *data_end = (void *)(long)ctx->data_end; in xdp_exceed_mtu() local 64 __u32 data_len = data_end - data; in xdp_exceed_mtu() 88 void *data_end = (void *)(long)ctx->data_end; in xdp_minus_delta() local 91 __u32 data_len = data_end - data; in xdp_minus_delta() 112 void *data_end = (void *)(long)ctx->data_end; in xdp_input_len() local 115 __u32 data_len = data_end - data; in xdp_input_len() 203 void *data_end = (void *)(long)ctx->data_end; in tc_exceed_mtu_da() local 206 __u32 data_len = data_end - data; in tc_exceed_mtu_da()
|
A D | test_l4lb.c | 241 if (icmp_hdr + 1 > data_end) in parse_icmpv6() 247 if (ip6h + 1 > data_end) in parse_icmpv6() 263 if (icmp_hdr + 1 > data_end) in parse_icmp() 270 if (iph + 1 > data_end) in parse_icmp() 287 if (udp + 1 > data_end) in parse_udp() 306 if (tcp + 1 > data_end) in parse_tcp() 349 if (ip6h + 1 > data_end) in process_packet() 370 if (iph + 1 > data_end) in process_packet() 395 if (!parse_tcp(data, off, data_end, &pckt)) in process_packet() 454 void *data_end = (void *)(long)ctx->data_end; in balancer_ingress() local [all …]
|
A D | test_l4lb_noinline.c | 240 if (icmp_hdr + 1 > data_end) in parse_icmpv6() 246 if (ip6h + 1 > data_end) in parse_icmpv6() 262 if (icmp_hdr + 1 > data_end) in parse_icmp() 269 if (iph + 1 > data_end) in parse_icmp() 286 if (udp + 1 > data_end) in parse_udp() 305 if (tcp + 1 > data_end) in parse_tcp() 348 if (ip6h + 1 > data_end) in process_packet() 369 if (iph + 1 > data_end) in process_packet() 394 if (!parse_tcp(data, off, data_end, &pckt)) in process_packet() 453 void *data_end = (void *)(long)ctx->data_end; in balancer_ingress() local [all …]
|
/linux-6.3-rc2/tools/testing/selftests/net/ |
A D | nat6to4.c | 53 const void *data_end = (void *)(long)skb->data_end; in sched_cls_ingress6_nat_6_prog() local 66 if (data + l2_header_size + sizeof(*ip6) > data_end) in sched_cls_ingress6_nat_6_prog() 135 data_end = (void *)(long)skb->data_end; in sched_cls_ingress6_nat_6_prog() 136 if (data + l2_header_size + sizeof(struct iphdr) > data_end) in sched_cls_ingress6_nat_6_prog() 154 const void *data_end = (void *)(long)skb->data_end; in sched_cls_egress4_snat4_prog() local 163 if (data + l2_header_size + sizeof(struct ipv6hdr) > data_end) in sched_cls_egress4_snat4_prog() 210 if (data + sizeof(*ip4) + sizeof(struct udphdr) > data_end) in sched_cls_egress4_snat4_prog() 269 data_end = (void *)(long)skb->data_end; in sched_cls_egress4_snat4_prog() 273 if (data + l2_header_size + sizeof(ip6) > data_end) in sched_cls_egress4_snat4_prog()
|