]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
bonding: ratelimit pr_err() for bond xmit broadcast
authordingtianhong <dingtianhong@huawei.com>
Tue, 25 Mar 2014 09:00:10 +0000 (17:00 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Mar 2014 20:40:24 +0000 (16:40 -0400)
It may spam if the system is out of the memory, add ratelimit for it.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c

index ee17c246326e5c68d59dee64a319b67d124a4008..cbadd6dccb2baac00c3cd39b278624d04a5660ec 100644 (file)
@@ -3656,8 +3656,8 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev)
                        struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
 
                        if (!skb2) {
-                               pr_err("%s: Error: bond_xmit_broadcast(): skb_clone() failed\n",
-                                      bond_dev->name);
+                               net_err_ratelimited("%s: Error: %s: skb_clone() failed\n",
+                                                   bond_dev->name, __func__);
                                continue;
                        }
                        /* bond_dev_queue_xmit always returns 0 */