/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 = dsa_to_port(ds, i); in dsa_switch_fastest_ageing_time() 32 static int dsa_switch_ageing_time(struct dsa_switch *ds, in dsa_switch_ageing_time() argument 37 if (ds->ageing_time_min && ageing_time < ds->ageing_time_min) in dsa_switch_ageing_time() 40 if (ds->ageing_time_max && ageing_time > ds->ageing_time_max) in dsa_switch_ageing_time() 44 ageing_time = dsa_switch_fastest_ageing_time(ds, ageing_time); in dsa_switch_ageing_time() 46 if (ds->ops->set_ageing_time) in dsa_switch_ageing_time() 47 return ds->ops->set_ageing_time(ds, ageing_time); in dsa_switch_ageing_time() 52 static bool dsa_switch_mtu_match(struct dsa_switch *ds, int port, in dsa_switch_mtu_match() argument [all …]
|
D | dsa2.c | 187 if (dp->ds->index != sw_index) in dsa_switch_find() 190 return dp->ds; in dsa_switch_find() 288 struct dsa_switch *ds = dp->ds; in dsa_link_touch() local 292 dst = ds->dst; in dsa_link_touch() 313 struct dsa_switch *ds = dp->ds; in dsa_port_setup_routing_table() local 314 struct dsa_switch_tree *dst = ds->dst; in dsa_port_setup_routing_table() 404 if (dp->ds != cpu_dp->ds) in dsa_tree_setup_cpu_ports() 432 struct dsa_switch *ds = dp->ds; in dsa_port_setup() local 442 if (ds->ops->port_setup) { in dsa_port_setup() 443 err = ds->ops->port_setup(ds, dp->index); in dsa_port_setup() [all …]
|
D | port.c | 30 return dsa_tree_notify(dp->ds->dst, e, v); in dsa_port_notify() 53 struct dsa_switch *ds = dp->ds; in dsa_port_fast_age() local 55 if (!ds->ops->port_fast_age) in dsa_port_fast_age() 58 ds->ops->port_fast_age(ds, dp->index); in dsa_port_fast_age() 68 struct dsa_switch *ds = dp->ds; in dsa_port_can_configure_learning() local 71 if (!ds->ops->port_bridge_flags || !ds->ops->port_pre_bridge_flags) in dsa_port_can_configure_learning() 74 err = ds->ops->port_pre_bridge_flags(ds, dp->index, flags, NULL); in dsa_port_can_configure_learning() 80 struct dsa_switch *ds = dp->ds; in dsa_port_supports_hwtstamp() local 83 if (!ds->ops->port_hwtstamp_get || !ds->ops->port_hwtstamp_set) in dsa_port_supports_hwtstamp() 90 err = ds->ops->port_hwtstamp_get(ds, dp->index, ifr); in dsa_port_supports_hwtstamp() [all …]
|
D | tag_8021q.c | 81 u16 dsa_8021q_tx_vid(struct dsa_switch *ds, int port) in dsa_8021q_tx_vid() argument 83 return DSA_8021Q_DIR_TX | DSA_8021Q_SWITCH_ID(ds->index) | in dsa_8021q_tx_vid() 91 u16 dsa_8021q_rx_vid(struct dsa_switch *ds, int port) in dsa_8021q_rx_vid() argument 93 return DSA_8021Q_DIR_RX | DSA_8021Q_SWITCH_ID(ds->index) | in dsa_8021q_rx_vid() 142 static int dsa_switch_do_tag_8021q_vlan_add(struct dsa_switch *ds, int port, in dsa_switch_do_tag_8021q_vlan_add() argument 145 struct dsa_8021q_context *ctx = ds->tag_8021q_ctx; in dsa_switch_do_tag_8021q_vlan_add() 146 struct dsa_port *dp = dsa_to_port(ds, port); in dsa_switch_do_tag_8021q_vlan_add() 152 return ds->ops->tag_8021q_vlan_add(ds, port, vid, flags); in dsa_switch_do_tag_8021q_vlan_add() 164 err = ds->ops->tag_8021q_vlan_add(ds, port, vid, flags); in dsa_switch_do_tag_8021q_vlan_add() 178 static int dsa_switch_do_tag_8021q_vlan_del(struct dsa_switch *ds, int port, in dsa_switch_do_tag_8021q_vlan_del() argument [all …]
|
D | slave.c | 29 struct dsa_switch *ds = bus->priv; in dsa_slave_phy_read() local 31 if (ds->phys_mii_mask & (1 << addr)) in dsa_slave_phy_read() 32 return ds->ops->phy_read(ds, addr, reg); in dsa_slave_phy_read() 39 struct dsa_switch *ds = bus->priv; in dsa_slave_phy_write() local 41 if (ds->phys_mii_mask & (1 << addr)) in dsa_slave_phy_write() 42 return ds->ops->phy_write(ds, addr, reg, val); in dsa_slave_phy_write() 47 void dsa_slave_mii_bus_init(struct dsa_switch *ds) in dsa_slave_mii_bus_init() argument 49 ds->slave_mii_bus->priv = (void *)ds; in dsa_slave_mii_bus_init() 50 ds->slave_mii_bus->name = "dsa slave smi"; in dsa_slave_mii_bus_init() 51 ds->slave_mii_bus->read = dsa_slave_phy_read; in dsa_slave_mii_bus_init() [all …]
|
D | dsa.c | 204 struct dsa_switch *ds = p->dp->ds; in dsa_skb_defer_rx_timestamp() local 219 if (likely(ds->ops->port_rxtstamp)) in dsa_skb_defer_rx_timestamp() 220 return ds->ops->port_rxtstamp(ds, p->dp->index, skb, type); in dsa_skb_defer_rx_timestamp() 263 if (unlikely(cpu_dp->ds->untag_bridge_pvid)) { in dsa_switch_rcv() 283 static bool dsa_is_port_initialized(struct dsa_switch *ds, int p) in dsa_is_port_initialized() argument 285 const struct dsa_port *dp = dsa_to_port(ds, p); in dsa_is_port_initialized() 290 int dsa_switch_suspend(struct dsa_switch *ds) in dsa_switch_suspend() argument 295 for (i = 0; i < ds->num_ports; i++) { in dsa_switch_suspend() 296 if (!dsa_is_port_initialized(ds, i)) in dsa_switch_suspend() 299 ret = dsa_slave_suspend(dsa_to_port(ds, i)->slave); in dsa_switch_suspend() [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 | tag_sja1105.c | 147 struct dsa_switch *ds = dp->ds; in sja1105_xmit_tpid() local 161 list_for_each_entry(other_dp, &ds->dst->ports, list) { in sja1105_xmit_tpid() 162 if (other_dp->ds != ds) in sja1105_xmit_tpid() 241 u16 tx_vid = dsa_8021q_tx_vid(dp->ds, dp->index); in sja1105_xmit() 269 u16 tx_vid = dsa_8021q_tx_vid(dp->ds, dp->index); in sja1110_xmit() 305 SJA1110_TX_TRAILER_SWITCHID(dp->ds->index) | in sja1110_xmit() 372 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine() 417 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine() 424 dev_err_ratelimited(dp->ds->dev, in sja1105_rcv_meta_state_machine() 529 static void sja1110_process_meta_tstamp(struct dsa_switch *ds, int port, in sja1110_process_meta_tstamp() argument [all …]
|
D | dsa_priv.h | 129 struct dsa_switch *ds; member 193 if (dp->ds->index == device && dp->index == port && in dsa_master_find_slave() 316 void dsa_slave_mii_bus_init(struct dsa_switch *ds); 538 int dsa_switch_register_notifier(struct dsa_switch *ds); 539 void dsa_switch_unregister_notifier(struct dsa_switch *ds); 554 int dsa_tag_8021q_bridge_join(struct dsa_switch *ds, 556 int dsa_tag_8021q_bridge_leave(struct dsa_switch *ds, 558 int dsa_switch_tag_8021q_vlan_add(struct dsa_switch *ds, 560 int dsa_switch_tag_8021q_vlan_del(struct dsa_switch *ds,
|
D | tag_ocelot.c | 11 struct dsa_switch *ds = dp->ds; in ocelot_xmit_common() local 22 ocelot_ifh_set_src(injection, ds->num_ports); in ocelot_xmit_common()
|
D | tag_dsa.c | 135 struct dsa_switch_tree *dst = dp->ds->dst; in dsa_xmit_ll() 147 tag_dev = dp->ds->index; in dsa_xmit_ll()
|
D | tag_xrs700x.c | 21 dsa_hsr_foreach_port(partner, dp->ds, dp->hsr_dev) in xrs700x_xmit()
|
D | tag_ocelot_8021q.c | 42 u16 tx_vid = dsa_8021q_tx_vid(dp->ds, dp->index); in ocelot_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 …]
|