Home
last modified time | relevance | path

Searched refs:ETH_HLEN (Results 1 – 25 of 363) sorted by relevance

12345678910>>...15

/linux/tools/testing/selftests/bpf/prog_tests/
A Dflow_dissector.c120 .nhoff = ETH_HLEN,
140 .nhoff = ETH_HLEN,
162 .nhoff = ETH_HLEN + VLAN_HLEN,
208 .nhoff = ETH_HLEN,
233 .nhoff = ETH_HLEN,
255 .nhoff = ETH_HLEN,
280 .nhoff = ETH_HLEN,
302 .nhoff = ETH_HLEN,
325 .nhoff = ETH_HLEN,
351 .nhoff = ETH_HLEN,
[all …]
/linux/tools/testing/selftests/bpf/progs/
A Dtest_tc_tunnel.c27 #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()
267 if (bpf_skb_load_bytes(skb, ETH_HLEN, &iph_inner, in __encap_ipv6()
290 l2_len = ETH_HLEN; in __encap_ipv6()
548 olen += ETH_HLEN; in decap_internal()
561 olen += ETH_HLEN; in decap_internal()
[all …]
A Dtest_check_mtu.c71 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/samples/bpf/
A Dtcbpf1_kern.c21 #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()
A Dparse_ldabs.c30 __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/drivers/net/wireless/ath/ath10k/
A Dwow.c83 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()
138 if (total_len > ETH_HLEN) in ath10k_wow_convert_8023_to_80211()
158 if (total_len > ETH_HLEN) { in ath10k_wow_convert_8023_to_80211()
162 total_len - ETH_HLEN); in ath10k_wow_convert_8023_to_80211()
165 total_len - ETH_HLEN); in ath10k_wow_convert_8023_to_80211()
167 new->pattern_len += total_len - ETH_HLEN; in ath10k_wow_convert_8023_to_80211()
343 if (patterns[i].pkt_offset < ETH_HLEN) in ath10k_vif_wow_set_wakeups()
[all …]
/linux/tools/testing/selftests/net/
A Dpsock_snd.c50 #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()
A Dgro.c113 ipproto_off = ETH_HLEN + next_off; in setup_sock_filter()
291 fill_networklayer(buf + ETH_HLEN, payload_len); in create_packet()
334 static char buf[ETH_HLEN + IP_MAXPACKET]; in send_data_pkts()
379 struct iphdr *iph = (struct iphdr *)(buf + ETH_HLEN); in recompute_packet()
571 iph = (struct iphdr *)(optpkt + ETH_HLEN); in add_ipv4_ts_option()
613 fill_networklayer(buf + ETH_HLEN, PAYLOAD_LEN); in send_fragment4()
673 buf[ETH_HLEN + 1] ^= 0x2; // ECN set to 10 in send_changed_ECN()
677 buf[ETH_HLEN + 1] ^= 0x20; // ECN set to 10 in send_changed_ECN()
744 static char buffer[IP_MAXPACKET + ETH_HLEN + 1]; in check_recv_pkts()
1078 tcp_offset = ETH_HLEN + sizeof(struct iphdr); in main()
[all …]
/linux/net/ethernet/
A Deth.c83 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/drivers/net/
A Dntb_netdev.c130 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/drivers/staging/r8188eu/core/
A Drtw_br_ext.c70 struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); in __nat25_add_pppoe_tag()
414 struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN); in nat25_db_handle()
416 if (((unsigned char *)(iph) + (iph->ihl<<2)) >= (skb->data + ETH_HLEN + skb->len)) { in nat25_db_handle()
444 struct arphdr *arp = (struct arphdr *)(skb->data + ETH_HLEN); in nat25_db_handle()
476 struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN); in nat25_db_handle()
586 struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN); in nat25_db_handle()
588 if (sizeof(*iph) >= (skb->len - ETH_HLEN)) { in nat25_db_handle()
612 skb->len > (ETH_HLEN + sizeof(*iph) + 4)) { in nat25_db_handle()
613 if (update_nd_link_layer_addr(skb->data + ETH_HLEN + sizeof(*iph), in nat25_db_handle()
614 skb->len - ETH_HLEN - sizeof(*iph), GET_MY_HWADDR(priv))) { in nat25_db_handle()
[all …]
/linux/net/core/
A Dtimestamping.c53 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/drivers/staging/wlan-ng/
A Dp80211conv.c140 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/net/batman-adv/
A Dfragmentation.c280 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()
517 skb_fragment->len + ETH_HLEN); in batadv_frag_send_packet()
530 ret = skb_cow_head(skb, ETH_HLEN + header_size); in batadv_frag_send_packet()
540 skb->len + ETH_HLEN); in batadv_frag_send_packet()
A Dnetwork-coding.c1176 count = skb_src->len + ETH_HLEN; in batadv_nc_code_packets()
1177 count += skb_dest->len + ETH_HLEN; in batadv_nc_code_packets()
1183 count = skb_src->len + ETH_HLEN; in batadv_nc_code_packets()
1184 count += skb_dest->len + ETH_HLEN; in batadv_nc_code_packets()
1192 skb_src->len + ETH_HLEN); in batadv_nc_code_packets()
1195 skb_dest->len + ETH_HLEN); in batadv_nc_code_packets()
1201 skb_src->len + ETH_HLEN); in batadv_nc_code_packets()
1204 skb_dest->len + ETH_HLEN); in batadv_nc_code_packets()
1387 skb_push(skb, ETH_HLEN); in batadv_nc_skb_store_before_coding()
1624 skb_push(skb, ETH_HLEN); in batadv_nc_skb_store_sniffed_unicast()
[all …]
A Dbat_v_ogm.c132 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/net/dsa/
A Dtag_ocelot.c113 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()
A Ddsa.c207 if (skb_headroom(skb) < ETH_HLEN) in dsa_skb_defer_rx_timestamp()
210 __skb_push(skb, ETH_HLEN); in dsa_skb_defer_rx_timestamp()
214 __skb_pull(skb, ETH_HLEN); in dsa_skb_defer_rx_timestamp()
248 skb_push(skb, ETH_HLEN); in dsa_switch_rcv()
/linux/drivers/staging/gdm724x/
A Dgdm_lte.c86 nic->stats.rx_bytes += skb->len + ETH_HLEN; in gdm_lte_rx()
124 mac_header_len = ETH_HLEN; in gdm_lte_emulate_arp()
166 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/net/bridge/netfilter/
A Dnf_conntrack_bridge.c303 skb_copy_from_linear_data_offset(skb, -ETH_HLEN, data->mac, ETH_HLEN); in nf_ct_bridge_frag_save()
339 err = skb_cow_head(skb, ETH_HLEN); in nf_ct_bridge_frag_restore()
349 skb_copy_to_linear_data_offset(skb, -ETH_HLEN, data->mac, ETH_HLEN); in nf_ct_bridge_frag_restore()
/linux/drivers/net/ethernet/qualcomm/
A Dqca_7k_common.h47 #define QCAFRM_MIN_MTU (ETH_ZLEN - ETH_HLEN)
51 #define QCAFRM_MIN_LEN (QCAFRM_MIN_MTU + ETH_HLEN)
/linux/drivers/staging/unisys/include/
A Diochannel.h106 #define ETH_MIN_PACKET_SIZE (ETH_HLEN + ETH_MIN_DATA_SIZE)
348 char ethhdr[ETH_HLEN];
375 ((VISOR_ETH_MAX_MTU + ETH_HLEN + RCVPOST_BUF_SIZE - 1) \
/linux/net/bridge/
A Dbr_netfilter_hooks.c110 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()
775 data->size = ETH_HLEN + data->encap_size; in br_nf_dev_queue_xmit()
796 data->size = ETH_HLEN + data->encap_size; in br_nf_dev_queue_xmit()
893 skb_pull(skb, ETH_HLEN); in br_nf_pre_routing_finish_bridge_slow()
896 BUILD_BUG_ON(sizeof(nf_bridge->neigh_header) != (ETH_HLEN - ETH_ALEN)); in br_nf_pre_routing_finish_bridge_slow()
898 skb_copy_to_linear_data_offset(skb, -(ETH_HLEN - ETH_ALEN), in br_nf_pre_routing_finish_bridge_slow()
900 ETH_HLEN - ETH_ALEN); in br_nf_pre_routing_finish_bridge_slow()
/linux/net/ipv4/
A Dip_tunnel_core.c103 if (unlikely(!pskb_may_pull(skb, ETH_HLEN))) in __iptunnel_pull_header()
203 if (!pskb_may_pull(skb, ETH_HLEN + sizeof(struct iphdr))) in iptunnel_pmtud_build_icmp()
206 skb_copy_bits(skb, skb_mac_offset(skb), &eh, ETH_HLEN); in iptunnel_pmtud_build_icmp()
207 pskb_pull(skb, ETH_HLEN); in iptunnel_pmtud_build_icmp()
215 err = skb_cow(skb, sizeof(*niph) + sizeof(*icmph) + ETH_HLEN); in iptunnel_pmtud_build_icmp()
297 if (!pskb_may_pull(skb, ETH_HLEN + sizeof(struct ipv6hdr))) in iptunnel_pmtud_build_icmpv6()
300 skb_copy_bits(skb, skb_mac_offset(skb), &eh, ETH_HLEN); in iptunnel_pmtud_build_icmpv6()
301 pskb_pull(skb, ETH_HLEN); in iptunnel_pmtud_build_icmpv6()
309 err = skb_cow(skb, sizeof(*nip6h) + sizeof(*icmp6h) + ETH_HLEN); in iptunnel_pmtud_build_icmpv6()
/linux/include/linux/
A Dif_vlan.h351 veth = (struct vlan_ethhdr *)(skb->data + mac_len - ETH_HLEN); in __vlan_insert_inner_tag()
386 return __vlan_insert_inner_tag(skb, vlan_proto, vlan_tci, ETH_HLEN); in __vlan_insert_tag()
436 return vlan_insert_inner_tag(skb, vlan_proto, vlan_tci, ETH_HLEN); in vlan_insert_tag()
597 vlan_depth = ETH_HLEN; in __vlan_get_protocol()

Completed in 43 milliseconds

12345678910>>...15