/linux-6.1.9/net/dsa/ |
D | master.c | 13 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_master_get_regs_len() local 14 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_regs_len() 15 struct dsa_switch *ds = cpu_dp->ds; in dsa_master_get_regs_len() 16 int port = cpu_dp->index; in dsa_master_get_regs_len() 43 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_master_get_regs() local 44 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_regs() 45 struct dsa_switch *ds = cpu_dp->ds; in dsa_master_get_regs() 48 int port = cpu_dp->index; in dsa_master_get_regs() 79 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_master_get_ethtool_stats() local 80 const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops; in dsa_master_get_ethtool_stats() [all …]
|
D | dsa2.c | 394 struct dsa_port *cpu_dp; in dsa_tree_find_first_master() local 396 cpu_dp = dsa_tree_find_first_cpu(dst); in dsa_tree_find_first_master() 397 ethernet = of_parse_phandle(cpu_dp->dn, "ethernet", 0); in dsa_tree_find_first_master() 409 struct dsa_port *cpu_dp, *dp; in dsa_tree_setup_default_cpu() local 411 cpu_dp = dsa_tree_find_first_cpu(dst); in dsa_tree_setup_default_cpu() 412 if (!cpu_dp) { in dsa_tree_setup_default_cpu() 418 if (dp->cpu_dp) in dsa_tree_setup_default_cpu() 422 dp->cpu_dp = cpu_dp; in dsa_tree_setup_default_cpu() 435 struct dsa_port *cpu_dp, *dp; in dsa_tree_setup_cpu_ports() local 437 list_for_each_entry(cpu_dp, &dst->ports, list) { in dsa_tree_setup_cpu_ports() [all …]
|
D | dsa_priv.h | 186 int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp); 188 int dsa_master_lag_setup(struct net_device *lag_dev, struct dsa_port *cpu_dp, 192 struct dsa_port *cpu_dp); 197 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_master_find_slave() local 198 struct dsa_switch_tree *dst = cpu_dp->dst; in dsa_master_find_slave() 214 void dsa_port_set_tag_protocol(struct dsa_port *cpu_dp, 410 struct dsa_port *cpu_dp = master->dsa_ptr; in dsa_find_designated_bridge_port_by_vid() local 411 struct dsa_switch_tree *dst = cpu_dp->dst; in dsa_find_designated_bridge_port_by_vid() 432 if (dp->cpu_dp != cpu_dp) in dsa_find_designated_bridge_port_by_vid()
|
D | switch.c | 129 struct dsa_port *cpu_dp = targeted_dp->cpu_dp; in dsa_port_host_address_match() local 132 return dp->index == dsa_towards_port(dp->ds, cpu_dp->ds->index, in dsa_port_host_address_match() 133 cpu_dp->index); in dsa_port_host_address_match() 624 struct dsa_port *cpu_dp = targeted_dp->cpu_dp; in dsa_port_host_vlan_match() local 627 return dsa_port_is_dsa(dp) || dp == cpu_dp; in dsa_port_host_vlan_match() 819 struct dsa_port *dp, *cpu_dp; in dsa_switch_change_tag_proto() local 831 dsa_switch_for_each_cpu_port(cpu_dp, ds) in dsa_switch_change_tag_proto() 832 dsa_port_set_tag_protocol(cpu_dp, tag_ops); in dsa_switch_change_tag_proto()
|
D | slave.c | 1638 netdev_err(dev, "CPU port %d: %s\n", dp->cpu_dp->index, in dsa_slave_vlan_rx_add_vid() 1848 struct dsa_port *cpu_dp = dp->cpu_dp; in dsa_slave_change_mtu() local 1885 new_master_mtu = largest_mtu + dsa_tag_protocol_overhead(cpu_dp->tag_ops); in dsa_slave_change_mtu() 1903 err = dsa_port_mtu_change(cpu_dp, cpu_mtu); in dsa_slave_change_mtu() 1920 dsa_port_mtu_change(cpu_dp, old_master_mtu - in dsa_slave_change_mtu() 1921 dsa_tag_protocol_overhead(cpu_dp->tag_ops)); in dsa_slave_change_mtu() 2192 struct dsa_port *cpu_dp = dp->cpu_dp; in dsa_slave_fill_forward_path() local 2196 path->dsa.proto = cpu_dp->tag_ops->proto; in dsa_slave_fill_forward_path() 2318 const struct dsa_port *cpu_dp = dp->cpu_dp; in dsa_slave_setup_tagger() local 2321 slave->needed_headroom = cpu_dp->tag_ops->needed_headroom; in dsa_slave_setup_tagger() [all …]
|
D | tag_8021q.c | 457 struct dsa_port *cpu_dp = master->dsa_ptr; in dsa_tag_8021q_find_port_by_vbid() local 458 struct dsa_switch_tree *dst = cpu_dp->dst; in dsa_tag_8021q_find_port_by_vbid() 472 if (dp->cpu_dp != cpu_dp) in dsa_tag_8021q_find_port_by_vbid()
|
D | dsa.c | 219 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_switch_rcv() local 223 if (unlikely(!cpu_dp)) { in dsa_switch_rcv() 232 nskb = cpu_dp->rcv(skb, dev); in dsa_switch_rcv() 254 if (unlikely(cpu_dp->ds->untag_bridge_pvid)) { in dsa_switch_rcv()
|
D | tag_dsa.c | 257 struct dsa_port *cpu_dp = dev->dsa_ptr; in dsa_rcv_ll() local 264 lag = dsa_lag_by_id(cpu_dp->dst, source_port + 1); in dsa_rcv_ll()
|
D | tag_sja1105.c | 589 struct dsa_port *cpu_dp; in sja1110_rcv_meta() local 593 cpu_dp = master->dsa_ptr; in sja1110_rcv_meta() 594 ds = dsa_switch_find(cpu_dp->dst->index, switch_id); in sja1110_rcv_meta()
|
D | port.c | 1411 dp->cpu_dp = master->dsa_ptr; in dsa_port_assign_master() 1525 void dsa_port_set_tag_protocol(struct dsa_port *cpu_dp, in dsa_port_set_tag_protocol() argument 1528 cpu_dp->rcv = tag_ops->rcv; in dsa_port_set_tag_protocol() 1529 cpu_dp->tag_ops = tag_ops; in dsa_port_set_tag_protocol()
|
/linux-6.1.9/include/net/ |
D | dsa.h | 281 struct dsa_port *cpu_dp; member 612 struct dsa_port *cpu_dp; in dsa_cpu_ports() local 615 dsa_switch_for_each_cpu_port(cpu_dp, ds) in dsa_cpu_ports() 616 mask |= BIT(cpu_dp->index); in dsa_cpu_ports() 648 const struct dsa_port *cpu_dp = dp->cpu_dp; in dsa_upstream_port() local 650 if (!cpu_dp) in dsa_upstream_port() 653 return dsa_towards_port(ds, cpu_dp->ds->index, cpu_dp->index); in dsa_upstream_port() 729 return dsa_port_lag_dev_get(dp->cpu_dp); in dsa_port_to_master() 731 return dp->cpu_dp->master; in dsa_port_to_master()
|
/linux-6.1.9/drivers/net/dsa/ocelot/ |
D | felix.c | 49 struct dsa_port *cpu_dp; in felix_cpu_port_for_master() local 60 cpu_dp = master->dsa_ptr; in felix_cpu_port_for_master() 61 return cpu_dp->index; in felix_cpu_port_for_master() 230 struct dsa_port *cpu_dp; in felix_tag_8021q_vlan_add() local 240 dsa_switch_for_each_cpu_port(cpu_dp, ds) { in felix_tag_8021q_vlan_add() 241 err = felix_tag_8021q_vlan_add_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_add() 253 dsa_switch_for_each_cpu_port(cpu_dp, ds) in felix_tag_8021q_vlan_add() 254 felix_tag_8021q_vlan_del_rx(ds, port, cpu_dp->index, vid); in felix_tag_8021q_vlan_add() 261 struct dsa_port *cpu_dp; in felix_tag_8021q_vlan_del() local 267 dsa_switch_for_each_cpu_port(cpu_dp, ds) { in felix_tag_8021q_vlan_del() [all …]
|
/linux-6.1.9/drivers/net/dsa/ |
D | mt7530.c | 1054 struct dsa_port *cpu_dp = dp->cpu_dp; in mt7530_port_enable() local 1056 priv->ports[port].pm |= PCR_MATRIX(BIT(cpu_dp->index)); in mt7530_port_enable() 1206 struct dsa_port *cpu_dp = dp->cpu_dp; in mt7530_port_bridge_join() local 1207 u32 port_bitmap = BIT(cpu_dp->index); in mt7530_port_bridge_join() 1285 struct dsa_port *cpu_dp = dp->cpu_dp; in mt7530_port_set_vlan_unaware() local 1287 mt7530_write(priv, MT7530_PCR_P(cpu_dp->index), in mt7530_port_set_vlan_unaware() 1289 mt7530_write(priv, MT7530_PVC_P(cpu_dp->index), PORT_SPEC_TAG in mt7530_port_set_vlan_unaware() 1327 struct dsa_port *cpu_dp = dp->cpu_dp; in mt7530_port_bridge_leave() local 1356 PCR_MATRIX(BIT(cpu_dp->index))); in mt7530_port_bridge_leave() 1357 priv->ports[port].pm = PCR_MATRIX(BIT(cpu_dp->index)); in mt7530_port_bridge_leave() [all …]
|
D | mv88e6060.c | 147 BIT(dsa_to_port(priv->ds, p)->cpu_dp->index))); in mv88e6060_setup_port()
|
D | bcm_sf2_cfp.c | 850 s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in bcm_sf2_cfp_rule_insert()
|
D | bcm_sf2.c | 1012 s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in bcm_sf2_sw_set_wol()
|
/linux-6.1.9/arch/sparc/kernel/ |
D | pci_sabre.c | 472 struct device_node *cpu_dp; in sabre_probe() local 477 for_each_node_by_type(cpu_dp, "cpu") { in sabre_probe() 478 if (of_node_name_eq(cpu_dp, "SUNW,UltraSPARC-IIe")) in sabre_probe()
|
/linux-6.1.9/drivers/net/dsa/realtek/ |
D | rtl8365mb.c | 1915 struct dsa_port *cpu_dp; in rtl8365mb_setup() local 1944 dsa_switch_for_each_cpu_port(cpu_dp, priv->ds) { in rtl8365mb_setup() 1945 cpu->mask |= BIT(cpu_dp->index); in rtl8365mb_setup() 1948 cpu->trap_port = cpu_dp->index; in rtl8365mb_setup()
|
/linux-6.1.9/drivers/net/dsa/qca/ |
D | qca8k-common.c | 636 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in qca8k_port_bridge_join() 669 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in qca8k_port_bridge_leave()
|
/linux-6.1.9/drivers/net/ethernet/mediatek/ |
D | mtk_ppe_offload.c | 174 if (dp->cpu_dp->tag_ops->proto != DSA_TAG_PROTO_MTK) in mtk_flow_get_dsa_port()
|
/linux-6.1.9/drivers/net/dsa/b53/ |
D | b53_common.c | 572 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in b53_enable_port() 1850 s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in b53_br_join() 1902 s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index; in b53_br_leave()
|
/linux-6.1.9/drivers/net/dsa/mv88e6xxx/ |
D | chip.c | 6372 struct dsa_port *cpu_dp; in mv88e6xxx_change_tag_protocol() local 6397 dsa_switch_for_each_cpu_port(cpu_dp, ds) { in mv88e6xxx_change_tag_protocol() 6398 err = mv88e6xxx_setup_port_mode(chip, cpu_dp->index); in mv88e6xxx_change_tag_protocol() 6412 dsa_switch_for_each_cpu_port_continue_reverse(cpu_dp, ds) in mv88e6xxx_change_tag_protocol() 6413 mv88e6xxx_setup_port_mode(chip, cpu_dp->index); in mv88e6xxx_change_tag_protocol()
|
/linux-6.1.9/drivers/net/dsa/sja1105/ |
D | sja1105_main.c | 598 if (dl->dp->ds != ds || dl->link_dp->cpu_dp == dl->dp->cpu_dp) in sja1105_init_l2_forwarding()
|
/linux-6.1.9/Documentation/networking/dsa/ |
D | dsa.rst | 654 master can be retrieved by looking at ``struct dsa_port *cpu_dp =
|