diff options
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 96 |
1 files changed, 50 insertions, 46 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index be799d2a8a8d..cea5cfe23b71 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1124,7 +1124,7 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) | |||
1124 | // detect loopback situation | 1124 | // detect loopback situation |
1125 | if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) { | 1125 | if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) { |
1126 | // INFO_RECEIVED_LOOPBACK_FRAMES | 1126 | // INFO_RECEIVED_LOOPBACK_FRAMES |
1127 | printk(KERN_ERR DRV_NAME ": %s: An illegal loopback occurred on " | 1127 | pr_err(DRV_NAME ": %s: An illegal loopback occurred on " |
1128 | "adapter (%s). Check the configuration to verify that all " | 1128 | "adapter (%s). Check the configuration to verify that all " |
1129 | "Adapters are connected to 802.3ad compliant switch ports\n", | 1129 | "Adapters are connected to 802.3ad compliant switch ports\n", |
1130 | port->slave->dev->master->name, port->slave->dev->name); | 1130 | port->slave->dev->master->name, port->slave->dev->name); |
@@ -1306,11 +1306,13 @@ static void ad_port_selection_logic(struct port *port) | |||
1306 | } | 1306 | } |
1307 | } | 1307 | } |
1308 | if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list | 1308 | if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list |
1309 | printk(KERN_WARNING DRV_NAME ": %s: Warning: Port %d (on %s) was " | 1309 | pr_warning(DRV_NAME ": %s: Warning: Port %d (on %s) " |
1310 | "related to aggregator %d but was not on its port list\n", | 1310 | "was related to aggregator %d but was not " |
1311 | port->slave->dev->master->name, | 1311 | "on its port list\n", |
1312 | port->actor_port_number, port->slave->dev->name, | 1312 | port->slave->dev->master->name, |
1313 | port->aggregator->aggregator_identifier); | 1313 | port->actor_port_number, |
1314 | port->slave->dev->name, | ||
1315 | port->aggregator->aggregator_identifier); | ||
1314 | } | 1316 | } |
1315 | } | 1317 | } |
1316 | // search on all aggregators for a suitable aggregator for this port | 1318 | // search on all aggregators for a suitable aggregator for this port |
@@ -1379,7 +1381,8 @@ static void ad_port_selection_logic(struct port *port) | |||
1379 | 1381 | ||
1380 | pr_debug("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); | 1382 | pr_debug("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); |
1381 | } else { | 1383 | } else { |
1382 | printk(KERN_ERR DRV_NAME ": %s: Port %d (on %s) did not find a suitable aggregator\n", | 1384 | pr_err(DRV_NAME ": %s: Port %d (on %s) did not find " |
1385 | "a suitable aggregator\n", | ||
1383 | port->slave->dev->master->name, | 1386 | port->slave->dev->master->name, |
1384 | port->actor_port_number, port->slave->dev->name); | 1387 | port->actor_port_number, port->slave->dev->name); |
1385 | } | 1388 | } |
@@ -1456,10 +1459,10 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
1456 | break; | 1459 | break; |
1457 | 1460 | ||
1458 | default: | 1461 | default: |
1459 | printk(KERN_WARNING DRV_NAME | 1462 | pr_warning(DRV_NAME |
1460 | ": %s: Impossible agg select mode %d\n", | 1463 | ": %s: Impossible agg select mode %d\n", |
1461 | curr->slave->dev->master->name, | 1464 | curr->slave->dev->master->name, |
1462 | __get_agg_selection_mode(curr->lag_ports)); | 1465 | __get_agg_selection_mode(curr->lag_ports)); |
1463 | break; | 1466 | break; |
1464 | } | 1467 | } |
1465 | 1468 | ||
@@ -1562,7 +1565,7 @@ static void ad_agg_selection_logic(struct aggregator *agg) | |||
1562 | 1565 | ||
1563 | // check if any partner replys | 1566 | // check if any partner replys |
1564 | if (best->is_individual) { | 1567 | if (best->is_individual) { |
1565 | printk(KERN_WARNING DRV_NAME ": %s: Warning: No 802.3ad" | 1568 | pr_warning(DRV_NAME ": %s: Warning: No 802.3ad" |
1566 | " response from the link partner for any" | 1569 | " response from the link partner for any" |
1567 | " adapters in the bond\n", | 1570 | " adapters in the bond\n", |
1568 | best->slave->dev->master->name); | 1571 | best->slave->dev->master->name); |
@@ -1885,7 +1888,8 @@ int bond_3ad_bind_slave(struct slave *slave) | |||
1885 | struct aggregator *aggregator; | 1888 | struct aggregator *aggregator; |
1886 | 1889 | ||
1887 | if (bond == NULL) { | 1890 | if (bond == NULL) { |
1888 | printk(KERN_ERR DRV_NAME ": %s: The slave %s is not attached to its bond\n", | 1891 | pr_err(DRV_NAME ": %s: The slave %s is not attached to " |
1892 | "its bond\n", | ||
1889 | slave->dev->master->name, slave->dev->name); | 1893 | slave->dev->master->name, slave->dev->name); |
1890 | return -1; | 1894 | return -1; |
1891 | } | 1895 | } |
@@ -1961,9 +1965,9 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
1961 | 1965 | ||
1962 | // if slave is null, the whole port is not initialized | 1966 | // if slave is null, the whole port is not initialized |
1963 | if (!port->slave) { | 1967 | if (!port->slave) { |
1964 | printk(KERN_WARNING DRV_NAME ": Warning: %s: Trying to " | 1968 | pr_warning(DRV_NAME ": Warning: %s: Trying to " |
1965 | "unbind an uninitialized port on %s\n", | 1969 | "unbind an uninitialized port on %s\n", |
1966 | slave->dev->master->name, slave->dev->name); | 1970 | slave->dev->master->name, slave->dev->name); |
1967 | return; | 1971 | return; |
1968 | } | 1972 | } |
1969 | 1973 | ||
@@ -1994,8 +1998,8 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
1994 | pr_debug("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); | 1998 | pr_debug("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); |
1995 | 1999 | ||
1996 | if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { | 2000 | if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { |
1997 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", | 2001 | pr_info(DRV_NAME ": %s: Removing an active aggregator\n", |
1998 | aggregator->slave->dev->master->name); | 2002 | aggregator->slave->dev->master->name); |
1999 | // select new active aggregator | 2003 | // select new active aggregator |
2000 | select_new_active_agg = 1; | 2004 | select_new_active_agg = 1; |
2001 | } | 2005 | } |
@@ -2025,17 +2029,17 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2025 | ad_agg_selection_logic(__get_first_agg(port)); | 2029 | ad_agg_selection_logic(__get_first_agg(port)); |
2026 | } | 2030 | } |
2027 | } else { | 2031 | } else { |
2028 | printk(KERN_WARNING DRV_NAME ": %s: Warning: unbinding aggregator, " | 2032 | pr_warning(DRV_NAME ": %s: Warning: unbinding aggregator, " |
2029 | "and could not find a new aggregator for its ports\n", | 2033 | "and could not find a new aggregator for its ports\n", |
2030 | slave->dev->master->name); | 2034 | slave->dev->master->name); |
2031 | } | 2035 | } |
2032 | } else { // in case that the only port related to this aggregator is the one we want to remove | 2036 | } else { // in case that the only port related to this aggregator is the one we want to remove |
2033 | select_new_active_agg = aggregator->is_active; | 2037 | select_new_active_agg = aggregator->is_active; |
2034 | // clear the aggregator | 2038 | // clear the aggregator |
2035 | ad_clear_agg(aggregator); | 2039 | ad_clear_agg(aggregator); |
2036 | if (select_new_active_agg) { | 2040 | if (select_new_active_agg) { |
2037 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", | 2041 | pr_info(DRV_NAME ": %s: Removing an active aggregator\n", |
2038 | slave->dev->master->name); | 2042 | slave->dev->master->name); |
2039 | // select new active aggregator | 2043 | // select new active aggregator |
2040 | ad_agg_selection_logic(__get_first_agg(port)); | 2044 | ad_agg_selection_logic(__get_first_agg(port)); |
2041 | } | 2045 | } |
@@ -2061,8 +2065,8 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2061 | // clear the aggregator | 2065 | // clear the aggregator |
2062 | ad_clear_agg(temp_aggregator); | 2066 | ad_clear_agg(temp_aggregator); |
2063 | if (select_new_active_agg) { | 2067 | if (select_new_active_agg) { |
2064 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", | 2068 | pr_info(DRV_NAME ": %s: Removing an active aggregator\n", |
2065 | slave->dev->master->name); | 2069 | slave->dev->master->name); |
2066 | // select new active aggregator | 2070 | // select new active aggregator |
2067 | ad_agg_selection_logic(__get_first_agg(port)); | 2071 | ad_agg_selection_logic(__get_first_agg(port)); |
2068 | } | 2072 | } |
@@ -2110,8 +2114,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work) | |||
2110 | // select the active aggregator for the bond | 2114 | // select the active aggregator for the bond |
2111 | if ((port = __get_first_port(bond))) { | 2115 | if ((port = __get_first_port(bond))) { |
2112 | if (!port->slave) { | 2116 | if (!port->slave) { |
2113 | printk(KERN_WARNING DRV_NAME ": %s: Warning: bond's first port is " | 2117 | pr_warning(DRV_NAME ": %s: Warning: bond's first port is " |
2114 | "uninitialized\n", bond->dev->name); | 2118 | "uninitialized\n", bond->dev->name); |
2115 | goto re_arm; | 2119 | goto re_arm; |
2116 | } | 2120 | } |
2117 | 2121 | ||
@@ -2124,8 +2128,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work) | |||
2124 | // for each port run the state machines | 2128 | // for each port run the state machines |
2125 | for (port = __get_first_port(bond); port; port = __get_next_port(port)) { | 2129 | for (port = __get_first_port(bond); port; port = __get_next_port(port)) { |
2126 | if (!port->slave) { | 2130 | if (!port->slave) { |
2127 | printk(KERN_WARNING DRV_NAME ": %s: Warning: Found an uninitialized " | 2131 | pr_warning(DRV_NAME ": %s: Warning: Found an uninitialized " |
2128 | "port\n", bond->dev->name); | 2132 | "port\n", bond->dev->name); |
2129 | goto re_arm; | 2133 | goto re_arm; |
2130 | } | 2134 | } |
2131 | 2135 | ||
@@ -2166,8 +2170,9 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u | |||
2166 | port = &(SLAVE_AD_INFO(slave).port); | 2170 | port = &(SLAVE_AD_INFO(slave).port); |
2167 | 2171 | ||
2168 | if (!port->slave) { | 2172 | if (!port->slave) { |
2169 | printk(KERN_WARNING DRV_NAME ": %s: Warning: port of slave %s is " | 2173 | pr_warning(DRV_NAME ": %s: Warning: port of slave %s " |
2170 | "uninitialized\n", slave->dev->name, slave->dev->master->name); | 2174 | "is uninitialized\n", |
2175 | slave->dev->name, slave->dev->master->name); | ||
2171 | return; | 2176 | return; |
2172 | } | 2177 | } |
2173 | 2178 | ||
@@ -2212,9 +2217,9 @@ void bond_3ad_adapter_speed_changed(struct slave *slave) | |||
2212 | 2217 | ||
2213 | // if slave is null, the whole port is not initialized | 2218 | // if slave is null, the whole port is not initialized |
2214 | if (!port->slave) { | 2219 | if (!port->slave) { |
2215 | printk(KERN_WARNING DRV_NAME ": Warning: %s: speed " | 2220 | pr_warning(DRV_NAME ": Warning: %s: speed " |
2216 | "changed for uninitialized port on %s\n", | 2221 | "changed for uninitialized port on %s\n", |
2217 | slave->dev->master->name, slave->dev->name); | 2222 | slave->dev->master->name, slave->dev->name); |
2218 | return; | 2223 | return; |
2219 | } | 2224 | } |
2220 | 2225 | ||
@@ -2240,9 +2245,9 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave) | |||
2240 | 2245 | ||
2241 | // if slave is null, the whole port is not initialized | 2246 | // if slave is null, the whole port is not initialized |
2242 | if (!port->slave) { | 2247 | if (!port->slave) { |
2243 | printk(KERN_WARNING DRV_NAME ": %s: Warning: duplex changed " | 2248 | pr_warning(DRV_NAME ": %s: Warning: duplex changed " |
2244 | "for uninitialized port on %s\n", | 2249 | "for uninitialized port on %s\n", |
2245 | slave->dev->master->name, slave->dev->name); | 2250 | slave->dev->master->name, slave->dev->name); |
2246 | return; | 2251 | return; |
2247 | } | 2252 | } |
2248 | 2253 | ||
@@ -2269,9 +2274,9 @@ void bond_3ad_handle_link_change(struct slave *slave, char link) | |||
2269 | 2274 | ||
2270 | // if slave is null, the whole port is not initialized | 2275 | // if slave is null, the whole port is not initialized |
2271 | if (!port->slave) { | 2276 | if (!port->slave) { |
2272 | printk(KERN_WARNING DRV_NAME ": Warning: %s: link status changed for " | 2277 | pr_warning(DRV_NAME ": Warning: %s: link status changed for " |
2273 | "uninitialized port on %s\n", | 2278 | "uninitialized port on %s\n", |
2274 | slave->dev->master->name, slave->dev->name); | 2279 | slave->dev->master->name, slave->dev->name); |
2275 | return; | 2280 | return; |
2276 | } | 2281 | } |
2277 | 2282 | ||
@@ -2375,8 +2380,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2375 | } | 2380 | } |
2376 | 2381 | ||
2377 | if (bond_3ad_get_active_agg_info(bond, &ad_info)) { | 2382 | if (bond_3ad_get_active_agg_info(bond, &ad_info)) { |
2378 | printk(KERN_DEBUG DRV_NAME ": %s: Error: " | 2383 | pr_debug(DRV_NAME ": %s: Error: " |
2379 | "bond_3ad_get_active_agg_info failed\n", dev->name); | 2384 | "bond_3ad_get_active_agg_info failed\n", dev->name); |
2380 | goto out; | 2385 | goto out; |
2381 | } | 2386 | } |
2382 | 2387 | ||
@@ -2385,9 +2390,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2385 | 2390 | ||
2386 | if (slaves_in_agg == 0) { | 2391 | if (slaves_in_agg == 0) { |
2387 | /*the aggregator is empty*/ | 2392 | /*the aggregator is empty*/ |
2388 | printk(KERN_DEBUG DRV_NAME ": %s: Error: active " | 2393 | pr_debug(DRV_NAME ": %s: Error: active aggregator is empty\n", |
2389 | "aggregator is empty\n", | 2394 | dev->name); |
2390 | dev->name); | ||
2391 | goto out; | 2395 | goto out; |
2392 | } | 2396 | } |
2393 | 2397 | ||
@@ -2405,7 +2409,7 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2405 | } | 2409 | } |
2406 | 2410 | ||
2407 | if (slave_agg_no >= 0) { | 2411 | if (slave_agg_no >= 0) { |
2408 | printk(KERN_ERR DRV_NAME ": %s: Error: Couldn't find a slave to tx on " | 2412 | pr_err(DRV_NAME ": %s: Error: Couldn't find a slave to tx on " |
2409 | "for aggregator ID %d\n", dev->name, agg_id); | 2413 | "for aggregator ID %d\n", dev->name, agg_id); |
2410 | goto out; | 2414 | goto out; |
2411 | } | 2415 | } |