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 v2 3/3] bonding: convert pr_xxx() to pr_xxx_ratelimited() for arp interval
Date: Tue, 18 Mar 2014 04:14:22 -0700 [thread overview]
Message-ID: <1395141262.2812.22.camel@joe-AO722> (raw)
In-Reply-To: <1395140499.2812.19.camel@joe-AO722>
On Tue, 2014-03-18 at 04:01 -0700, Joe Perches wrote:
> On Tue, 2014-03-18 at 18:43 +0800, Ding Tianhong wrote:
> > The debug log in the arp interval should be rate limited, otherwise would
> > occur spam the log, so convert them.
[]
> Another way to do this is to use the
> more global net_ratelimit() before
> each existing pr_<level>.
>
> Not suggesting one or the other is
> right or wrong here, it's just an option.
Another option is to use the net_<level>_ratelimited
functions, but I'm not sure these are used much
outside of net/.
> > diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>
> > @@ -2131,32 +2131,33 @@ static void bond_arp_send(struct net_device *slave_dev, int arp_op,
> > {
> > struct sk_buff *skb;
> >
> > - pr_debug("arp %d on slave %s: dst %pI4 src %pI4\n",
> > - arp_op, slave_dev->name, &dest_ip, &src_ip);
> > + pr_debug_ratelimited("arp %d on slave %s: dst %pI4 src %pI4\n",
> > + arp_op, slave_dev->name, &dest_ip, &src_ip);
>
> if (net_ratelimit())
> pr_debug(etc...)
or
net_dbg_ratelimited(etc...)
next prev parent reply other threads:[~2014-03-18 11:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 10:43 [PATCH net-next v2 0/3] bonding: support QinQ for bond arp interval Ding Tianhong
2014-03-18 10:43 ` [PATCH net-next v2 1/3] vlan: make a new function vlan_dev_vlan_proto() and export Ding Tianhong
2014-03-18 10:43 ` [PATCH net-next v2 2/3] bonding: support QinQ for bond arp interval Ding Tianhong
2014-03-18 12:05 ` Veaceslav Falico
2014-03-18 17:59 ` Jay Vosburgh
2014-03-18 19:27 ` Veaceslav Falico
2014-03-19 1:29 ` Ding Tianhong
2014-03-19 5:39 ` Veaceslav Falico
2014-03-19 11:16 ` Ding Tianhong
2014-03-18 10:43 ` [PATCH net-next v2 3/3] bonding: convert pr_xxx() to pr_xxx_ratelimited() for " Ding Tianhong
2014-03-18 11:01 ` Joe Perches
2014-03-18 11:14 ` Joe Perches [this message]
2014-03-18 11:28 ` 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=1395141262.2812.22.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