/kernel/linux/linux-5.10/samples/bpf/ |
H A D | parse_varlen.c | 51 static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) in parse_ipv4() argument 56 iph = data + nh_off; in parse_ipv4() 65 iph = data + nh_off + ihl_len; 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 85 ip6h = data + nh_off; in parse_ipv6() 92 iph = data + nh_off + ihl_len; in parse_ipv6() 98 ip6h = data + nh_off + ihl_len; in parse_ipv6() 106 return tcp(data, nh_off in parse_ipv6() 118 uint64_t h_proto, nh_off; handle_ingress() local [all...] |
H A D | xdp1_kern.c | 24 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument 26 struct iphdr *iph = data + nh_off; in parse_ipv4() 33 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument 35 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6() 51 u64 nh_off; in xdp_prog1() local 54 nh_off = sizeof(*eth); in xdp_prog1() 55 if (data + nh_off > data_end) in xdp_prog1() 63 vhdr = data + nh_off; in xdp_prog1() 64 nh_off += sizeof(struct vlan_hdr); in xdp_prog1() 65 if (data + nh_off > data_en in xdp_prog1() [all...] |
H A D | xdp2_kern.c | 40 static int parse_ipv4(void *data, u64 nh_off, void *data_end) in parse_ipv4() argument 42 struct iphdr *iph = data + nh_off; in parse_ipv4() 49 static int parse_ipv6(void *data, u64 nh_off, void *data_end) in parse_ipv6() argument 51 struct ipv6hdr *ip6h = data + nh_off; in parse_ipv6() 67 u64 nh_off; in xdp_prog1() local 70 nh_off = sizeof(*eth); 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() 81 if (data + nh_off > data_en in xdp_prog1() [all...] |
H A D | xdp_router_ipv4_kern.c | 96 static inline int parse_ipv4(void *data, u64 nh_off, void *data_end, in parse_ipv4() argument 99 struct iphdr *iph = data + nh_off; in parse_ipv4() 121 u64 nh_off; in xdp_router_ipv4_prog() local 123 nh_off = sizeof(*eth); in xdp_router_ipv4_prog() 124 if (data + nh_off > data_end) in xdp_router_ipv4_prog() 132 vhdr = data + nh_off; in xdp_router_ipv4_prog() 133 nh_off += sizeof(struct vlan_hdr); 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()
|
H 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()
|
H A D | xdp_redirect_cpu_kern.c | 158 u16 get_dest_port_ipv4_udp(struct xdp_md *ctx, u64 nh_off) in get_dest_port_ipv4_udp() argument 162 struct iphdr *iph = data + nh_off; in get_dest_port_ipv4_udp() 180 int get_proto_ipv4(struct xdp_md *ctx, u64 nh_off) in get_proto_ipv4() argument 184 struct iphdr *iph = data + nh_off; in get_proto_ipv4() 192 int get_proto_ipv6(struct xdp_md *ctx, u64 nh_off) in get_proto_ipv6() argument 196 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6() 472 u32 get_ipv4_hash_ip_pair(struct xdp_md *ctx, u64 nh_off) in get_ipv4_hash_ip_pair() argument 476 struct iphdr *iph = data + nh_off; in get_ipv4_hash_ip_pair() 489 u32 get_ipv6_hash_ip_pair(struct xdp_md *ctx, u64 nh_off) in get_ipv6_hash_ip_pair() argument 493 struct ipv6hdr *ip6h = data + nh_off; in get_ipv6_hash_ip_pair() [all...] |
H A D | xdp_redirect_map_kern.c | 65 u64 nh_off; in xdp_redirect_map_prog() local 67 nh_off = sizeof(*eth); in xdp_redirect_map_prog() 68 if (data + nh_off > data_end) in xdp_redirect_map_prog()
|
H A D | xdp_redirect_kern.c | 65 u64 nh_off; in xdp_redirect_prog() local 67 nh_off = sizeof(*eth); in xdp_redirect_prog() 68 if (data + nh_off > data_end) in xdp_redirect_prog()
|
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | parse_varlen.c | 51 static int parse_ipv4(void *data, uint64_t nh_off, void *data_end) in parse_ipv4() argument 56 iph = data + nh_off; in parse_ipv4() 65 iph = data + nh_off + ihl_len; 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 85 ip6h = data + nh_off; in parse_ipv6() 92 iph = data + nh_off + ihl_len; in parse_ipv6() 98 ip6h = data + nh_off + ihl_len; in parse_ipv6() 106 return tcp(data, nh_off in parse_ipv6() 118 uint64_t h_proto, nh_off; handle_ingress() local [all...] |
H 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()
|
H 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()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H 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()
|
H A D | test_verif_scale3.c | 14 int 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()
|
H A D | test_verif_scale1.c | 14 int 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()
|
H A D | test_verif_scale2.c | 14 int 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()
|
H A D | core_kern.c | 80 int 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()
|
H 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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H 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()
|
H 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()
|
H 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()
|
H A D | test_sk_lookup_kern.c | 22 static struct bpf_sock_tuple *get_tuple(void *data, __u64 nh_off, in get_tuple() argument 31 struct iphdr *iph = (struct iphdr *)(data + nh_off); in get_tuple() 40 struct ipv6hdr *ip6h = (struct ipv6hdr *)(data + nh_off); in get_tuple() 50 if (data + nh_off + ihl_len > data_end || proto != IPPROTO_TCP) in get_tuple()
|
H A D | test_l4lb.c | 460 __u32 nh_off; in balancer_ingress() local 462 nh_off = sizeof(struct eth_hdr); in balancer_ingress() 463 if (data + nh_off > data_end) in balancer_ingress() 467 return process_packet(data, nh_off, data_end, false, ctx); in balancer_ingress() 469 return process_packet(data, nh_off, data_end, true, ctx); in balancer_ingress()
|
H 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()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | virtio_net.h | 144 unsigned int nh_off = p_off; in virtio_net_hdr_to_skb() local 149 nh_off -= thlen; in virtio_net_hdr_to_skb() 156 if (skb->len - nh_off > gso_size) { in virtio_net_hdr_to_skb()
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | virtio_net.h | 156 unsigned int nh_off = p_off; in virtio_net_hdr_to_skb() local 162 nh_off -= thlen; in virtio_net_hdr_to_skb() 181 if (skb->len - nh_off > gso_size) { in virtio_net_hdr_to_skb()
|