diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2005-11-09 13:34:57 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2005-11-13 14:48:18 -0500 |
commit | 4e0952c74ee450ded86e8946ce58ea8dfd05b007 (patch) | |
tree | 07e10c7adaf8f95d11d5e2181e2adce30c47d3ba /drivers/net/bonding/bond_3ad.c | |
parent | c2373ee98982a1c842dfb213c398f388d4227e63 (diff) |
[PATCH] bonding: add bond name to all error messages
Add the bond name to all error messages so we can tell which one is
complaining. Also reformats some error messages to be more consistent.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/bonding/bond_3ad.c')
-rw-r--r-- | drivers/net/bonding/bond_3ad.c | 74 |
1 files changed, 47 insertions, 27 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index d2f34d5a8083..04705233ca0b 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
@@ -1198,10 +1198,10 @@ static void ad_rx_machine(struct lacpdu *lacpdu, struct port *port) | |||
1198 | // detect loopback situation | 1198 | // detect loopback situation |
1199 | if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) { | 1199 | if (!MAC_ADDRESS_COMPARE(&(lacpdu->actor_system), &(port->actor_system))) { |
1200 | // INFO_RECEIVED_LOOPBACK_FRAMES | 1200 | // INFO_RECEIVED_LOOPBACK_FRAMES |
1201 | printk(KERN_ERR DRV_NAME ": An illegal loopback occurred on adapter (%s)\n", | 1201 | printk(KERN_ERR DRV_NAME ": %s: An illegal loopback occurred on " |
1202 | port->slave->dev->name); | 1202 | "adapter (%s). Check the configuration to verify that all " |
1203 | printk(KERN_ERR "Check the configuration to verify that all Adapters " | 1203 | "Adapters are connected to 802.3ad compliant switch ports\n", |
1204 | "are connected to 802.3ad compliant switch ports\n"); | 1204 | port->slave->dev->master->name, port->slave->dev->name); |
1205 | __release_rx_machine_lock(port); | 1205 | __release_rx_machine_lock(port); |
1206 | return; | 1206 | return; |
1207 | } | 1207 | } |
@@ -1378,8 +1378,9 @@ static void ad_port_selection_logic(struct port *port) | |||
1378 | } | 1378 | } |
1379 | } | 1379 | } |
1380 | if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list | 1380 | if (!curr_port) { // meaning: the port was related to an aggregator but was not on the aggregator port list |
1381 | printk(KERN_WARNING DRV_NAME ": Warning: Port %d (on %s) was " | 1381 | printk(KERN_WARNING DRV_NAME ": %s: Warning: Port %d (on %s) was " |
1382 | "related to aggregator %d but was not on its port list\n", | 1382 | "related to aggregator %d but was not on its port list\n", |
1383 | port->slave->dev->master->name, | ||
1383 | port->actor_port_number, port->slave->dev->name, | 1384 | port->actor_port_number, port->slave->dev->name, |
1384 | port->aggregator->aggregator_identifier); | 1385 | port->aggregator->aggregator_identifier); |
1385 | } | 1386 | } |
@@ -1450,7 +1451,8 @@ static void ad_port_selection_logic(struct port *port) | |||
1450 | 1451 | ||
1451 | dprintk("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); | 1452 | dprintk("Port %d joined LAG %d(new LAG)\n", port->actor_port_number, port->aggregator->aggregator_identifier); |
1452 | } else { | 1453 | } else { |
1453 | printk(KERN_ERR DRV_NAME ": Port %d (on %s) did not find a suitable aggregator\n", | 1454 | printk(KERN_ERR DRV_NAME ": %s: Port %d (on %s) did not find a suitable aggregator\n", |
1455 | port->slave->dev->master->name, | ||
1454 | port->actor_port_number, port->slave->dev->name); | 1456 | port->actor_port_number, port->slave->dev->name); |
1455 | } | 1457 | } |
1456 | } | 1458 | } |
@@ -1582,8 +1584,9 @@ static void ad_agg_selection_logic(struct aggregator *aggregator) | |||
1582 | 1584 | ||
1583 | // check if any partner replys | 1585 | // check if any partner replys |
1584 | if (best_aggregator->is_individual) { | 1586 | if (best_aggregator->is_individual) { |
1585 | printk(KERN_WARNING DRV_NAME ": Warning: No 802.3ad response from the link partner " | 1587 | printk(KERN_WARNING DRV_NAME ": %s: Warning: No 802.3ad response from " |
1586 | "for any adapters in the bond\n"); | 1588 | "the link partner for any adapters in the bond\n", |
1589 | best_aggregator->slave->dev->master->name); | ||
1587 | } | 1590 | } |
1588 | 1591 | ||
1589 | // check if there are more than one aggregator | 1592 | // check if there are more than one aggregator |
@@ -1915,7 +1918,8 @@ int bond_3ad_bind_slave(struct slave *slave) | |||
1915 | struct aggregator *aggregator; | 1918 | struct aggregator *aggregator; |
1916 | 1919 | ||
1917 | if (bond == NULL) { | 1920 | if (bond == NULL) { |
1918 | printk(KERN_ERR "The slave %s is not attached to its bond\n", slave->dev->name); | 1921 | printk(KERN_ERR DRV_NAME ": %s: The slave %s is not attached to its bond\n", |
1922 | slave->dev->master->name, slave->dev->name); | ||
1919 | return -1; | 1923 | return -1; |
1920 | } | 1924 | } |
1921 | 1925 | ||
@@ -1990,7 +1994,9 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
1990 | 1994 | ||
1991 | // if slave is null, the whole port is not initialized | 1995 | // if slave is null, the whole port is not initialized |
1992 | if (!port->slave) { | 1996 | if (!port->slave) { |
1993 | printk(KERN_WARNING DRV_NAME ": Trying to unbind an uninitialized port on %s\n", slave->dev->name); | 1997 | printk(KERN_WARNING DRV_NAME ": Warning: %s: Trying to " |
1998 | "unbind an uninitialized port on %s\n", | ||
1999 | slave->dev->master->name, slave->dev->name); | ||
1994 | return; | 2000 | return; |
1995 | } | 2001 | } |
1996 | 2002 | ||
@@ -2021,7 +2027,8 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2021 | dprintk("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); | 2027 | dprintk("Some port(s) related to LAG %d - replaceing with LAG %d\n", aggregator->aggregator_identifier, new_aggregator->aggregator_identifier); |
2022 | 2028 | ||
2023 | if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { | 2029 | if ((new_aggregator->lag_ports == port) && new_aggregator->is_active) { |
2024 | printk(KERN_INFO DRV_NAME ": Removing an active aggregator\n"); | 2030 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", |
2031 | aggregator->slave->dev->master->name); | ||
2025 | // select new active aggregator | 2032 | // select new active aggregator |
2026 | select_new_active_agg = 1; | 2033 | select_new_active_agg = 1; |
2027 | } | 2034 | } |
@@ -2051,15 +2058,17 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2051 | ad_agg_selection_logic(__get_first_agg(port)); | 2058 | ad_agg_selection_logic(__get_first_agg(port)); |
2052 | } | 2059 | } |
2053 | } else { | 2060 | } else { |
2054 | printk(KERN_WARNING DRV_NAME ": Warning: unbinding aggregator, " | 2061 | printk(KERN_WARNING DRV_NAME ": %s: Warning: unbinding aggregator, " |
2055 | "and could not find a new aggregator for its ports\n"); | 2062 | "and could not find a new aggregator for its ports\n", |
2063 | slave->dev->master->name); | ||
2056 | } | 2064 | } |
2057 | } else { // in case that the only port related to this aggregator is the one we want to remove | 2065 | } else { // in case that the only port related to this aggregator is the one we want to remove |
2058 | select_new_active_agg = aggregator->is_active; | 2066 | select_new_active_agg = aggregator->is_active; |
2059 | // clear the aggregator | 2067 | // clear the aggregator |
2060 | ad_clear_agg(aggregator); | 2068 | ad_clear_agg(aggregator); |
2061 | if (select_new_active_agg) { | 2069 | if (select_new_active_agg) { |
2062 | printk(KERN_INFO "Removing an active aggregator\n"); | 2070 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", |
2071 | slave->dev->master->name); | ||
2063 | // select new active aggregator | 2072 | // select new active aggregator |
2064 | ad_agg_selection_logic(__get_first_agg(port)); | 2073 | ad_agg_selection_logic(__get_first_agg(port)); |
2065 | } | 2074 | } |
@@ -2085,7 +2094,8 @@ void bond_3ad_unbind_slave(struct slave *slave) | |||
2085 | // clear the aggregator | 2094 | // clear the aggregator |
2086 | ad_clear_agg(temp_aggregator); | 2095 | ad_clear_agg(temp_aggregator); |
2087 | if (select_new_active_agg) { | 2096 | if (select_new_active_agg) { |
2088 | printk(KERN_INFO "Removing an active aggregator\n"); | 2097 | printk(KERN_INFO DRV_NAME ": %s: Removing an active aggregator\n", |
2098 | slave->dev->master->name); | ||
2089 | // select new active aggregator | 2099 | // select new active aggregator |
2090 | ad_agg_selection_logic(__get_first_agg(port)); | 2100 | ad_agg_selection_logic(__get_first_agg(port)); |
2091 | } | 2101 | } |
@@ -2131,7 +2141,8 @@ void bond_3ad_state_machine_handler(struct bonding *bond) | |||
2131 | // select the active aggregator for the bond | 2141 | // select the active aggregator for the bond |
2132 | if ((port = __get_first_port(bond))) { | 2142 | if ((port = __get_first_port(bond))) { |
2133 | if (!port->slave) { | 2143 | if (!port->slave) { |
2134 | printk(KERN_WARNING DRV_NAME ": Warning: bond's first port is uninitialized\n"); | 2144 | printk(KERN_WARNING DRV_NAME ": %s: Warning: bond's first port is " |
2145 | "uninitialized\n", bond->dev->name); | ||
2135 | goto re_arm; | 2146 | goto re_arm; |
2136 | } | 2147 | } |
2137 | 2148 | ||
@@ -2143,7 +2154,8 @@ void bond_3ad_state_machine_handler(struct bonding *bond) | |||
2143 | // for each port run the state machines | 2154 | // for each port run the state machines |
2144 | for (port = __get_first_port(bond); port; port = __get_next_port(port)) { | 2155 | for (port = __get_first_port(bond); port; port = __get_next_port(port)) { |
2145 | if (!port->slave) { | 2156 | if (!port->slave) { |
2146 | printk(KERN_WARNING DRV_NAME ": Warning: Found an uninitialized port\n"); | 2157 | printk(KERN_WARNING DRV_NAME ": %s: Warning: Found an uninitialized " |
2158 | "port\n", bond->dev->name); | ||
2147 | goto re_arm; | 2159 | goto re_arm; |
2148 | } | 2160 | } |
2149 | 2161 | ||
@@ -2184,7 +2196,8 @@ static void bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, u | |||
2184 | port = &(SLAVE_AD_INFO(slave).port); | 2196 | port = &(SLAVE_AD_INFO(slave).port); |
2185 | 2197 | ||
2186 | if (!port->slave) { | 2198 | if (!port->slave) { |
2187 | printk(KERN_WARNING DRV_NAME ": Warning: port of slave %s is uninitialized\n", slave->dev->name); | 2199 | printk(KERN_WARNING DRV_NAME ": %s: Warning: port of slave %s is " |
2200 | "uninitialized\n", slave->dev->name, slave->dev->master->name); | ||
2188 | return; | 2201 | return; |
2189 | } | 2202 | } |
2190 | 2203 | ||
@@ -2230,8 +2243,9 @@ void bond_3ad_adapter_speed_changed(struct slave *slave) | |||
2230 | 2243 | ||
2231 | // if slave is null, the whole port is not initialized | 2244 | // if slave is null, the whole port is not initialized |
2232 | if (!port->slave) { | 2245 | if (!port->slave) { |
2233 | printk(KERN_WARNING DRV_NAME ": Warning: speed changed for uninitialized port on %s\n", | 2246 | printk(KERN_WARNING DRV_NAME ": Warning: %s: speed " |
2234 | slave->dev->name); | 2247 | "changed for uninitialized port on %s\n", |
2248 | slave->dev->master->name, slave->dev->name); | ||
2235 | return; | 2249 | return; |
2236 | } | 2250 | } |
2237 | 2251 | ||
@@ -2257,8 +2271,9 @@ void bond_3ad_adapter_duplex_changed(struct slave *slave) | |||
2257 | 2271 | ||
2258 | // if slave is null, the whole port is not initialized | 2272 | // if slave is null, the whole port is not initialized |
2259 | if (!port->slave) { | 2273 | if (!port->slave) { |
2260 | printk(KERN_WARNING DRV_NAME ": Warning: duplex changed for uninitialized port on %s\n", | 2274 | printk(KERN_WARNING DRV_NAME ": %s: Warning: duplex changed " |
2261 | slave->dev->name); | 2275 | "for uninitialized port on %s\n", |
2276 | slave->dev->master->name, slave->dev->name); | ||
2262 | return; | 2277 | return; |
2263 | } | 2278 | } |
2264 | 2279 | ||
@@ -2285,8 +2300,9 @@ void bond_3ad_handle_link_change(struct slave *slave, char link) | |||
2285 | 2300 | ||
2286 | // if slave is null, the whole port is not initialized | 2301 | // if slave is null, the whole port is not initialized |
2287 | if (!port->slave) { | 2302 | if (!port->slave) { |
2288 | printk(KERN_WARNING DRV_NAME ": Warning: link status changed for uninitialized port on %s\n", | 2303 | printk(KERN_WARNING DRV_NAME ": Warning: %s: link status changed for " |
2289 | slave->dev->name); | 2304 | "uninitialized port on %s\n", |
2305 | slave->dev->master->name, slave->dev->name); | ||
2290 | return; | 2306 | return; |
2291 | } | 2307 | } |
2292 | 2308 | ||
@@ -2363,7 +2379,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2363 | } | 2379 | } |
2364 | 2380 | ||
2365 | if (bond_3ad_get_active_agg_info(bond, &ad_info)) { | 2381 | if (bond_3ad_get_active_agg_info(bond, &ad_info)) { |
2366 | printk(KERN_DEBUG "ERROR: bond_3ad_get_active_agg_info failed\n"); | 2382 | printk(KERN_DEBUG DRV_NAME ": %s: Error: " |
2383 | "bond_3ad_get_active_agg_info failed\n", dev->name); | ||
2367 | goto out; | 2384 | goto out; |
2368 | } | 2385 | } |
2369 | 2386 | ||
@@ -2372,7 +2389,9 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2372 | 2389 | ||
2373 | if (slaves_in_agg == 0) { | 2390 | if (slaves_in_agg == 0) { |
2374 | /*the aggregator is empty*/ | 2391 | /*the aggregator is empty*/ |
2375 | printk(KERN_DEBUG "ERROR: active aggregator is empty\n"); | 2392 | printk(KERN_DEBUG DRV_NAME ": %s: Error: active " |
2393 | "aggregator is empty\n", | ||
2394 | dev->name); | ||
2376 | goto out; | 2395 | goto out; |
2377 | } | 2396 | } |
2378 | 2397 | ||
@@ -2390,7 +2409,8 @@ int bond_3ad_xmit_xor(struct sk_buff *skb, struct net_device *dev) | |||
2390 | } | 2409 | } |
2391 | 2410 | ||
2392 | if (slave_agg_no >= 0) { | 2411 | if (slave_agg_no >= 0) { |
2393 | printk(KERN_ERR DRV_NAME ": Error: Couldn't find a slave to tx on for aggregator ID %d\n", agg_id); | 2412 | printk(KERN_ERR DRV_NAME ": %s: Error: Couldn't find a slave to tx on " |
2413 | "for aggregator ID %d\n", dev->name, agg_id); | ||
2394 | goto out; | 2414 | goto out; |
2395 | } | 2415 | } |
2396 | 2416 | ||