Home
last modified time | relevance | path

Searched refs:new_eth (Results 1 – 6 of 6) sorted by relevance

/linux-6.15/samples/bpf/
H A Dxdp_tx_iptunnel_kern.c72 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
74 new_eth->h_proto = h_proto; in set_ethhdr()
82 struct ethhdr *new_eth; in handle_ipv4() local
118 new_eth = data; in handle_ipv4()
119 iph = data + sizeof(*new_eth); in handle_ipv4()
122 if (new_eth + 1 > data_end || in handle_ipv4()
157 struct ethhdr *new_eth; in handle_ipv6() local
190 new_eth = data; in handle_ipv6()
191 ip6h = data + sizeof(*new_eth); in handle_ipv6()
[all …]
/linux-6.15/tools/testing/selftests/bpf/progs/
H A Dtest_xdp.c74 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
75 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
76 new_eth->h_proto = h_proto; in set_ethhdr()
84 struct ethhdr *new_eth; in handle_ipv4() local
118 new_eth = data; in handle_ipv4()
119 iph = data + sizeof(*new_eth); in handle_ipv4()
122 if (new_eth + 1 > data_end || in handle_ipv4()
127 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
157 struct ethhdr *new_eth; in handle_ipv6() local
188 new_eth = data; in handle_ipv6()
[all …]
H A Dtest_xdp_loop.c70 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
71 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
72 new_eth->h_proto = h_proto; in set_ethhdr()
80 struct ethhdr *new_eth; in handle_ipv4() local
114 new_eth = data; in handle_ipv4()
115 iph = data + sizeof(*new_eth); in handle_ipv4()
118 if (new_eth + 1 > data_end || in handle_ipv4()
123 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
153 struct ethhdr *new_eth; in handle_ipv6() local
184 new_eth = data; in handle_ipv6()
[all …]
H A Dtest_xdp_dynptr.c72 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
73 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
74 new_eth->h_proto = h_proto; in set_ethhdr()
84 struct ethhdr *new_eth; in handle_ipv4() local
126 if (!new_eth) in handle_ipv4()
129 iph = (struct iphdr *)(new_eth + 1); in handle_ipv4()
134 if (new_eth == eth_buffer) in handle_ipv4()
166 struct ethhdr *new_eth; in handle_ipv6() local
205 if (!new_eth) in handle_ipv6()
208 ip6h = (struct ipv6hdr *)(new_eth + 1); in handle_ipv6()
[all …]
H A Dtest_xdp_noinline.c283 struct eth_hdr *new_eth; in encap_v6() local
294 new_eth = data; in encap_v6()
297 if (new_eth + 1 > data_end || in encap_v6()
300 memcpy(new_eth->eth_dest, cval->mac, 6); in encap_v6()
301 memcpy(new_eth->eth_source, old_eth->eth_dest, 6); in encap_v6()
302 new_eth->eth_proto = 56710; in encap_v6()
336 struct eth_hdr *new_eth; in encap_v4() local
350 new_eth = data; in encap_v4()
353 if (new_eth + 1 > data_end || in encap_v4()
356 memcpy(new_eth->eth_dest, cval->mac, 6); in encap_v4()
[all …]
/linux-6.15/tools/testing/selftests/net/
H A Dnat6to4.bpf.c139 struct ethhdr *new_eth = data; in sched_cls_ingress6_nat_6_prog() local
142 *new_eth = eth2; in sched_cls_ingress6_nat_6_prog()
145 *(struct iphdr *)(new_eth + 1) = ip; in sched_cls_ingress6_nat_6_prog()
276 struct ethhdr *new_eth = data; in sched_cls_egress4_snat4_prog() local
279 *new_eth = eth2; in sched_cls_egress4_snat4_prog()
281 *(struct ipv6hdr *)(new_eth + 1) = ip6; in sched_cls_egress4_snat4_prog()