/Linux-v4.19/samples/bpf/ |
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 + ihl_len, data_end); in parse_ipv6() [all …]
|
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_end) in xdp_prog1() [all …]
|
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_end) in xdp_prog1() [all …]
|
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()
|
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()
|
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()
|
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()
|
D | xdp_redirect_cpu_kern.c | 155 u16 get_dest_port_ipv4_udp(struct xdp_md *ctx, u64 nh_off) in get_dest_port_ipv4_udp() argument 159 struct iphdr *iph = data + nh_off; in get_dest_port_ipv4_udp() 177 int get_proto_ipv4(struct xdp_md *ctx, u64 nh_off) in get_proto_ipv4() argument 181 struct iphdr *iph = data + nh_off; in get_proto_ipv4() 189 int get_proto_ipv6(struct xdp_md *ctx, u64 nh_off) in get_proto_ipv6() argument 193 struct ipv6hdr *ip6h = data + nh_off; in get_proto_ipv6() 469 u32 get_ipv4_hash_ip_pair(struct xdp_md *ctx, u64 nh_off) in get_ipv4_hash_ip_pair() argument 473 struct iphdr *iph = data + nh_off; in get_ipv4_hash_ip_pair() 486 u32 get_ipv6_hash_ip_pair(struct xdp_md *ctx, u64 nh_off) in get_ipv6_hash_ip_pair() argument 490 struct ipv6hdr *ip6h = data + nh_off; in get_ipv6_hash_ip_pair()
|
/Linux-v4.19/tools/testing/selftests/bpf/ |
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()
|
D | test_l4lb_noinline.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()
|
D | test_xdp_noinline.c | 818 __u32 nh_off; in balancer_ingress() local 820 nh_off = sizeof(struct eth_hdr); in balancer_ingress() 821 if (data + nh_off > data_end) in balancer_ingress() 825 return process_packet(data, nh_off, data_end, 0, ctx); in balancer_ingress() 827 return process_packet(data, nh_off, data_end, 1, ctx); in balancer_ingress()
|
/Linux-v4.19/drivers/net/ethernet/pasemi/ |
D | pasemi_mac.c | 1355 const int nh_off = skb_network_offset(skb); in pasemi_mac_queue_csdesc() local 1363 XCT_FUN_CRM_SIG | XCT_FUN_LLEN(skb->len - nh_off) | in pasemi_mac_queue_csdesc() 1390 CS_DESC(csring, fill) = XCT_PTR_LEN(map_size[0]-nh_off) | XCT_PTR_ADDR(map[0]+nh_off); in pasemi_mac_queue_csdesc() 1446 const int nh_off = skb_network_offset(skb); in pasemi_mac_start_tx() local 1478 dflags |= XCT_MACTX_IPO(nh_off); in pasemi_mac_start_tx() 1483 dflags |= XCT_MACTX_IPO(nh_off); in pasemi_mac_start_tx()
|
/Linux-v4.19/net/openvswitch/ |
D | conntrack.c | 734 int hooknum, nh_off, err = NF_ACCEPT; in ovs_ct_nat_execute() local 736 nh_off = skb_network_offset(skb); in ovs_ct_nat_execute() 737 skb_pull_rcsum(skb, nh_off); in ovs_ct_nat_execute() 802 skb_push(skb, nh_off); in ovs_ct_nat_execute() 803 skb_postpush_rcsum(skb, skb->data, nh_off); in ovs_ct_nat_execute()
|