/net/dsa/ |
D | switch.c | 17 static unsigned int dsa_switch_fastest_ageing_time(struct dsa_switch *ds, in dsa_switch_fastest_ageing_time() argument 22 for (i = 0; i < ds->num_ports; ++i) { in dsa_switch_fastest_ageing_time() 23 struct dsa_port *dp = &ds->ports[i]; in dsa_switch_fastest_ageing_time() 32 static int dsa_switch_ageing_time(struct dsa_switch *ds, in dsa_switch_ageing_time() argument 39 if (ds->ageing_time_min && ageing_time < ds->ageing_time_min) in dsa_switch_ageing_time() 41 if (ds->ageing_time_max && ageing_time > ds->ageing_time_max) in dsa_switch_ageing_time() 47 ageing_time = dsa_switch_fastest_ageing_time(ds, ageing_time); in dsa_switch_ageing_time() 49 if (ds->ops->set_ageing_time) in dsa_switch_ageing_time() 50 return ds->ops->set_ageing_time(ds, ageing_time); in dsa_switch_ageing_time() 55 static int dsa_switch_bridge_join(struct dsa_switch *ds, in dsa_switch_bridge_join() argument [all …]
|
D | dsa2.c | 114 struct dsa_switch *ds; in dsa_tree_find_port_by_node() local 119 ds = dst->ds[device]; in dsa_tree_find_port_by_node() 120 if (!ds) in dsa_tree_find_port_by_node() 123 for (port = 0; port < ds->num_ports; port++) { in dsa_tree_find_port_by_node() 124 dp = &ds->ports[port]; in dsa_tree_find_port_by_node() 136 struct dsa_switch *ds = dp->ds; in dsa_port_setup_routing_table() local 137 struct dsa_switch_tree *dst = ds->dst; in dsa_port_setup_routing_table() 150 ds->rtable[link_dp->ds->index] = dp->index; in dsa_port_setup_routing_table() 156 static bool dsa_switch_setup_routing_table(struct dsa_switch *ds) in dsa_switch_setup_routing_table() argument 163 ds->rtable[i] = DSA_RTABLE_NONE; in dsa_switch_setup_routing_table() [all …]
|
D | port.c | 18 struct raw_notifier_head *nh = &dp->ds->dst->nh; in dsa_port_notify() 29 struct dsa_switch *ds = dp->ds; in dsa_port_set_state() local 33 return ds->ops->port_stp_state_set ? 0 : -EOPNOTSUPP; in dsa_port_set_state() 35 if (ds->ops->port_stp_state_set) in dsa_port_set_state() 36 ds->ops->port_stp_state_set(ds, port, state); in dsa_port_set_state() 38 if (ds->ops->port_fast_age) { in dsa_port_set_state() 49 ds->ops->port_fast_age(ds, port); in dsa_port_set_state() 68 struct dsa_switch *ds = dp->ds; in dsa_port_enable_rt() local 72 if (ds->ops->port_enable) { in dsa_port_enable_rt() 73 err = ds->ops->port_enable(ds, port, phy); in dsa_port_enable_rt() [all …]
|
D | slave.c | 30 struct dsa_switch *ds = bus->priv; in dsa_slave_phy_read() local 32 if (ds->phys_mii_mask & (1 << addr)) in dsa_slave_phy_read() 33 return ds->ops->phy_read(ds, addr, reg); in dsa_slave_phy_read() 40 struct dsa_switch *ds = bus->priv; in dsa_slave_phy_write() local 42 if (ds->phys_mii_mask & (1 << addr)) in dsa_slave_phy_write() 43 return ds->ops->phy_write(ds, addr, reg, val); in dsa_slave_phy_write() 48 void dsa_slave_mii_bus_init(struct dsa_switch *ds) in dsa_slave_mii_bus_init() argument 50 ds->slave_mii_bus->priv = (void *)ds; in dsa_slave_mii_bus_init() 51 ds->slave_mii_bus->name = "dsa slave smi"; in dsa_slave_mii_bus_init() 52 ds->slave_mii_bus->read = dsa_slave_phy_read; in dsa_slave_mii_bus_init() [all …]
|
D | tag_8021q.c | 65 u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port) in dsa_8021q_tx_vid() argument 67 return DSA_8021Q_DIR_TX | DSA_8021Q_SWITCH_ID(ds->index) | in dsa_8021q_tx_vid() 75 u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port) in dsa_8021q_rx_vid() argument 77 return DSA_8021Q_DIR_RX | DSA_8021Q_SWITCH_ID(ds->index) | in dsa_8021q_rx_vid() 96 static int dsa_8021q_restore_pvid(struct dsa_switch *ds, int port) in dsa_8021q_restore_pvid() argument 103 if (!dsa_is_user_port(ds, port)) in dsa_8021q_restore_pvid() 106 slave = ds->ports[port].slave; in dsa_8021q_restore_pvid() 117 dev_err(ds->dev, "Couldn't determine PVID attributes\n"); in dsa_8021q_restore_pvid() 121 return dsa_port_vid_add(&ds->ports[port], pvid, vinfo.flags); in dsa_8021q_restore_pvid() 130 static int dsa_8021q_vid_apply(struct dsa_switch *ds, int port, u16 vid, in dsa_8021q_vid_apply() argument [all …]
|
D | master.c | 15 struct dsa_switch *ds = cpu_dp->ds; in dsa_master_get_regs_len() local 30 if (ds->ops->get_regs_len) { in dsa_master_get_regs_len() 31 len = ds->ops->get_regs_len(ds, port); in dsa_master_get_regs_len() 45 struct dsa_switch *ds = cpu_dp->ds; in dsa_master_get_regs() local 66 if (ds->ops->get_regs_len && ds->ops->get_regs) { in dsa_master_get_regs() 67 len = ds->ops->get_regs_len(ds, port); in dsa_master_get_regs() 71 ds->ops->get_regs(ds, port, cpu_regs, data); in dsa_master_get_regs() 81 struct dsa_switch *ds = cpu_dp->ds; in dsa_master_get_ethtool_stats() local 90 if (ds->ops->get_ethtool_stats) in dsa_master_get_ethtool_stats() 91 ds->ops->get_ethtool_stats(ds, port, data + count); in dsa_master_get_ethtool_stats() [all …]
|
D | dsa.c | 182 struct dsa_switch *ds = p->dp->ds; in dsa_skb_defer_rx_timestamp() local 197 if (likely(ds->ops->port_rxtstamp)) in dsa_skb_defer_rx_timestamp() 198 return ds->ops->port_rxtstamp(ds, p->dp->index, skb, type); in dsa_skb_defer_rx_timestamp() 247 static bool dsa_is_port_initialized(struct dsa_switch *ds, int p) in dsa_is_port_initialized() argument 249 return dsa_is_user_port(ds, p) && ds->ports[p].slave; in dsa_is_port_initialized() 252 int dsa_switch_suspend(struct dsa_switch *ds) in dsa_switch_suspend() argument 257 for (i = 0; i < ds->num_ports; i++) { in dsa_switch_suspend() 258 if (!dsa_is_port_initialized(ds, i)) in dsa_switch_suspend() 261 ret = dsa_slave_suspend(ds->ports[i].slave); in dsa_switch_suspend() 266 if (ds->ops->suspend) in dsa_switch_suspend() [all …]
|
D | dsa_priv.h | 110 struct dsa_switch *ds; in dsa_master_find_slave() local 116 ds = dst->ds[device]; in dsa_master_find_slave() 117 if (!ds) in dsa_master_find_slave() 120 if (port < 0 || port >= ds->num_ports) in dsa_master_find_slave() 123 slave_port = &ds->ports[port]; in dsa_master_find_slave() 189 void dsa_slave_mii_bus_init(struct dsa_switch *ds); 215 int dsa_switch_register_notifier(struct dsa_switch *ds); 216 void dsa_switch_unregister_notifier(struct dsa_switch *ds);
|
D | tag_sja1105.c | 90 struct dsa_switch *ds = dp->ds; in sja1105_xmit() local 91 u16 tx_vid = dsa_8021q_tx_vid(ds, dp->index); in sja1105_xmit() 169 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine() 209 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine() 216 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine()
|
D | tag_dsa.c | 33 dsa_header[0] = 0x60 | dp->ds->index; in dsa_xmit() 54 dsa_header[0] = 0x40 | dp->ds->index; in dsa_xmit()
|
D | tag_edsa.c | 52 edsa_header[4] = 0x60 | dp->ds->index; in edsa_xmit() 77 edsa_header[4] = 0x40 | dp->ds->index; in edsa_xmit()
|
D | tag_lan9303.c | 50 struct lan9303 *chip = dp->ds->priv; in lan9303_xmit_use_arl()
|
/net/netfilter/ipvs/ |
D | ip_vs_mh.c | 126 struct ip_vs_mh_dest_setup *ds; in ip_vs_mh_permutate() local 139 ds = &s->dest_setup[0]; in ip_vs_mh_permutate() 143 ds->offset = ip_vs_mh_hashkey(svc->af, &dest->addr, in ip_vs_mh_permutate() 146 ds->skip = ip_vs_mh_hashkey(svc->af, &dest->addr, in ip_vs_mh_permutate() 149 ds->perm = ds->offset; in ip_vs_mh_permutate() 152 ds->turns = ((lw / s->gcd) >> s->rshift) ? : (lw != 0); in ip_vs_mh_permutate() 153 ds++; in ip_vs_mh_permutate() 165 struct ip_vs_mh_dest_setup *ds; in ip_vs_mh_populate() local 189 ds = &s->dest_setup[0]; in ip_vs_mh_populate() 192 if (ds->turns < 1) { in ip_vs_mh_populate() [all …]
|