| /linux/drivers/net/ethernet/mediatek/ |
| H A D | mtk_eth_soc.c | 289 void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) in mtk_w32() argument 291 __raw_writel(val, eth->base + reg); in mtk_w32() 294 u32 mtk_r32(struct mtk_eth *eth, unsigned reg) in mtk_r32() argument 296 return __raw_readl(eth->base + reg); in mtk_r32() 299 u32 mtk_m32(struct mtk_eth *eth, u32 mask, u32 set, unsigned int reg) in mtk_m32() argument 303 val = mtk_r32(eth, reg); in mtk_m32() 306 mtk_w32(eth, val, reg); in mtk_m32() 310 static int mtk_mdio_busy_wait(struct mtk_eth *eth) in mtk_mdio_busy_wait() argument 315 if (!(mtk_r32(eth, MTK_PHY_IAC) & PHY_IAC_ACCESS)) in mtk_mdio_busy_wait() 322 dev_err(eth->dev, "mdio: MDIO timeout\n"); in mtk_mdio_busy_wait() [all …]
|
| H A D | mtk_ppe_offload.c | 17 struct ethhdr eth; member 57 mtk_flow_set_ipv4_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_ipv4_addr() argument 60 return mtk_foe_entry_set_ipv4_tuple(eth, foe, egress, in mtk_flow_set_ipv4_addr() 66 mtk_flow_set_ipv6_addr(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_ipv6_addr() argument 69 return mtk_foe_entry_set_ipv6_tuple(eth, foe, in mtk_flow_set_ipv6_addr() 75 mtk_flow_offload_mangle_eth(const struct flow_action_entry *act, void *eth) in mtk_flow_offload_mangle_eth() argument 77 void *dest = eth + act->mangle.offset; in mtk_flow_offload_mangle_eth() 191 mtk_flow_set_output_device(struct mtk_eth *eth, struct mtk_foe_entry *foe, in mtk_flow_set_output_device() argument 199 mtk_foe_entry_set_wdma(eth, foe, info.wdma_idx, info.queue, in mtk_flow_set_output_device() 201 if (mtk_is_netsys_v2_or_greater(eth)) { in mtk_flow_set_output_device() [all …]
|
| H A D | mtk_ppe.c | 61 static u32 mtk_eth_timestamp(struct mtk_eth *eth) in mtk_eth_timestamp() argument 63 return mtk_r32(eth, 0x0010) & mtk_get_ib1_ts_mask(eth); in mtk_eth_timestamp() 112 if (mtk_is_netsys_v3_or_greater(ppe->eth)) { in mtk_mib_entry_read() 144 static u32 mtk_ppe_hash_entry(struct mtk_eth *eth, struct mtk_foe_entry *e) in mtk_ppe_hash_entry() argument 149 switch (mtk_get_ib1_pkt_type(eth, e->ib1)) { in mtk_ppe_hash_entry() 178 hash <<= (ffs(eth->soc->hash_offset) - 1); in mtk_ppe_hash_entry() 185 mtk_foe_entry_l2(struct mtk_eth *eth, struct mtk_foe_entry *entry) in mtk_foe_entry_l2() argument 187 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_l2() 199 mtk_foe_entry_ib2(struct mtk_eth *eth, struct mtk_foe_entry *entry) in mtk_foe_entry_ib2() argument 201 int type = mtk_get_ib1_pkt_type(eth, entry->ib1); in mtk_foe_entry_ib2() [all …]
|
| H A D | mtk_eth_soc.h | 342 #define TX_DMA_PLEN0(x) (((x) & eth->soc->tx.dma_max_len) << eth->soc->tx.dma_len_offset) 343 #define TX_DMA_PLEN1(x) ((x) & eth->soc->tx.dma_max_len) 363 #define RX_DMA_PREP_PLEN0(x) (((x) & eth->soc->rx.dma_max_len) << eth->soc->rx.dma_len_offset) 364 #define RX_DMA_GET_PLEN0(x) (((x) >> eth->soc->rx.dma_len_offset) & eth->soc->rx.dma_max_len) 1386 static inline bool mtk_is_netsys_v1(struct mtk_eth *eth) in mtk_is_netsys_v1() argument 1388 return eth->soc->version == 1; in mtk_is_netsys_v1() 1391 static inline bool mtk_is_netsys_v2_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v2_or_greater() argument 1393 return eth->soc->version > 1; in mtk_is_netsys_v2_or_greater() 1396 static inline bool mtk_is_netsys_v3_or_greater(struct mtk_eth *eth) in mtk_is_netsys_v3_or_greater() argument 1398 return eth->soc->version > 2; in mtk_is_netsys_v3_or_greater() [all …]
|
| H A D | mtk_ppe.h | 325 struct mtk_eth *eth; member 346 struct mtk_ppe *mtk_ppe_init(struct mtk_eth *eth, void __iomem *base, int index); 348 void mtk_ppe_deinit(struct mtk_eth *eth); 375 int mtk_foe_entry_prepare(struct mtk_eth *eth, struct mtk_foe_entry *entry, 378 int mtk_foe_entry_set_pse_port(struct mtk_eth *eth, 380 int mtk_foe_entry_set_ipv4_tuple(struct mtk_eth *eth, 384 int mtk_foe_entry_set_ipv6_tuple(struct mtk_eth *eth, 388 int mtk_foe_entry_set_dsa(struct mtk_eth *eth, struct mtk_foe_entry *entry, 390 int mtk_foe_entry_set_vlan(struct mtk_eth *eth, struct mtk_foe_entry *entry, 392 int mtk_foe_entry_set_pppoe(struct mtk_eth *eth, struct mtk_foe_entry *entry, [all …]
|
| /linux/drivers/net/ethernet/airoha/ |
| H A D | airoha_eth.c | 76 struct airoha_eth *eth = port->qdma->eth; in airoha_set_macaddr() local 82 airoha_fe_wr(eth, reg, val); in airoha_set_macaddr() 85 airoha_fe_wr(eth, REG_FE_MAC_LMIN(reg), val); in airoha_set_macaddr() 86 airoha_fe_wr(eth, REG_FE_MAC_LMAX(reg), val); in airoha_set_macaddr() 91 static void airoha_set_gdm_port_fwd_cfg(struct airoha_eth *eth, u32 addr, in airoha_set_gdm_port_fwd_cfg() argument 94 airoha_fe_rmw(eth, addr, GDM_OCFQ_MASK, in airoha_set_gdm_port_fwd_cfg() 96 airoha_fe_rmw(eth, addr, GDM_MCFQ_MASK, in airoha_set_gdm_port_fwd_cfg() 98 airoha_fe_rmw(eth, addr, GDM_BCFQ_MASK, in airoha_set_gdm_port_fwd_cfg() 100 airoha_fe_rmw(eth, addr, GDM_UCFQ_MASK, in airoha_set_gdm_port_fwd_cfg() 107 struct airoha_eth *eth = port->qdma->eth; in airoha_set_vip_for_gdm_port() local [all …]
|
| /linux/tools/testing/selftests/bpf/progs/ |
| H A D | xdp_hw_metadata.c | 35 struct ethhdr *eth; in rx() local 40 eth = data; in rx() 42 if (eth + 1 < data_end && (eth->h_proto == bpf_htons(ETH_P_8021AD) || in rx() 43 eth->h_proto == bpf_htons(ETH_P_8021Q))) in rx() 44 eth = (void *)eth + sizeof(struct vlan_hdr); in rx() 46 if (eth + 1 < data_end && eth->h_proto == bpf_htons(ETH_P_8021Q)) in rx() 47 eth = (void *)eth + sizeof(struct vlan_hdr); in rx() 49 if (eth + 1 < data_end) { in rx() 50 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in rx() 51 iph = (void *)(eth + 1); in rx() [all …]
|
| H A D | xdping_kern.c | 64 struct ethhdr *eth = data; in icmp_check() local 68 if (data + sizeof(*eth) + sizeof(*iph) + ICMP_ECHO_LEN > data_end) in icmp_check() 71 if (eth->h_proto != bpf_htons(ETH_P_IP)) in icmp_check() 74 iph = data + sizeof(*eth); in icmp_check() 82 icmph = data + sizeof(*eth) + sizeof(*iph); in icmp_check() 95 struct ethhdr *eth = data; in xdping_client() local 109 iph = data + sizeof(*eth); in xdping_client() 110 icmph = data + sizeof(*eth) + sizeof(*iph); in xdping_client() 157 struct ethhdr *eth = data; in xdping_server() local 168 iph = data + sizeof(*eth); in xdping_server() [all …]
|
| H A D | xdp_metadata.c | 42 struct ethhdr *eth = NULL; in rx() 51 eth = data; in rx() 52 if (eth + 1 < data_end) { in rx() 53 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in rx() 54 iph = (void *)(eth + 1); in rx() 58 if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in rx() 59 ip6h = (void *)(eth + 1); in rx() 35 struct ethhdr *eth = NULL; rx() local
|
| H A D | xdp_redirect_multi_kern.c | 51 struct ethhdr *eth = data; in xdp_redirect_map_multi_prog() 57 nh_off = sizeof(*eth); in xdp_redirect_map_multi_prog() 61 h_proto = bpf_htons(eth->h_proto); in xdp_redirect_map_multi_prog() 96 struct ethhdr *eth = data; 100 nh_off = sizeof(*eth); 106 __builtin_memcpy(eth->h_source, mac, ETH_ALEN); 43 struct ethhdr *eth = data; xdp_redirect_map_multi_prog() local 79 struct ethhdr *eth = data; xdp_devmap_prog() local
|
| H A D | test_pkt_access.c | 107 struct ethhdr *eth = (struct ethhdr *)(data); in test_pkt_access() local 112 if (eth + 1 > data_end) in test_pkt_access() 115 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in test_pkt_access() 116 struct iphdr *iph = (struct iphdr *)(eth + 1); in test_pkt_access() 123 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in test_pkt_access() 124 struct ipv6hdr *ip6h = (struct ipv6hdr *)(eth + 1); in test_pkt_access()
|
| H A D | test_sk_assign.c | 60 struct ethhdr *eth; in get_tuple() local 64 eth = (struct ethhdr *)(data); in get_tuple() 65 if (eth + 1 > data_end) in get_tuple() 68 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in get_tuple() 69 struct iphdr *iph = (struct iphdr *)(data + sizeof(*eth)); in get_tuple() 80 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in get_tuple() 81 struct ipv6hdr *ip6h = (struct ipv6hdr *)(data + sizeof(*eth)); in get_tuple()
|
| H A D | test_assign_reuse.c | 111 struct ethhdr *eth; in tc_main() local 113 eth = (struct ethhdr *)(data); in tc_main() 114 if (eth + 1 > data_end) in tc_main() 117 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in tc_main() 118 struct iphdr *iph = (struct iphdr *)(data + sizeof(*eth)); in tc_main() 130 struct ipv6hdr *ip6h = (struct ipv6hdr *)(data + sizeof(*eth)); in tc_main()
|
| H A D | test_migrate_reuseport.c | 49 struct ethhdr *eth = data; in drop_ack() local 52 if (eth + 1 > data_end) in drop_ack() 55 switch (bpf_ntohs(eth->h_proto)) { in drop_ack() 57 struct iphdr *ip = (struct iphdr *)(eth + 1); in drop_ack() 69 struct ipv6hdr *ipv6 = (struct ipv6hdr *)(eth + 1); in drop_ack()
|
| /linux/tools/testing/selftests/net/lib/ |
| H A D | xdp_native.bpf.c | 75 struct ethhdr *eth; in filter_udphdr() 78 err = bpf_xdp_pull_data(ctx, sizeof(*eth)); in filter_udphdr() 83 data = eth = (void *)(long)ctx->data; in filter_udphdr() 85 if (data + sizeof(*eth) > data_end) in filter_udphdr() 88 if (eth->h_proto == bpf_htons(ETH_P_IP)) { in filter_udphdr() 91 err = bpf_xdp_pull_data(ctx, sizeof(*eth) + sizeof(*iph) + in filter_udphdr() 99 iph = data + sizeof(*eth); in filter_udphdr() 105 udph = data + sizeof(*iph) + sizeof(*eth); in filter_udphdr() 106 } else if (eth->h_proto == bpf_htons(ETH_P_IPV6)) { in filter_udphdr() 109 err = bpf_xdp_pull_data(ctx, sizeof(*eth) in filter_udphdr() 74 struct ethhdr *eth = data; filter_udphdr() local 138 struct ethhdr *eth = data; swap_machdr() local 151 struct ethhdr *eth = data; xdp_mode_tx_handler() local 217 struct ethhdr *eth = data; update_pkt() local [all...] |
| /linux/drivers/net/ethernet/freescale/dpaa2/ |
| H A D | Makefile | 6 obj-$(CONFIG_FSL_DPAA2_ETH) += fsl-dpaa2-eth.o 10 fsl-dpaa2-eth-objs := dpaa2-eth.o dpaa2-ethtool.o dpni.o dpaa2-mac.o dpmac.o dpaa2-eth-devlink.o dp… 11 fsl-dpaa2-eth-${CONFIG_FSL_DPAA2_ETH_DCB} += dpaa2-eth-dcb.o 12 fsl-dpaa2-eth-${CONFIG_DEBUG_FS} += dpaa2-eth-debugfs.o 17 CFLAGS_dpaa2-eth.o := -I$(src)
|
| /linux/drivers/infiniband/hw/mlx4/ |
| H A D | ah.c | 93 memcpy(ah->av.eth.mac, ah_attr->roce.dmac, ETH_ALEN); in create_iboe_ah() 94 eth_zero_addr(ah->av.eth.s_mac); in create_iboe_ah() 103 &ah->av.eth.s_mac[0]); in create_iboe_ah() 110 ah->av.eth.gid_index = ret; in create_iboe_ah() 113 ah->av.eth.gid_index = ah_attr->grh.sgid_index; in create_iboe_ah() 118 ah->av.eth.port_pd = cpu_to_be32(to_mpd(ib_ah->pd)->pdn | in create_iboe_ah() 120 ah->av.eth.vlan = cpu_to_be16(vlan_tag); in create_iboe_ah() 121 ah->av.eth.hop_limit = grh->hop_limit; in create_iboe_ah() 123 ah->av.eth.stat_rate = rdma_ah_get_static_rate(ah_attr) + in create_iboe_ah() 125 while (ah->av.eth.stat_rate > IB_RATE_2_5_GBPS + MLX4_STAT_RATE_OFFSET && in create_iboe_ah() [all …]
|
| /linux/drivers/scsi/fnic/ |
| H A D | fip.h | 51 struct ethhdr eth; member 62 struct ethhdr eth; member 69 struct ethhdr eth; member 94 struct ethhdr eth; member 107 struct ethhdr eth; member 138 fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth, in fnic_debug_dump_fip_frame() argument 141 struct fip_header *fiph = (struct fip_header *)(eth + 1); in fnic_debug_dump_fip_frame() 149 fnic_debug_dump(fnic, (uint8_t *)eth, len); in fnic_debug_dump_fip_frame() 155 fnic_debug_dump_fip_frame(struct fnic *fnic, struct ethhdr *eth, in fnic_debug_dump_fip_frame() argument
|
| /linux/arch/mips/cavium-octeon/ |
| H A D | octeon-platform.c | 483 static void __init octeon_fdt_set_phy(int eth, int phy_addr) in octeon_fdt_set_phy() argument 495 phy_handle = fdt_getprop(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy() 502 alt_phy_handle = fdt_getprop(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy() 513 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy() 515 fdt_nop_property(initial_boot_params, eth, "cavium,alt-phy-handle"); in octeon_fdt_set_phy() 529 phy_prop = fdt_get_property(initial_boot_params, eth, "phy-handle", NULL); in octeon_fdt_set_phy() 532 fdt_nop_property(initial_boot_params, eth, "phy-handle"); in octeon_fdt_set_phy() 533 alt_prop = fdt_get_property_w(initial_boot_params, eth, "cavium,alt-phy-handle", NULL); in octeon_fdt_set_phy() 610 static void __init _octeon_rx_tx_delay(int eth, int rx_delay, int tx_delay) in _octeon_rx_tx_delay() argument 612 fdt_setprop_inplace_cell(initial_boot_params, eth, "rx-delay", in _octeon_rx_tx_delay() [all …]
|
| /linux/samples/bpf/ |
| H A D | parse_simple.c | 30 struct eth_hdr *eth = data; in handle_ingress() local 31 struct iphdr *iph = data + sizeof(*eth); in handle_ingress() 32 struct udphdr *udp = data + sizeof(*eth) + sizeof(*iph); in handle_ingress() 36 if (data + sizeof(*eth) + sizeof(*iph) + sizeof(*udp) > data_end) in handle_ingress() 39 if (eth->h_proto != htons(ETH_P_IP)) in handle_ingress()
|
| /linux/drivers/net/wireless/marvell/mwifiex/ |
| H A D | sta_rx.c | 27 struct ethhdr *eth; in mwifiex_discard_gratuitous_arp() local 31 eth = (struct ethhdr *)skb->data; in mwifiex_discard_gratuitous_arp() 32 switch (ntohs(eth->h_proto)) { in mwifiex_discard_gratuitous_arp() 78 struct ethhdr *eth; in mwifiex_process_rx_packet() local 115 eth = (struct ethhdr *) in mwifiex_process_rx_packet() 123 memcpy(eth->h_source, rx_pkt_hdr->eth803_hdr.h_source, in mwifiex_process_rx_packet() 124 sizeof(eth->h_source)); in mwifiex_process_rx_packet() 125 memcpy(eth->h_dest, rx_pkt_hdr->eth803_hdr.h_dest, in mwifiex_process_rx_packet() 126 sizeof(eth->h_dest)); in mwifiex_process_rx_packet() 130 hdr_chop = (u8 *) eth - (u8 *) local_rx_pd; in mwifiex_process_rx_packet()
|
| /linux/tools/testing/selftests/bpf/prog_tests/ |
| H A D | flow_dissector.c | 19 struct ethhdr eth; member 25 struct ethhdr eth; member 32 struct ethhdr eth; member 40 struct ethhdr eth; member 46 struct ethhdr eth; member 58 struct ethhdr eth; member 73 struct ethhdr eth; member 102 .eth.h_proto = __bpf_constant_htons(ETH_P_IP), 124 .eth.h_proto = __bpf_constant_htons(ETH_P_IPV6), 145 .eth.h_proto = __bpf_constant_htons(ETH_P_8021Q), [all …]
|
| /linux/drivers/infiniband/hw/ocrdma/ |
| H A D | ocrdma_ah.c | 78 struct ocrdma_eth_vlan eth; in set_av_attr() local 90 memset(ð, 0, sizeof(eth)); in set_av_attr() 108 eth.eth_type = cpu_to_be16(0x8100); in set_av_attr() 109 eth.roce_eth_type = cpu_to_be16(proto_num); in set_av_attr() 111 eth.vlan_tag = cpu_to_be16(vlan_tag); in set_av_attr() 115 eth.eth_type = cpu_to_be16(proto_num); in set_av_attr() 119 memcpy(ð.smac[0], &dev->nic_info.mac_addr[0], ETH_ALEN); in set_av_attr() 120 status = ocrdma_resolve_dmac(dev, attr, ð.dmac[0]); in set_av_attr() 126 memcpy(&ah->av->eth_hdr, ð, eth_sz); in set_av_attr()
|
| /linux/tools/testing/selftests/net/ |
| H A D | nat6to4.bpf.c | 54 const struct ethhdr * const eth = data; // used iff is_ethernet in sched_cls_ingress6_nat_6_prog() local 55 const struct ipv6hdr * const ip6 = (void *)(eth + 1); in sched_cls_ingress6_nat_6_prog() 70 if (eth->h_proto != bpf_htons(ETH_P_IPV6)) in sched_cls_ingress6_nat_6_prog() 91 eth2 = *eth; // Copy over the ethernet header (src/dst mac) in sched_cls_ingress6_nat_6_prog() 155 const struct ethhdr *const eth = data; // used iff is_ethernet in sched_cls_egress4_snat4_prog() local 156 const struct iphdr *const ip4 = (void *)(eth + 1); in sched_cls_egress4_snat4_prog() 167 if (eth->h_proto != bpf_htons(ETH_P_IP)) in sched_cls_egress4_snat4_prog() 226 eth2 = *eth; // Copy over the ethernet header (src/dst mac) in sched_cls_egress4_snat4_prog()
|
| /linux/Documentation/networking/device_drivers/ethernet/freescale/dpaa2/ |
| H A D | mac-phy-support.rst | 14 drivers (dpaa2-eth, dpaa2-ethsw) interact with the PHY library. 20 network interface) and DPMAC objects (abstracting a MAC). The dpaa2-eth driver 26 directly by the dpaa2-eth driver or by phylink. 38 | dpaa2-eth | +--------------------------------------+ 66 phylink instance, the dpaa2-eth driver will not bind to the connected dpmac 71 phylink) and its attached net_device driver (dpaa2-eth, dpaa2-ethsw), 77 At probe time or when a DPNI's endpoint is dynamically changed, the dpaa2-eth 99 dpaa2-eth driver calls dpaa2_mac_disconnect() which will, in turn, disconnect 112 (6) The dpaa2-eth driver handles the LINK_STATE_CHANGE irq in order to 124 | dpaa2-eth | [all …]
|