Home
last modified time | relevance | path

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

/tools/testing/selftests/bpf/progs/
Dtest_xdp.c70 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument
75 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
76 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
77 new_eth->h_proto = h_proto; in set_ethhdr()
85 struct ethhdr *new_eth; in handle_ipv4() local
119 new_eth = data; in handle_ipv4()
120 iph = data + sizeof(*new_eth); in handle_ipv4()
123 if (new_eth + 1 > data_end || in handle_ipv4()
128 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
158 struct ethhdr *new_eth; in handle_ipv6() local
[all …]
Dtest_xdp_loop.c66 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument
71 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr()
72 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr()
73 new_eth->h_proto = h_proto; in set_ethhdr()
81 struct ethhdr *new_eth; in handle_ipv4() local
115 new_eth = data; in handle_ipv4()
116 iph = data + sizeof(*new_eth); in handle_ipv4()
119 if (new_eth + 1 > data_end || in handle_ipv4()
124 set_ethhdr(new_eth, old_eth, tnl, bpf_htons(ETH_P_IP)); in handle_ipv4()
154 struct ethhdr *new_eth; in handle_ipv6() local
[all …]
Dtest_xdp_noinline.c282 struct eth_hdr *new_eth; in encap_v6() local
293 new_eth = data; in encap_v6()
296 if (new_eth + 1 > data_end || in encap_v6()
299 memcpy(new_eth->eth_dest, cval->mac, 6); in encap_v6()
300 memcpy(new_eth->eth_source, old_eth->eth_dest, 6); in encap_v6()
301 new_eth->eth_proto = 56710; in encap_v6()
327 struct eth_hdr *new_eth; in encap_v4() local
341 new_eth = data; in encap_v4()
344 if (new_eth + 1 > data_end || in encap_v4()
347 memcpy(new_eth->eth_dest, cval->mac, 6); in encap_v4()
[all …]