/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/ |
D | flow_dissector.c | 124 .nhoff = ETH_HLEN, 125 .thoff = ETH_HLEN + sizeof(struct iphdr), 145 .nhoff = ETH_HLEN, 146 .thoff = ETH_HLEN + sizeof(struct ipv6hdr), 168 .nhoff = ETH_HLEN + VLAN_HLEN, 169 .thoff = ETH_HLEN + VLAN_HLEN + sizeof(struct iphdr), 191 .nhoff = ETH_HLEN + VLAN_HLEN * 2, 192 .thoff = ETH_HLEN + VLAN_HLEN * 2 + 216 .nhoff = ETH_HLEN, 217 .thoff = ETH_HLEN + sizeof(struct iphdr), [all …]
|
/Linux-v6.1/tools/testing/selftests/bpf/progs/ |
D | test_tc_tunnel.c | 27 #define L2_PAD_SZ (sizeof(struct vxlanhdr) + ETH_HLEN) 113 if (bpf_skb_load_bytes(skb, ETH_HLEN, &iph6_inner, in __encap_ipv4() 130 if (bpf_skb_load_bytes(skb, ETH_HLEN, &iph_inner, in __encap_ipv4() 141 if (bpf_skb_load_bytes(skb, ETH_HLEN + tcp_off, in __encap_ipv4() 159 l2_len = ETH_HLEN; in __encap_ipv4() 211 if (bpf_skb_load_bytes(skb, 0, l2_hdr, ETH_HLEN)) in __encap_ipv4() 231 if (bpf_skb_store_bytes(skb, ETH_HLEN, &h_outer, olen, in __encap_ipv4() 267 if (bpf_skb_load_bytes(skb, ETH_HLEN, &iph_inner, in __encap_ipv6() 272 if (bpf_skb_load_bytes(skb, ETH_HLEN + sizeof(iph_inner), in __encap_ipv6() 290 l2_len = ETH_HLEN; in __encap_ipv6() [all …]
|
D | test_check_mtu.c | 71 delta = GLOBAL_USER_MTU - (data_len - ETH_HLEN) + 1; in xdp_exceed_mtu() 96 delta = -((data_len - ETH_HLEN) + 1); in xdp_minus_delta() 123 __u32 mtu_len = data_len - ETH_HLEN; in xdp_input_len() 186 delta = GLOBAL_USER_MTU - (skb_len - ETH_HLEN) + 1; in tc_exceed_mtu() 213 delta = GLOBAL_USER_MTU - (data_len - ETH_HLEN) + 1; in tc_exceed_mtu_da() 236 delta = -((skb_len - ETH_HLEN) + 1); in tc_minus_delta()
|
/Linux-v6.1/samples/bpf/ |
D | tcbpf1_kern.c | 21 #define IP_CSUM_OFF (ETH_HLEN + offsetof(struct iphdr, check)) 22 #define TOS_OFF (ETH_HLEN + offsetof(struct iphdr, tos)) 32 #define TCP_CSUM_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, check)) 33 #define IP_SRC_OFF (ETH_HLEN + offsetof(struct iphdr, saddr)) 46 #define TCP_DPORT_OFF (ETH_HLEN + sizeof(struct iphdr) + offsetof(struct tcphdr, dest)) 58 __u8 proto = load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)); in bpf_prog1()
|
D | parse_ldabs.c | 30 __u64 troff = ETH_HLEN + sizeof(struct iphdr); in handle_ingress() 34 if (load_byte(skb, ETH_HLEN + offsetof(struct iphdr, protocol)) != IPPROTO_UDP || in handle_ingress() 35 load_byte(skb, ETH_HLEN) != 0x45) in handle_ingress() 37 if (ip_is_fragment(skb, ETH_HLEN)) in handle_ingress()
|
/Linux-v6.1/drivers/net/wireless/ath/ath10k/ |
D | wow.c | 83 u8 hdr_8023_pattern[ETH_HLEN] = {}; in ath10k_wow_convert_8023_to_80211() 84 u8 hdr_8023_bit_mask[ETH_HLEN] = {}; in ath10k_wow_convert_8023_to_80211() 106 old->pattern, ETH_HLEN - old->pkt_offset); in ath10k_wow_convert_8023_to_80211() 108 old->mask, ETH_HLEN - old->pkt_offset); in ath10k_wow_convert_8023_to_80211() 135 new->pkt_offset = old->pkt_offset + hdr_len + rfc_len - ETH_HLEN; in ath10k_wow_convert_8023_to_80211() 138 if (total_len > ETH_HLEN) in ath10k_wow_convert_8023_to_80211() 141 hdr_80211_end_offset = hdr_len + rfc_len + total_len - ETH_HLEN; in ath10k_wow_convert_8023_to_80211() 158 if (total_len > ETH_HLEN) { in ath10k_wow_convert_8023_to_80211() 161 (void *)old->pattern + ETH_HLEN - old->pkt_offset, in ath10k_wow_convert_8023_to_80211() 162 total_len - ETH_HLEN); in ath10k_wow_convert_8023_to_80211() [all …]
|
/Linux-v6.1/tools/testing/selftests/net/ |
D | psock_snd.c | 50 #define TEST_SZ (sizeof(struct virtio_net_hdr) + ETH_HLEN + ETH_MAX_MTU + 1) 80 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_vnet_header() 84 vh->csum_start = ETH_HLEN + sizeof(struct iphdr); in build_vnet_header() 106 uint16_t *tag = header + ETH_HLEN; in build_eth_header() 110 return ETH_HLEN + 4; in build_eth_header() 114 return ETH_HLEN; in build_eth_header() 193 buf += ETH_HLEN; in do_send() 194 len -= ETH_HLEN; in do_send()
|
D | gro.c | 69 #define TOTAL_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr)) 73 #define MAX_HDR_LEN (ETH_HLEN + sizeof(struct ipv6hdr) + sizeof(struct tcphdr)) 114 ipproto_off = ETH_HLEN + next_off; in setup_sock_filter() 292 fill_networklayer(buf + ETH_HLEN, payload_len); in create_packet() 335 static char buf[ETH_HLEN + IP_MAXPACKET]; in send_data_pkts() 379 struct ipv6hdr *ip6h = (struct ipv6hdr *)(buf + ETH_HLEN); in recompute_packet() 380 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in recompute_packet() 572 iph = (struct iphdr *)(optpkt + ETH_HLEN); in add_ipv4_ts_option() 602 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in send_fragment4() 614 fill_networklayer(buf + ETH_HLEN, PAYLOAD_LEN); in send_fragment4() [all …]
|
D | tap.c | 31 #define TEST_PACKET_SZ (sizeof(struct virtio_net_hdr) + ETH_HLEN + ETH_MAX_MTU) 229 return ETH_HLEN; in build_eth() 311 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_test_packet_valid_udp_gso() 313 vh->csum_start = ETH_HLEN + sizeof(struct iphdr); in build_test_packet_valid_udp_gso() 348 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_test_packet_crash_tap_invalid_eth_proto()
|
/Linux-v6.1/drivers/staging/r8188eu/core/ |
D | rtw_br_ext.c | 70 struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); in __nat25_add_pppoe_tag() 384 struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN); in nat25_db_handle() 386 if (((unsigned char *)(iph) + (iph->ihl << 2)) >= (skb->data + ETH_HLEN + skb->len)) in nat25_db_handle() 409 struct arphdr *arp = (struct arphdr *)(skb->data + ETH_HLEN); in nat25_db_handle() 435 struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); in nat25_db_handle() 539 struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN); in nat25_db_handle() 541 if (sizeof(*iph) >= (skb->len - ETH_HLEN)) in nat25_db_handle() 555 skb->len > (ETH_HLEN + sizeof(*iph) + 4)) { in nat25_db_handle() 556 if (update_nd_link_layer_addr(skb->data + ETH_HLEN + sizeof(*iph), in nat25_db_handle() 557 skb->len - ETH_HLEN - sizeof(*iph), GET_MY_HWADDR(priv))) { in nat25_db_handle() [all …]
|
/Linux-v6.1/net/core/ |
D | timestamping.c | 53 if (skb_headroom(skb) < ETH_HLEN) in skb_defer_rx_timestamp() 56 __skb_push(skb, ETH_HLEN); in skb_defer_rx_timestamp() 60 __skb_pull(skb, ETH_HLEN); in skb_defer_rx_timestamp()
|
/Linux-v6.1/drivers/net/wireless/ath/ath11k/ |
D | wow.c | 154 u8 hdr_8023_pattern[ETH_HLEN] = {}; in ath11k_wow_convert_8023_to_80211() 155 u8 hdr_8023_bit_mask[ETH_HLEN] = {}; in ath11k_wow_convert_8023_to_80211() 177 old->pattern, ETH_HLEN - old->pkt_offset); in ath11k_wow_convert_8023_to_80211() 179 old->mask, ETH_HLEN - old->pkt_offset); in ath11k_wow_convert_8023_to_80211() 206 new->pkt_offset = old->pkt_offset + hdr_len + rfc_len - ETH_HLEN; in ath11k_wow_convert_8023_to_80211() 209 if (total_len > ETH_HLEN) in ath11k_wow_convert_8023_to_80211() 212 hdr_80211_end_offset = hdr_len + rfc_len + total_len - ETH_HLEN; in ath11k_wow_convert_8023_to_80211() 229 if (total_len > ETH_HLEN) { in ath11k_wow_convert_8023_to_80211() 232 (void *)old->pattern + ETH_HLEN - old->pkt_offset, in ath11k_wow_convert_8023_to_80211() 233 total_len - ETH_HLEN); in ath11k_wow_convert_8023_to_80211() [all …]
|
/Linux-v6.1/drivers/net/ |
D | ntb_netdev.c | 130 skb = netdev_alloc_skb(ndev, ndev->mtu + ETH_HLEN); in ntb_netdev_rx_handler() 138 rc = ntb_transport_rx_enqueue(qp, skb, skb->data, ndev->mtu + ETH_HLEN); in ntb_netdev_rx_handler() 255 skb = netdev_alloc_skb(ndev, ndev->mtu + ETH_HLEN); in ntb_netdev_open() 262 ndev->mtu + ETH_HLEN); in ntb_netdev_open() 305 if (new_mtu > ntb_transport_max_size(dev->qp) - ETH_HLEN) in ntb_netdev_change_mtu() 323 skb = netdev_alloc_skb(ndev, new_mtu + ETH_HLEN); in ntb_netdev_change_mtu() 330 new_mtu + ETH_HLEN); in ntb_netdev_change_mtu() 446 ndev->mtu = ntb_transport_max_size(dev->qp) - ETH_HLEN; in ntb_netdev_probe()
|
/Linux-v6.1/net/ethernet/ |
D | eth.c | 83 struct ethhdr *eth = skb_push(skb, ETH_HLEN); in eth_header() 100 return ETH_HLEN; in eth_header() 109 return ETH_HLEN; in eth_header() 112 return -ETH_HLEN; in eth_header() 165 skb_pull_inline(skb, ETH_HLEN); in eth_type_trans() 247 smp_store_release(&hh->hh_len, ETH_HLEN); in eth_header_cache() 361 dev->hard_header_len = ETH_HLEN; in ether_setup() 362 dev->min_header_len = ETH_HLEN; in ether_setup()
|
/Linux-v6.1/net/batman-adv/ |
D | fragmentation.c | 280 memmove(skb_out->data - ETH_HLEN, skb_mac_header(skb_out), ETH_HLEN); in batadv_frag_merge_packets() 281 skb_set_mac_header(skb_out, -ETH_HLEN); in batadv_frag_merge_packets() 376 skb->len + ETH_HLEN); in batadv_frag_skb_fwd() 528 skb_fragment->len + ETH_HLEN); in batadv_frag_send_packet() 541 ret = skb_cow_head(skb, ETH_HLEN + header_size); in batadv_frag_send_packet() 551 skb->len + ETH_HLEN); in batadv_frag_send_packet()
|
D | network-coding.c | 650 nc_packet->skb->len + ETH_HLEN); in batadv_nc_fwd_flush() 1172 count = skb_src->len + ETH_HLEN; in batadv_nc_code_packets() 1173 count += skb_dest->len + ETH_HLEN; in batadv_nc_code_packets() 1179 count = skb_src->len + ETH_HLEN; in batadv_nc_code_packets() 1180 count += skb_dest->len + ETH_HLEN; in batadv_nc_code_packets() 1188 skb_src->len + ETH_HLEN); in batadv_nc_code_packets() 1191 skb_dest->len + ETH_HLEN); in batadv_nc_code_packets() 1197 skb_src->len + ETH_HLEN); in batadv_nc_code_packets() 1200 skb_dest->len + ETH_HLEN); in batadv_nc_code_packets() 1383 skb_push(skb, ETH_HLEN); in batadv_nc_skb_store_before_coding() [all …]
|
D | bat_v_ogm.c | 132 skb->len + ETH_HLEN); in batadv_v_ogm_send_to_if() 212 skb_aggr = dev_alloc_skb(aggr_len + ETH_HLEN + NET_IP_ALIGN); in batadv_v_ogm_aggr_send() 218 skb_reserve(skb_aggr, ETH_HLEN + NET_IP_ALIGN); in batadv_v_ogm_aggr_send() 289 skb = netdev_alloc_skb_ip_align(NULL, ETH_HLEN + ogm_buff_len); in batadv_v_ogm_send_softif() 293 skb_reserve(skb, ETH_HLEN); in batadv_v_ogm_send_softif() 567 ETH_HLEN + packet_len); in batadv_v_ogm_forward() 571 skb_reserve(skb, ETH_HLEN); in batadv_v_ogm_forward() 1008 skb->len + ETH_HLEN); in batadv_v_ogm_packet_recv()
|
/Linux-v6.1/drivers/staging/wlan-ng/ |
D | p80211conv.c | 140 skb_pull(skb, ETH_HLEN); in skb_ether_to_p80211() 149 skb_pull(skb, ETH_HLEN); in skb_ether_to_p80211() 367 if (payload_length > (netdev->mtu + ETH_HLEN)) { in skb_p80211_to_ether() 371 payload_length, netdev->mtu + ETH_HLEN); in skb_p80211_to_ether() 408 e_hdr = skb_push(skb, ETH_HLEN); in skb_p80211_to_ether() 449 e_hdr = skb_push(skb, ETH_HLEN); in skb_p80211_to_ether() 476 e_hdr = skb_push(skb, ETH_HLEN); in skb_p80211_to_ether()
|
/Linux-v6.1/net/dsa/ |
D | tag_ocelot.c | 113 skb_push(skb, ETH_HLEN); in ocelot_rcv() 129 skb_pull(skb, ETH_HLEN); in ocelot_rcv() 176 skb_push_rcsum(skb, ETH_HLEN); in ocelot_rcv() 178 skb_pull_rcsum(skb, ETH_HLEN); in ocelot_rcv()
|
D | tag_lan9303.c | 93 skb_push_rcsum(skb, ETH_HLEN); in lan9303_rcv() 95 skb_pull_rcsum(skb, ETH_HLEN); in lan9303_rcv()
|
/Linux-v6.1/drivers/net/ethernet/qualcomm/ |
D | qca_7k_common.h | 47 #define QCAFRM_MIN_MTU (ETH_ZLEN - ETH_HLEN) 51 #define QCAFRM_MIN_LEN (QCAFRM_MIN_MTU + ETH_HLEN)
|
/Linux-v6.1/net/bridge/netfilter/ |
D | nf_conntrack_bridge.c | 304 skb_copy_from_linear_data_offset(skb, -ETH_HLEN, data->mac, ETH_HLEN); in nf_ct_bridge_frag_save() 340 err = skb_cow_head(skb, ETH_HLEN); in nf_ct_bridge_frag_restore() 350 skb_copy_to_linear_data_offset(skb, -ETH_HLEN, data->mac, ETH_HLEN); in nf_ct_bridge_frag_restore()
|
/Linux-v6.1/drivers/staging/gdm724x/ |
D | gdm_lte.c | 81 len = skb->len + ETH_HLEN; in gdm_lte_rx() 125 mac_header_len = ETH_HLEN; in gdm_lte_emulate_arp() 167 skb_pull(skb_out, ETH_HLEN); in gdm_lte_emulate_arp() 249 mac_header_len = ETH_HLEN; in gdm_lte_emulate_ndp() 328 skb_pull(skb_out, ETH_HLEN); in gdm_lte_emulate_ndp() 358 network_data = skb->data + ETH_HLEN; in gdm_lte_tx_nic_type() 441 data_buf = skb->data + (VLAN_ETH_HLEN - ETH_HLEN); in gdm_lte_tx() 442 data_len = skb->len - (VLAN_ETH_HLEN - ETH_HLEN); in gdm_lte_tx() 628 mac_header_len = ETH_HLEN; in gdm_lte_netif_rx() 670 skb_pull(skb, ETH_HLEN); in gdm_lte_netif_rx()
|
/Linux-v6.1/net/bridge/ |
D | br_netfilter_hooks.c | 110 return *((__be16 *)(skb_mac_header(skb) + ETH_HLEN + in pppoe_proto() 133 #define NF_BRIDGE_MAX_MAC_HEADER_LENGTH (PPPOE_SES_HLEN + ETH_HLEN) 290 -(ETH_HLEN-ETH_ALEN), in br_nf_pre_routing_finish_bridge() 292 ETH_HLEN-ETH_ALEN); in br_nf_pre_routing_finish_bridge() 778 data->size = ETH_HLEN + data->encap_size; in br_nf_dev_queue_xmit() 797 data->size = ETH_HLEN + data->encap_size; in br_nf_dev_queue_xmit() 894 skb_pull(skb, ETH_HLEN); in br_nf_pre_routing_finish_bridge_slow() 897 BUILD_BUG_ON(sizeof(nf_bridge->neigh_header) != (ETH_HLEN - ETH_ALEN)); in br_nf_pre_routing_finish_bridge_slow() 899 skb_copy_to_linear_data_offset(skb, -(ETH_HLEN - ETH_ALEN), in br_nf_pre_routing_finish_bridge_slow() 901 ETH_HLEN - ETH_ALEN); in br_nf_pre_routing_finish_bridge_slow()
|
/Linux-v6.1/include/linux/ |
D | if_vlan.h | 356 veth = (struct vlan_ethhdr *)(skb->data + mac_len - ETH_HLEN); in __vlan_insert_inner_tag() 391 return __vlan_insert_inner_tag(skb, vlan_proto, vlan_tci, ETH_HLEN); in __vlan_insert_tag() 441 return vlan_insert_inner_tag(skb, vlan_proto, vlan_tci, ETH_HLEN); in vlan_insert_tag() 602 vlan_depth = ETH_HLEN; in __vlan_get_protocol()
|