/linux-6.3-rc2/samples/bpf/ |
A D | parse_varlen.c | 56 iph = data + nh_off; in parse_ipv4() 65 iph = data + nh_off + ihl_len; in parse_ipv4() 85 ip6h = data + nh_off; in parse_ipv6() 92 iph = data + nh_off + ihl_len; in parse_ipv6() 118 uint64_t h_proto, nh_off; in handle_ingress() local 120 nh_off = sizeof(*eth); in handle_ingress() 121 if (data + nh_off > data_end) in handle_ingress() 129 vhdr = data + nh_off; in handle_ingress() 131 if (data + nh_off > data_end) in handle_ingress() 138 vhdr = data + nh_off; in handle_ingress() [all …]
|
A D | xdp1_kern.c | 26 struct iphdr *iph = data + nh_off; in parse_ipv4() 35 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6() 53 u64 nh_off; in xdp_prog1() local 59 nh_off = sizeof(*eth); in xdp_prog1() 60 if (data + nh_off > data_end) in xdp_prog1() 69 vhdr = data + nh_off; in xdp_prog1() 70 nh_off += sizeof(struct vlan_hdr); in xdp_prog1() 71 if (data + nh_off > data_end) in xdp_prog1() 79 vhdr = data + nh_off; in xdp_prog1() 80 nh_off += sizeof(struct vlan_hdr); in xdp_prog1() [all …]
|
A D | xdp2_kern.c | 42 struct iphdr *iph = data + nh_off; in parse_ipv4() 51 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6() 69 u64 nh_off; in xdp_prog1() local 75 nh_off = sizeof(*eth); in xdp_prog1() 76 if (data + nh_off > data_end) in xdp_prog1() 85 vhdr = data + nh_off; in xdp_prog1() 86 nh_off += sizeof(struct vlan_hdr); in xdp_prog1() 87 if (data + nh_off > data_end) in xdp_prog1() 95 vhdr = data + nh_off; in xdp_prog1() 96 nh_off += sizeof(struct vlan_hdr); in xdp_prog1() [all …]
|
A D | xdp_redirect_map.bpf.c | 45 u64 nh_off; in xdp_redirect_map() local 47 nh_off = sizeof(*eth); in xdp_redirect_map() 48 if (data + nh_off > data_end) in xdp_redirect_map() 78 u64 nh_off; in xdp_redirect_map_egress() local 80 nh_off = sizeof(*eth); in xdp_redirect_map_egress() 81 if (data + nh_off > data_end) in xdp_redirect_map_egress()
|
A D | xdp_redirect_cpu.bpf.c | 101 struct iphdr *iph = data + nh_off; in get_dest_port_ipv4_udp() 121 struct iphdr *iph = data + nh_off; in get_proto_ipv4() 133 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6() 401 struct iphdr *iph = data + nh_off; in get_ipv4_hash_ip_pair() 418 struct ipv6hdr *ip6h = data + nh_off; in get_ipv6_hash_ip_pair() 500 u64 nh_off; in xdp_redirect_cpu_devmap() local 502 nh_off = sizeof(*eth); in xdp_redirect_cpu_devmap() 503 if (data + nh_off > data_end) in xdp_redirect_cpu_devmap() 528 u64 nh_off; in xdp_redirect_egress_prog() local 530 nh_off = sizeof(*eth); in xdp_redirect_egress_prog() [all …]
|
A D | xdp_router_ipv4.bpf.c | 79 u64 nh_off = sizeof(*eth); in xdp_router_ipv4_prog() local 88 if (data + nh_off > data_end) in xdp_router_ipv4_prog() 96 vhdr = data + nh_off; in xdp_router_ipv4_prog() 97 nh_off += sizeof(struct vlan_hdr); in xdp_router_ipv4_prog() 98 if (data + nh_off > data_end) in xdp_router_ipv4_prog() 110 struct iphdr *iph = data + nh_off; in xdp_router_ipv4_prog()
|
A D | xdp_fwd_kern.c | 52 u64 nh_off; in xdp_fwd_flags() local 55 nh_off = sizeof(*eth); in xdp_fwd_flags() 56 if (data + nh_off > data_end) in xdp_fwd_flags() 63 iph = data + nh_off; in xdp_fwd_flags() 83 ip6h = data + nh_off; in xdp_fwd_flags()
|
A D | xdp_redirect.bpf.c | 27 u64 nh_off; in xdp_redirect_prog() local 29 nh_off = sizeof(*eth); in xdp_redirect_prog() 30 if (data + nh_off > data_end) in xdp_redirect_prog()
|
A D | xdp_redirect_map_multi.bpf.c | 64 u64 nh_off; in xdp_devmap_prog() local 66 nh_off = sizeof(*eth); in xdp_devmap_prog() 67 if (data + nh_off > data_end) in xdp_devmap_prog()
|
/linux-6.3-rc2/tools/testing/selftests/bpf/progs/ |
A D | xdp_redirect_multi_kern.c | 45 __u64 nh_off; in xdp_redirect_map_multi_prog() local 47 nh_off = sizeof(*eth); in xdp_redirect_map_multi_prog() 48 if (data + nh_off > data_end) in xdp_redirect_map_multi_prog() 80 __u64 nh_off; in xdp_devmap_prog() local 83 nh_off = sizeof(*eth); in xdp_devmap_prog() 84 if (data + nh_off > data_end) in xdp_devmap_prog()
|
A D | test_verif_scale1.c | 14 int ret = 0, nh_off, i = 0; in balancer_ingress() local 16 nh_off = 14; in balancer_ingress() 22 if (ptr + nh_off > data_end) \ in balancer_ingress() 24 ctx->tc_index = jhash(ptr, nh_off, ctx->cb[0] + i++); \ in balancer_ingress()
|
A D | test_verif_scale2.c | 14 int ret = 0, nh_off, i = 0; in balancer_ingress() local 16 nh_off = 14; in balancer_ingress() 22 if (ptr + nh_off > data_end) \ in balancer_ingress() 24 ctx->tc_index = jhash(ptr, nh_off, ctx->cb[0] + i++); \ in balancer_ingress()
|
A D | test_verif_scale3.c | 14 int ret = 0, nh_off, i = 0; in balancer_ingress() local 16 nh_off = 32; in balancer_ingress() 22 if (ptr + nh_off > data_end) \ in balancer_ingress() 24 ctx->tc_index = jhash(ptr, nh_off, ctx->cb[0] + i++); \ in balancer_ingress()
|
A D | core_kern.c | 80 int ret = 0, nh_off, i = 0; in balancer_ingress() local 82 nh_off = 14; in balancer_ingress() 87 if (ptr + nh_off > data_end) \ in balancer_ingress() 89 ctx->tc_index = jhash(ptr, nh_off, ctx->cb[0] + i++); \ in balancer_ingress()
|
A D | test_sk_lookup_kern.c | 21 static struct bpf_sock_tuple *get_tuple(void *data, __u64 nh_off, in get_tuple() argument 30 struct iphdr *iph = (struct iphdr *)(data + nh_off); in get_tuple() 39 struct ipv6hdr *ip6h = (struct ipv6hdr *)(data + nh_off); in get_tuple() 49 if (data + nh_off + ihl_len > data_end || proto != IPPROTO_TCP) in get_tuple()
|
A D | test_l4lb.c | 458 __u32 nh_off; in balancer_ingress() local 460 nh_off = sizeof(struct eth_hdr); in balancer_ingress() 461 if (data + nh_off > data_end) in balancer_ingress() 465 return process_packet(data, nh_off, data_end, false, ctx); in balancer_ingress() 467 return process_packet(data, nh_off, data_end, true, ctx); in balancer_ingress()
|
A D | test_l4lb_noinline.c | 457 __u32 nh_off; in balancer_ingress() local 459 nh_off = sizeof(struct eth_hdr); in balancer_ingress() 460 if (data + nh_off > data_end) in balancer_ingress() 464 return process_packet(data, nh_off, data_end, false, ctx); in balancer_ingress() 466 return process_packet(data, nh_off, data_end, true, ctx); in balancer_ingress()
|
A D | test_xdp_noinline.c | 807 __u32 nh_off; in balancer_ingress_v4() local 809 nh_off = sizeof(struct eth_hdr); in balancer_ingress_v4() 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() 826 __u32 nh_off; in balancer_ingress_v6() local 828 nh_off = sizeof(struct eth_hdr); in balancer_ingress_v6() 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()
|
A D | fexit_bpf2bpf.c | 124 __u32 nh_off; in new_get_skb_ifindex() local
|
/linux-6.3-rc2/include/linux/ |
A D | virtio_net.h | 151 unsigned int nh_off = p_off; in virtio_net_hdr_to_skb() local 156 nh_off -= thlen; in virtio_net_hdr_to_skb() 159 if (skb->len - nh_off > gso_size) { in virtio_net_hdr_to_skb()
|
/linux-6.3-rc2/drivers/net/ethernet/pasemi/ |
A D | pasemi_mac.c | 1348 const int nh_off = skb_network_offset(skb); in pasemi_mac_queue_csdesc() local 1356 XCT_FUN_CRM_SIG | XCT_FUN_LLEN(skb->len - nh_off) | in pasemi_mac_queue_csdesc() 1383 CS_DESC(csring, fill) = XCT_PTR_LEN(map_size[0]-nh_off) | XCT_PTR_ADDR(map[0]+nh_off); in pasemi_mac_queue_csdesc() 1438 const int nh_off = skb_network_offset(skb); in pasemi_mac_start_tx() local 1470 dflags |= XCT_MACTX_IPO(nh_off); in pasemi_mac_start_tx() 1475 dflags |= XCT_MACTX_IPO(nh_off); in pasemi_mac_start_tx()
|