diff options
| author | Veaceslav Falico <vfalico@redhat.com> | 2014-03-16 12:55:03 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-03-18 14:50:48 -0400 |
| commit | 86a2b9cfccea1fb1fcb16a549ccddfe40be391d1 (patch) | |
| tree | 527fcb4c4d2f00a669fa88f811b8c911368d8ef0 /drivers/net | |
| parent | d37d8ac17d38d389375060416ceedd5b19d5255c (diff) | |
bonding: ratelimit pr_warn()s in 802.3ad mode
Only ratelimit the ones that might spam, omiting the ones from
enslave/deslave.
CC: Jay Vosburgh <fubar@us.ibm.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/bonding/bond_3ad.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index dee2a84a2929..b667a51ed215 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c | |||
| @@ -1284,11 +1284,11 @@ static void ad_port_selection_logic(struct port *port) | |||
| 1284 | /* meaning: the port was related to an aggregator | 1284 | /* meaning: the port was related to an aggregator |
| 1285 | * but was not on the aggregator port list | 1285 | * but was not on the aggregator port list |
| 1286 | */ | 1286 | */ |
| 1287 | pr_warn("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n", | 1287 | pr_warn_ratelimited("%s: Warning: Port %d (on %s) was related to aggregator %d but was not on its port list\n", |
| 1288 | port->slave->bond->dev->name, | 1288 | port->slave->bond->dev->name, |
| 1289 | port->actor_port_number, | 1289 | port->actor_port_number, |
| 1290 | port->slave->dev->name, | 1290 | port->slave->dev->name, |
| 1291 | port->aggregator->aggregator_identifier); | 1291 | port->aggregator->aggregator_identifier); |
| 1292 | } | 1292 | } |
| 1293 | } | 1293 | } |
| 1294 | /* search on all aggregators for a suitable aggregator for this port */ | 1294 | /* search on all aggregators for a suitable aggregator for this port */ |
| @@ -1445,9 +1445,9 @@ static struct aggregator *ad_agg_selection_test(struct aggregator *best, | |||
| 1445 | break; | 1445 | break; |
| 1446 | 1446 | ||
| 1447 | default: | 1447 | default: |
| 1448 | pr_warn("%s: Impossible agg select mode %d\n", | 1448 | pr_warn_ratelimited("%s: Impossible agg select mode %d\n", |
| 1449 | curr->slave->bond->dev->name, | 1449 | curr->slave->bond->dev->name, |
| 1450 | __get_agg_selection_mode(curr->lag_ports)); | 1450 | __get_agg_selection_mode(curr->lag_ports)); |
| 1451 | break; | 1451 | break; |
| 1452 | } | 1452 | } |
| 1453 | 1453 | ||
| @@ -1560,9 +1560,9 @@ static void ad_agg_selection_logic(struct aggregator *agg) | |||
| 1560 | 1560 | ||
| 1561 | /* check if any partner replys */ | 1561 | /* check if any partner replys */ |
| 1562 | if (best->is_individual) { | 1562 | if (best->is_individual) { |
| 1563 | pr_warn("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n", | 1563 | pr_warn_ratelimited("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n", |
| 1564 | best->slave ? | 1564 | best->slave ? |
| 1565 | best->slave->bond->dev->name : "NULL"); | 1565 | best->slave->bond->dev->name : "NULL"); |
| 1566 | } | 1566 | } |
| 1567 | 1567 | ||
| 1568 | best->is_active = 1; | 1568 | best->is_active = 1; |
| @@ -2081,8 +2081,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work) | |||
| 2081 | /* select the active aggregator for the bond */ | 2081 | /* select the active aggregator for the bond */ |
| 2082 | if (port) { | 2082 | if (port) { |
| 2083 | if (!port->slave) { | 2083 | if (!port->slave) { |
| 2084 | pr_warn("%s: Warning: bond's first port is uninitialized\n", | 2084 | pr_warn_ratelimited("%s: Warning: bond's first port is uninitialized\n", |
| 2085 | bond->dev->name); | 2085 | bond->dev->name); |
| 2086 | goto re_arm; | 2086 | goto re_arm; |
| 2087 | } | 2087 | } |
| 2088 | 2088 | ||
| @@ -2096,8 +2096,8 @@ void bond_3ad_state_machine_handler(struct work_struct *work) | |||
| 2096 | bond_for_each_slave_rcu(bond, slave, iter) { | 2096 | bond_for_each_slave_rcu(bond, slave, iter) { |
| 2097 | port = &(SLAVE_AD_INFO(slave).port); | 2097 | port = &(SLAVE_AD_INFO(slave).port); |
| 2098 | if (!port->slave) { | 2098 | if (!port->slave) { |
| 2099 | pr_warn("%s: Warning: Found an uninitialized port\n", | 2099 | pr_warn_ratelimited("%s: Warning: Found an uninitialized port\n", |
| 2100 | bond->dev->name); | 2100 | bond->dev->name); |
| 2101 | goto re_arm; | 2101 | goto re_arm; |
| 2102 | } | 2102 | } |
| 2103 | 2103 | ||
| @@ -2158,8 +2158,8 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave, | |||
| 2158 | port = &(SLAVE_AD_INFO(slave).port); | 2158 | port = &(SLAVE_AD_INFO(slave).port); |
| 2159 | 2159 | ||
| 2160 | if (!port->slave) { | 2160 | if (!port->slave) { |
| 2161 | pr_warn("%s: Warning: port of slave %s is uninitialized\n", | 2161 | pr_warn_ratelimited("%s: Warning: port of slave %s is uninitialized\n", |
| 2162 | slave->dev->name, slave->bond->dev->name); | 2162 | slave->dev->name, slave->bond->dev->name); |
| 2163 | return ret; | 2163 | return ret; |
| 2164 | } | 2164 | } |
| 2165 | 2165 | ||
