Netdev List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: fubar@us.ibm.com, vfalico@redhat.com, andy@greyhouse.net,
	kaber@trash.net, davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] bonding: ratelimit pr_err() for bond xmit broadcast
Date: Tue, 25 Mar 2014 00:19:23 -0700	[thread overview]
Message-ID: <1395731963.3010.3.camel@joe-AO722> (raw)
In-Reply-To: <1395731037-4812-3-git-send-email-dingtianhong@huawei.com>

On Tue, 2014-03-25 at 15:03 +0800, Ding Tianhong wrote:
> It may spam if the system is out of the memory, add ratelimit for it.

Sorry, I didn't follow whatever discussion occurred here.

I thought you were going to use net_err_ratelimited
for these?

> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
[]
> @@ -3656,8 +3656,8 @@ static int bond_xmit_broadcast(struct sk_buff *skb, struct net_device *bond_dev)
> -				pr_err("%s: Error: bond_xmit_broadcast(): skb_clone() failed\n",
> -				       bond_dev->name);
> +				pr_err_ratelimited("%s: Error: bond_xmit_broadcast(): skb_clone() failed\n",
> +						   bond_dev->name);

also btw, it's better I think to use
%s, __func__ instead of embedding
explicit function names

  reply	other threads:[~2014-03-25  7:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-25  7:03 [PATCH net-next 0/3] slight optimization and avoid spam for bond fast path Ding Tianhong
2014-03-25  7:03 ` [PATCH net-next 1/3] bonding: slight optimization for bond xmit path Ding Tianhong
2014-03-25  7:03 ` [PATCH net-next 2/3] bonding: ratelimit pr_err() for bond xmit broadcast Ding Tianhong
2014-03-25  7:19   ` Joe Perches [this message]
2014-03-25  8:12     ` Ding Tianhong
2014-03-25  7:03 ` [PATCH net-next 3/3] bonding: add ratelimit for bond_arp_rcv() Ding Tianhong
2014-03-25  7:34   ` Veaceslav Falico
2014-03-25  8:17     ` Ding Tianhong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1395731963.3010.3.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=dingtianhong@huawei.com \
    --cc=fubar@us.ibm.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=vfalico@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox