Home
last modified time | relevance | path

Searched refs:old_eth (Results 1 – 5 of 5) sorted by relevance

/linux/samples/bpf/
H A Dxdp_tx_iptunnel_kern.c68 const struct ethhdr *old_eth, in set_ethhdr() argument
72 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
83 struct ethhdr *old_eth; in handle_ipv4() local
120 old_eth = data + sizeof(*iph); in handle_ipv4()
123 old_eth + 1 > data_end || in handle_ipv4()
127 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IP)); in handle_ipv4()
158 struct ethhdr *old_eth; in handle_ipv6() local
192 old_eth = data + sizeof(*ip6h); in handle_ipv6()
195 old_eth + 1 > data_end || in handle_ipv6()
199 set_ethhdr(new_eth, old_eth, tnl, htons(ETH_P_IPV6)); in handle_ipv6()
/linux/tools/testing/selftests/bpf/progs/
H A Dtest_xdp.c70 const struct ethhdr *old_eth, in set_ethhdr() argument
74 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
85 struct ethhdr *old_eth; in handle_ipv4() local
120 old_eth = data + sizeof(*iph); in handle_ipv4()
123 old_eth + 1 > data_end || in handle_ipv4()
127 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
158 struct ethhdr *old_eth; in handle_ipv6() local
190 old_eth = data + sizeof(*ip6h); in handle_ipv6()
192 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6()
196 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
H A Dtest_xdp_loop.c66 const struct ethhdr *old_eth, in set_ethhdr() argument
70 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
81 struct ethhdr *old_eth; in handle_ipv4() local
116 old_eth = data + sizeof(*iph); in handle_ipv4()
119 old_eth + 1 > data_end || in handle_ipv4()
123 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
154 struct ethhdr *old_eth; in handle_ipv6() local
186 old_eth = data + sizeof(*ip6h); in handle_ipv6()
188 if (new_eth + 1 > data_end || old_eth + 1 > data_end || in handle_ipv6()
192 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
H A Dtest_xdp_dynptr.c68 const struct ethhdr *old_eth, in set_ethhdr() argument
72 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
85 struct ethhdr *old_eth; in handle_ipv4() local
130 old_eth = (struct ethhdr *)(iph + 1); in handle_ipv4()
132 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
167 struct ethhdr *old_eth; in handle_ipv6() local
209 old_eth = (struct ethhdr *)(ip6h + 1); in handle_ipv6()
211 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IPV6)); in handle_ipv6()
H A Dtest_xdp_noinline.c284 struct eth_hdr *old_eth; in encap_v6() local
296 old_eth = data + sizeof(struct ipv6hdr); in encap_v6()
298 old_eth + 1 > data_end || ip6h + 1 > data_end) in encap_v6()
301 memcpy(new_eth->eth_source, old_eth->eth_dest, 6); in encap_v6()
337 struct eth_hdr *old_eth; in encap_v4() local
352 old_eth = data + sizeof(struct iphdr); in encap_v4()
354 old_eth + 1 > data_end || iph + 1 > data_end) in encap_v4()
357 memcpy(new_eth->eth_source, old_eth->eth_dest, 6); in encap_v4()