/kernel/linux/linux-5.10/samples/bpf/ |
H A D | xdp_tx_iptunnel_kern.c | 67 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument 72 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 in handle_ipv4() 157 struct ethhdr *new_eth; handle_ipv6() local [all...] |
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | xdp_tx_iptunnel_kern.c | 67 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument 72 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 in handle_ipv4() 157 struct ethhdr *new_eth; handle_ipv6() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_xdp_dynptr.c | 67 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument 72 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 125 new_eth = bpf_dynptr_slice_rdwr(&new_xdp_ptr, 0, eth_buffer, sizeof(eth_buffer)); in handle_ipv4() 126 if (!new_eth) in handle_ipv4() 129 iph = (struct iphdr *)(new_eth in handle_ipv4() 166 struct ethhdr *new_eth; handle_ipv6() local [all...] |
H A D | test_xdp.c | 68 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument 73 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr() 74 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 75 new_eth->h_proto = h_proto; in set_ethhdr() 83 struct ethhdr *new_eth; in handle_ipv4() local 117 new_eth = data; in handle_ipv4() 118 iph = data + sizeof(*new_eth); in handle_ipv4() 121 if (new_eth in handle_ipv4() 156 struct ethhdr *new_eth; handle_ipv6() local [all...] |
H A D | test_xdp_loop.c | 64 static __always_inline void set_ethhdr(struct ethhdr *new_eth, in set_ethhdr() argument 69 memcpy(new_eth->h_source, old_eth->h_dest, sizeof(new_eth->h_source)); in set_ethhdr() 70 memcpy(new_eth->h_dest, tnl->dmac, sizeof(new_eth->h_dest)); in set_ethhdr() 71 new_eth->h_proto = h_proto; in set_ethhdr() 79 struct ethhdr *new_eth; in handle_ipv4() local 113 new_eth = data; in handle_ipv4() 114 iph = data + sizeof(*new_eth); in handle_ipv4() 117 if (new_eth in handle_ipv4() 152 struct ethhdr *new_eth; handle_ipv6() local [all...] |
H A D | test_xdp_noinline.c | 282 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 in encap_v4() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_xdp.c | 70 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 in handle_ipv4() 158 struct ethhdr *new_eth; handle_ipv6() local [all...] |
H A D | test_xdp_loop.c | 66 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 in handle_ipv4() 154 struct ethhdr *new_eth; handle_ipv6() local [all...] |
H A D | test_xdp_noinline.c | 282 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 in encap_v4() 377 struct eth_hdr *new_eth; decap_v6() local 398 struct eth_hdr *new_eth; decap_v4() local [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/accel/ |
H A D | accel.h | 24 struct ethhdr *new_eth; in remove_metadata_hdr() local 28 new_eth = (struct ethhdr *)(skb->data + MLX5E_METADATA_ETHER_LEN); in remove_metadata_hdr() 29 memmove(new_eth, old_eth, 2 * ETH_ALEN); in remove_metadata_hdr()
|
/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | nat6to4.c | 139 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()
|