summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authordingtianhong <dingtianhong@huawei.com>2014-03-25 17:44:44 +0800
committerDavid S. Miller <davem@davemloft.net>2014-03-26 16:41:28 -0400
commit4873ac3c8ed3b0285f18b81e501249c26284c2ca (patch)
treeea3955db51ca63b5f7117535aaee782cbb64382b /drivers/net/bonding/bond_main.c
parentfbd929f2dce460456807a51e18d623db3db9f077 (diff)
bonding: add net_ratelimt to avoid spam in arp interval
Remove the unnecessary log and add net_ratelimit to the others, in order to avoid spam the log. Cc: Joe Perches <joe@perches.com> Cc: Jay Vosburgh <fubar@us.ibm.com> Cc: Veaceslav Falico <vfalico@redhat.com> Cc: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7802c2ebdb0..5be34b72a04 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2138,16 +2138,17 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op,
NULL, slave_dev->dev_addr, NULL);
if (!skb) {
- pr_err("ARP packet allocation failed\n");
+ net_err_ratelimited("ARP packet allocation failed\n");
return;
}
if (outer->vlan_id) {
if (inner->vlan_id) {
pr_debug("inner tag: proto %X vid %X\n",
ntohs(inner->vlan_proto), inner->vlan_id);
- skb = __vlan_put_tag(skb, inner->vlan_proto, inner->vlan_id);
+ skb = __vlan_put_tag(skb, inner->vlan_proto,
+ inner->vlan_id);
if (!skb) {
- pr_err("failed to insert inner VLAN tag\n");
+ net_err_ratelimited("failed to insert inner VLAN tag\n");
return;
}
}
@@ -2156,7 +2157,7 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op,
ntohs(outer->vlan_proto), outer->vlan_id);
skb = vlan_put_tag(skb, outer->vlan_proto, outer->vlan_id);
if (!skb) {
- pr_err("failed to insert outer VLAN tag\n");
+ net_err_ratelimited("failed to insert outer VLAN tag\n");
return;
}
}
@@ -2187,9 +2188,10 @@ static void bond_arp_send_all(struct bonding *bond, struct slave *slave)
/* there's no route to target - try to send arp
* probe to generate any traffic (arp_validate=0)
*/
- if (bond->params.arp_validate && net_ratelimit())
- pr_warn("%s: no route to arp_ip_target %pI4 and arp_validate is set\n",
- bond->dev->name, &targets[i]);
+ if (bond->params.arp_validate)
+ net_warn_ratelimited("%s: no route to arp_ip_target %pI4 and arp_validate is set\n",
+ bond->dev->name,
+ &targets[i]);
bond_arp_send(slave->dev, ARPOP_REQUEST, targets[i], 0, &inner, &outer);
continue;
}