Lines Matching refs:slave
130 if (port->slave == NULL) in __get_bond_by_port()
133 return bond_get_bond_by_slave(port->slave); in __get_bond_by_port()
147 struct slave *first_slave; in __get_first_agg()
180 bond_set_slave_inactive_flags(port->slave, BOND_SLAVE_NOTIFY_LATER); in __disable_port()
189 struct slave *slave = port->slave; in __enable_port() local
191 if ((slave->link == BOND_LINK_UP) && bond_slave_is_up(slave)) in __enable_port()
192 bond_set_slave_active_flags(slave, BOND_SLAVE_NOTIFY_LATER); in __enable_port()
201 return bond_is_active_slave(port->slave); in __port_is_enabled()
259 struct slave *slave = port->slave; in __get_link_speed() local
267 if (slave->link != BOND_LINK_UP) in __get_link_speed()
270 switch (slave->speed) { in __get_link_speed()
337 if (slave->speed != SPEED_UNKNOWN) in __get_link_speed()
339 slave->bond->dev->name, in __get_link_speed()
340 slave->dev->name, slave->speed, in __get_link_speed()
347 slave_dbg(slave->bond->dev, slave->dev, "Port %d Received link speed %d update from adapter\n", in __get_link_speed()
362 struct slave *slave = port->slave; in __get_duplex() local
368 if (slave->link == BOND_LINK_UP) { in __get_duplex()
369 switch (slave->duplex) { in __get_duplex()
372 …slave_dbg(slave->bond->dev, slave->dev, "Port %d Received status full duplex update from adapter\n… in __get_duplex()
378 …slave_dbg(slave->bond->dev, slave->dev, "Port %d Received status NOT full duplex update from adapt… in __get_duplex()
388 const struct bonding *bond = bond_get_bond_by_slave(port->slave); in __ad_actor_update_port()
513 slave_dbg(port->slave->bond->dev, port->slave->dev, in __record_pdu()
517 slave_dbg(port->slave->bond->dev, port->slave->dev, in __record_pdu()
780 struct bonding *bond = aggregator->slave->bond; in __get_active_agg()
782 struct slave *slave; in __get_active_agg() local
784 bond_for_each_slave_rcu(bond, slave, iter) in __get_active_agg()
785 if (SLAVE_AD_INFO(slave)->aggregator.is_active) in __get_active_agg()
786 return &(SLAVE_AD_INFO(slave)->aggregator); in __get_active_agg()
813 slave_dbg(port->slave->bond->dev, port->slave->dev, in __update_lacpdu_from_port()
851 struct slave *slave = port->slave; in ad_lacpdu_send() local
860 atomic64_inc(&SLAVE_AD_INFO(slave)->stats.lacpdu_tx); in ad_lacpdu_send()
861 atomic64_inc(&BOND_AD_INFO(slave->bond).stats.lacpdu_tx); in ad_lacpdu_send()
863 skb->dev = slave->dev; in ad_lacpdu_send()
875 ether_addr_copy(lacpdu_header->hdr.h_source, slave->perm_hwaddr); in ad_lacpdu_send()
895 struct slave *slave = port->slave; in ad_marker_send() local
906 atomic64_inc(&SLAVE_AD_INFO(slave)->stats.marker_tx); in ad_marker_send()
907 atomic64_inc(&BOND_AD_INFO(slave->bond).stats.marker_tx); in ad_marker_send()
910 atomic64_inc(&SLAVE_AD_INFO(slave)->stats.marker_resp_tx); in ad_marker_send()
911 atomic64_inc(&BOND_AD_INFO(slave->bond).stats.marker_resp_tx); in ad_marker_send()
917 skb->dev = slave->dev; in ad_marker_send()
928 ether_addr_copy(marker_header->hdr.h_source, slave->perm_hwaddr); in ad_marker_send()
1047 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_mux_machine()
1110 atomic64_inc(&SLAVE_AD_INFO(port->slave)->stats.lacpdu_rx); in ad_rx_machine()
1111 atomic64_inc(&BOND_AD_INFO(port->slave->bond).stats.lacpdu_rx); in ad_rx_machine()
1165 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_rx_machine()
1217 slave_err(port->slave->bond->dev, port->slave->dev, "An illegal loopback occurred on slave\n" in ad_rx_machine()
1287 slave_dbg(port->slave->bond->dev, in ad_tx_machine()
1288 port->slave->dev, in ad_tx_machine()
1370 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_periodic_machine()
1410 struct slave *slave; in ad_port_selection_logic() local
1449 slave_dbg(bond->dev, port->slave->dev, "Port %d left LAG %d\n", in ad_port_selection_logic()
1465 port->slave->bond->dev->name, in ad_port_selection_logic()
1466 port->slave->dev->name, in ad_port_selection_logic()
1472 bond_for_each_slave(bond, slave, iter) { in ad_port_selection_logic()
1473 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); in ad_port_selection_logic()
1498 slave_dbg(bond->dev, slave->dev, "Port %d joined LAG %d (existing LAG)\n", in ad_port_selection_logic()
1545 slave_dbg(bond->dev, port->slave->dev, "Port %d joined LAG %d (new LAG)\n", in ad_port_selection_logic()
1549 slave_err(bond->dev, port->slave->dev, in ad_port_selection_logic()
1632 curr->slave->bond->dev->name, in ad_agg_selection_test()
1633 curr->slave->dev->name, in ad_agg_selection_test()
1650 if (netif_running(port->slave->dev) && in agg_device_up()
1651 netif_carrier_ok(port->slave->dev)) in agg_device_up()
1688 struct bonding *bond = agg->slave->bond; in ad_agg_selection_logic()
1690 struct slave *slave; in ad_agg_selection_logic() local
1698 bond_for_each_slave_rcu(bond, slave, iter) { in ad_agg_selection_logic()
1699 agg = &(SLAVE_AD_INFO(slave)->aggregator); in ad_agg_selection_logic()
1735 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1741 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1742 best->lag_ports, best->slave); in ad_agg_selection_logic()
1744 bond_for_each_slave_rcu(bond, slave, iter) { in ad_agg_selection_logic()
1745 agg = &(SLAVE_AD_INFO(slave)->aggregator); in ad_agg_selection_logic()
1747 slave_dbg(bond->dev, slave->dev, "Agg=%d; P=%d; a k=%d; p k=%d; Ind=%d; Act=%d\n", in ad_agg_selection_logic()
1761 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1764 best->slave ? best->slave->dev->name : "NULL", in ad_agg_selection_logic()
1822 aggregator->slave ? in ad_clear_agg()
1823 aggregator->slave->dev->name : "NULL", in ad_clear_agg()
1839 aggregator->slave = NULL; in ad_initialize_agg()
1920 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_enable_collecting_distributing()
1941 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_disable_collecting_distributing()
1961 atomic64_inc(&SLAVE_AD_INFO(port->slave)->stats.marker_rx); in ad_marker_info_received()
1962 atomic64_inc(&BOND_AD_INFO(port->slave->bond).stats.marker_rx); in ad_marker_info_received()
1971 slave_dbg(port->slave->bond->dev, port->slave->dev, in ad_marker_info_received()
1988 atomic64_inc(&SLAVE_AD_INFO(port->slave)->stats.marker_resp_rx); in ad_marker_response_received()
1989 atomic64_inc(&BOND_AD_INFO(port->slave->bond).stats.marker_resp_rx); in ad_marker_response_received()
2043 void bond_3ad_bind_slave(struct slave *slave) in bond_3ad_bind_slave() argument
2045 struct bonding *bond = bond_get_bond_by_slave(slave); in bond_3ad_bind_slave()
2050 if (SLAVE_AD_INFO(slave)->port.slave != slave) { in bond_3ad_bind_slave()
2053 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_bind_slave()
2057 port->slave = slave; in bond_3ad_bind_slave()
2058 port->actor_port_number = SLAVE_AD_INFO(slave)->id; in bond_3ad_bind_slave()
2074 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); in bond_3ad_bind_slave()
2080 aggregator->slave = slave; in bond_3ad_bind_slave()
2094 void bond_3ad_unbind_slave(struct slave *slave) in bond_3ad_unbind_slave() argument
2099 struct bonding *bond = slave->bond; in bond_3ad_unbind_slave()
2100 struct slave *slave_iter; in bond_3ad_unbind_slave()
2106 aggregator = &(SLAVE_AD_INFO(slave)->aggregator); in bond_3ad_unbind_slave()
2107 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_unbind_slave()
2110 if (!port->slave) { in bond_3ad_unbind_slave()
2111 slave_warn(bond->dev, slave->dev, "Trying to unbind an uninitialized port\n"); in bond_3ad_unbind_slave()
2115 slave_dbg(bond->dev, slave->dev, "Unbinding Link Aggregation Group %d\n", in bond_3ad_unbind_slave()
2154 slave_dbg(bond->dev, slave->dev, "Some port(s) related to LAG %d - replacing with LAG %d\n", in bond_3ad_unbind_slave()
2160 slave_info(bond->dev, slave->dev, "Removing an active aggregator\n"); in bond_3ad_unbind_slave()
2191 …slave_warn(bond->dev, slave->dev, "unbinding aggregator, and could not find a new aggregator for i… in bond_3ad_unbind_slave()
2200 slave_info(bond->dev, slave->dev, "Removing an active aggregator\n"); in bond_3ad_unbind_slave()
2210 slave_dbg(bond->dev, slave->dev, "Unbinding port %d\n", port->actor_port_number); in bond_3ad_unbind_slave()
2234 slave_info(bond->dev, slave->dev, "Removing an active aggregator\n"); in bond_3ad_unbind_slave()
2244 port->slave = NULL; in bond_3ad_unbind_slave()
2260 struct slave *slave; in bond_3ad_update_ad_actor_settings() local
2273 bond_for_each_slave(bond, slave, iter) { in bond_3ad_update_ad_actor_settings()
2274 struct port *port = &(SLAVE_AD_INFO(slave))->port; in bond_3ad_update_ad_actor_settings()
2323 struct slave *slave; in bond_3ad_state_machine_handler() local
2340 slave = bond_first_slave_rcu(bond); in bond_3ad_state_machine_handler()
2341 port = slave ? &(SLAVE_AD_INFO(slave)->port) : NULL; in bond_3ad_state_machine_handler()
2345 if (!port->slave) { in bond_3ad_state_machine_handler()
2358 bond_for_each_slave_rcu(bond, slave, iter) { in bond_3ad_state_machine_handler()
2359 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_state_machine_handler()
2360 if (!port->slave) { in bond_3ad_state_machine_handler()
2379 bond_for_each_slave_rcu(bond, slave, iter) { in bond_3ad_state_machine_handler()
2380 if (slave->should_notify) { in bond_3ad_state_machine_handler()
2407 static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave) in bond_3ad_rx_indication() argument
2409 struct bonding *bond = slave->bond; in bond_3ad_rx_indication()
2415 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_rx_indication()
2416 if (!port->slave) { in bond_3ad_rx_indication()
2418 slave->dev->name, slave->bond->dev->name); in bond_3ad_rx_indication()
2425 slave_dbg(slave->bond->dev, slave->dev, in bond_3ad_rx_indication()
2429 spin_lock(&slave->bond->mode_lock); in bond_3ad_rx_indication()
2431 spin_unlock(&slave->bond->mode_lock); in bond_3ad_rx_indication()
2441 slave_dbg(slave->bond->dev, slave->dev, "Received Marker Information on port %d\n", in bond_3ad_rx_indication()
2446 slave_dbg(slave->bond->dev, slave->dev, "Received Marker Response on port %d\n", in bond_3ad_rx_indication()
2451 slave_dbg(slave->bond->dev, slave->dev, "Received an unknown Marker subtype on port %d\n", in bond_3ad_rx_indication()
2453 stat = &SLAVE_AD_INFO(slave)->stats.marker_unknown_rx; in bond_3ad_rx_indication()
2460 atomic64_inc(&SLAVE_AD_INFO(slave)->stats.lacpdu_unknown_rx); in bond_3ad_rx_indication()
2502 slave_err(port->slave->bond->dev, in ad_update_actor_keys()
2503 port->slave->dev, in ad_update_actor_keys()
2522 void bond_3ad_adapter_speed_duplex_changed(struct slave *slave) in bond_3ad_adapter_speed_duplex_changed() argument
2526 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_adapter_speed_duplex_changed()
2529 if (!port->slave) { in bond_3ad_adapter_speed_duplex_changed()
2530 slave_warn(slave->bond->dev, slave->dev, in bond_3ad_adapter_speed_duplex_changed()
2535 spin_lock_bh(&slave->bond->mode_lock); in bond_3ad_adapter_speed_duplex_changed()
2537 spin_unlock_bh(&slave->bond->mode_lock); in bond_3ad_adapter_speed_duplex_changed()
2538 slave_dbg(slave->bond->dev, slave->dev, "Port %d changed speed/duplex\n", in bond_3ad_adapter_speed_duplex_changed()
2549 void bond_3ad_handle_link_change(struct slave *slave, char link) in bond_3ad_handle_link_change() argument
2555 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_handle_link_change()
2558 if (!port->slave) { in bond_3ad_handle_link_change()
2559 slave_warn(slave->bond->dev, slave->dev, "link status changed for uninitialized port\n"); in bond_3ad_handle_link_change()
2563 spin_lock_bh(&slave->bond->mode_lock); in bond_3ad_handle_link_change()
2582 spin_unlock_bh(&slave->bond->mode_lock); in bond_3ad_handle_link_change()
2584 slave_dbg(slave->bond->dev, slave->dev, "Port %d changed link status to %s\n", in bond_3ad_handle_link_change()
2591 bond_update_slave_arr(slave->bond, NULL); in bond_3ad_handle_link_change()
2610 struct slave *first_slave; in bond_3ad_set_carrier()
2652 struct slave *slave; in __bond_3ad_get_active_agg_info() local
2655 bond_for_each_slave_rcu(bond, slave, iter) { in __bond_3ad_get_active_agg_info()
2656 port = &(SLAVE_AD_INFO(slave)->port); in __bond_3ad_get_active_agg_info()
2687 struct slave *slave) in bond_3ad_lacpdu_recv() argument
2699 atomic64_inc(&SLAVE_AD_INFO(slave)->stats.lacpdu_illegal_rx); in bond_3ad_lacpdu_recv()
2704 return bond_3ad_rx_indication(lacpdu, slave); in bond_3ad_lacpdu_recv()
2722 struct slave *slave; in bond_3ad_update_lacp_rate() local
2727 bond_for_each_slave(bond, slave, iter) { in bond_3ad_update_lacp_rate()
2728 port = &(SLAVE_AD_INFO(slave)->port); in bond_3ad_update_lacp_rate()