| /tools/testing/selftests/bpf/progs/ |
| A D | test_tc_peer.c | 51 if (bpf_skb_store_bytes(skb, 0, &src_mac, ETH_ALEN, 0) != 0) in tc_src_l3() 54 if (bpf_skb_store_bytes(skb, ETH_ALEN, &dst_mac, ETH_ALEN, 0) != 0) in tc_src_l3() 57 if (bpf_skb_store_bytes(skb, ETH_ALEN + ETH_ALEN, &proto, sizeof(__u16), 0) != 0) in tc_src_l3()
|
| A D | xdp_features.c | 204 __u8 tmp_mac[ETH_ALEN]; in xdp_do_tx() 209 __builtin_memcpy(tmp_mac, eh->h_source, ETH_ALEN); in xdp_do_tx() 210 __builtin_memcpy(eh->h_source, eh->h_dest, ETH_ALEN); in xdp_do_tx() 211 __builtin_memcpy(eh->h_dest, tmp_mac, ETH_ALEN); in xdp_do_tx() 256 __u8 tmp_mac[ETH_ALEN]; in xdp_do_redirect_cpumap() 261 __builtin_memcpy(tmp_mac, eh->h_source, ETH_ALEN); in xdp_do_redirect_cpumap() 262 __builtin_memcpy(eh->h_source, eh->h_dest, ETH_ALEN); in xdp_do_redirect_cpumap() 263 __builtin_memcpy(eh->h_dest, tmp_mac, ETH_ALEN); in xdp_do_redirect_cpumap()
|
| A D | test_xdp_do_redirect.c | 5 #define ETH_ALEN 6 macro 22 const volatile __u8 expect_dst[ETH_ALEN];
|
| A D | test_tc_neigh_fib.c | 94 __u8 zero[ETH_ALEN * 2]; in tc_redir() 134 __builtin_memcpy(eth->h_dest, fib_params.dmac, ETH_ALEN); in tc_redir() 135 __builtin_memcpy(eth->h_source, fib_params.smac, ETH_ALEN); in tc_redir()
|
| A D | test_xdp_vlan.c | 176 #ifndef ETH_ALEN /* Ethernet MAC address length */ 177 #define ETH_ALEN 6 /* bytes */ macro 203 __builtin_memmove(dest, data, ETH_ALEN * 2); in xdp_vlan_remove_outer()
|
| A D | test_tc_neigh.c | 89 __u8 zero[ETH_ALEN * 2]; in tc_dst() 114 __u8 zero[ETH_ALEN * 2]; in tc_src()
|
| A D | xdp_redirect_multi_kern.c | 106 __builtin_memcpy(eth->h_source, mac, ETH_ALEN); in xdp_devmap_prog()
|
| A D | xdp_redirect_map.c | 99 __builtin_memcpy(&mac, eth->h_source, ETH_ALEN); in store_mac()
|
| A D | xdp_synproxy_kern.c | 18 #define ETH_ALEN 6 macro 114 __u8 tmp[ETH_ALEN]; in swap_eth_addr() 116 __builtin_memcpy(tmp, a, ETH_ALEN); in swap_eth_addr() 117 __builtin_memcpy(a, b, ETH_ALEN); in swap_eth_addr() 118 __builtin_memcpy(b, tmp, ETH_ALEN); in swap_eth_addr()
|
| A D | bpf_tracing_net.h | 70 #define ETH_ALEN 6 macro
|
| A D | test_l4lb.c | 165 unsigned char eth_dest[ETH_ALEN]; 166 unsigned char eth_source[ETH_ALEN];
|
| A D | test_l4lb_noinline.c | 161 unsigned char eth_dest[ETH_ALEN]; 162 unsigned char eth_source[ETH_ALEN];
|
| A D | test_l4lb_noinline_dynptr.c | 163 unsigned char eth_dest[ETH_ALEN]; 164 unsigned char eth_source[ETH_ALEN];
|
| /tools/testing/selftests/bpf/ |
| A D | xskxceiver.h | 96 u8 dst_mac[ETH_ALEN]; 97 u8 src_mac[ETH_ALEN]; 188 static const u8 g_mac[ETH_ALEN] = {0x55, 0x44, 0x33, 0x22, 0x11, 0x00};
|
| A D | xskxceiver.c | 170 memcpy(eth_hdr->h_dest, xsk->dst_mac, ETH_ALEN); in gen_eth_hdr() 171 memcpy(eth_hdr->h_source, xsk->src_mac, ETH_ALEN); in gen_eth_hdr() 512 memcpy(ifobj->xsk_arr[j].src_mac, g_mac, ETH_ALEN); in __test_spec_init() 513 memcpy(ifobj->xsk_arr[j].dst_mac, g_mac, ETH_ALEN); in __test_spec_init() 942 for (i = 0; i < ETH_ALEN; i++) in pkt_dump() 946 for (i = 0; i < ETH_ALEN; i++) in pkt_dump()
|
| /tools/include/uapi/linux/ |
| A D | if_tun.h | 111 __u8 addr[][ETH_ALEN];
|
| /tools/testing/selftests/net/lib/ |
| A D | xdp_native.bpf.c | 139 __u8 tmp_mac[ETH_ALEN]; in swap_machdr() 141 __builtin_memcpy(tmp_mac, eth->h_source, ETH_ALEN); in swap_machdr() 142 __builtin_memcpy(eth->h_source, eth->h_dest, ETH_ALEN); in swap_machdr() 143 __builtin_memcpy(eth->h_dest, tmp_mac, ETH_ALEN); in swap_machdr()
|
| /tools/testing/selftests/net/ |
| A D | tap.c | 188 rtattr_add_any(nh, IFLA_ADDRESS, param_hwaddr_src, ETH_ALEN); in macvtap_fill_rtattr() 226 memcpy(eth->h_source, param_hwaddr_src, ETH_ALEN); in build_eth() 227 memcpy(eth->h_dest, param_hwaddr_dest, ETH_ALEN); in build_eth()
|
| A D | msg_zerocopy.c | 508 memset(eth.h_dest, 0x06, ETH_ALEN); in do_tx() 509 memset(eth.h_source, 0x02, ETH_ALEN); in do_tx() 521 laddr.sll_halen = ETH_ALEN; in do_tx() 523 memset(laddr.sll_addr, 0x06, ETH_ALEN); in do_tx()
|
| A D | gro.c | 86 static uint8_t src_mac[ETH_ALEN], dst_mac[ETH_ALEN]; 242 memcpy(eth->h_dest, dst_mac, ETH_ALEN); in fill_datalinklayer() 243 memcpy(eth->h_source, src_mac, ETH_ALEN); in fill_datalinklayer() 985 memcpy(daddr.sll_addr, dst_mac, ETH_ALEN); in gro_sender() 986 daddr.sll_halen = ETH_ALEN; in gro_sender()
|
| A D | psock_tpacket.c | 153 memset(pay, 0xff, ETH_ALEN * 2); in create_payload() 379 .sll_halen = ETH_ALEN, in walk_tx()
|
| /tools/testing/selftests/bpf/prog_tests/ |
| A D | xdp_metadata.c | 164 memcpy(eth->h_dest, "\x00\x00\x00\x00\x00\x02", ETH_ALEN); in generate_packet() 165 memcpy(eth->h_source, "\x00\x00\x00\x00\x00\x01", ETH_ALEN); in generate_packet()
|
| A D | xdp_context_test_run.c | 143 .sll_halen = ETH_ALEN in send_test_packet()
|
| A D | xdp_do_redirect.c | 213 memcpy(skel->rodata->expect_dst, &pkt_udp.eth.h_dest, ETH_ALEN); in test_xdp_do_redirect()
|
| A D | test_xdp_veth.c | 540 ASSERT_STRNEQ((const char *)&res, magic_mac, ETH_ALEN, "compare mac"); in xdp_veth_egress()
|