From: Veaceslav Falico <vfalico@redhat.com>
To: Ding Tianhong <dingtianhong@huawei.com>
Cc: fubar@us.ibm.com, andy@greyhouse.net, joe@perches.com,
kaber@trash.net, davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v3 3/3] bonding: add net_ratelimt to avoid spam in arp interval
Date: Tue, 25 Mar 2014 08:29:35 +0100 [thread overview]
Message-ID: <20140325072935.GA1476@redhat.com> (raw)
In-Reply-To: <1395717697-11876-4-git-send-email-dingtianhong@huawei.com>
On Tue, Mar 25, 2014 at 11:21:37AM +0800, Ding Tianhong wrote:
...snip...
>- pr_debug("arp %d on slave %s: dst %pI4 src %pI4\n",
>- arp_op, slave_dev->name, &dest_ip, &src_ip);
>+ net_dbg_ratelimited("arp %d on slave %s: dst %pI4 src %pI4\n",
>+ arp_op, slave_dev->name, &dest_ip, &src_ip);
I don't think we should ratelimit debug statements - as they're turned on
only when the user is actually debugging, so that all the debug statements
should be shown.
As an example here - I actually used it and grepped for a specific arp. If
it was ratelimited - I might have skipped it.
> if (outer->vlan_id) {
> if (inner->vlan_id) {
>- pr_debug("inner tag: proto %X vid %X\n",
>- ntohs(inner->vlan_proto), inner->vlan_id);
>+ net_dbg_ratelimited("inner tag: proto %X vid %X\n",
>+ ntohs(inner->vlan_proto),
>+ inner->vlan_id);
Same here.
>- pr_debug("outer reg: proto %X vid %X\n",
>- ntohs(outer->vlan_proto), outer->vlan_id);
>+ net_dbg_ratelimited("outer reg: proto %X vid %X\n",
>+ ntohs(outer->vlan_proto), outer->vlan_id);
And here.
>- 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_dbg_ratelimited("%s: no route to arp_ip_target %pI4 and arp_validate is set\n",
>+ bond->dev->name,
>+ &targets[i]);
You've changed an already ratelimited warning with a debug statement. This
warning is here for a reason.
>- pr_debug("%s: no path to arp_ip_target %pI4 via rt.dev %s\n",
>- bond->dev->name, &targets[i],
>- rt->dst.dev ? rt->dst.dev->name : "NULL");
>+ net_dbg_ratelimited("%s: no path to arp_ip_target %pI4 via rt.dev %s\n",
>+ bond->dev->name, &targets[i],
>+ rt->dst.dev ? rt->dst.dev->name : "NULL");
Again the dbg ratelimit.
next prev parent reply other threads:[~2014-03-25 20:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 3:21 [PATCH net-next v3 0/3] bonding: support QinQ for bond arp interval Ding Tianhong
2014-03-25 3:21 ` [PATCH net-next v3 1/3] vlan: make a new function vlan_dev_vlan_proto() and export Ding Tianhong
2014-03-25 3:21 ` [PATCH net-next v3 2/3] bonding: support QinQ for bond arp interval Ding Tianhong
2014-03-25 3:21 ` [PATCH net-next v3 3/3] bonding: add net_ratelimt to avoid spam in " Ding Tianhong
2014-03-25 7:29 ` Veaceslav Falico [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-03-20 8:15 [PATCH net-next v3 0/3] bonding: support QinQ for bond " Ding Tianhong
2014-03-20 8:15 ` [PATCH net-next v3 3/3] bonding: add net_ratelimt to avoid spam in " 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=20140325072935.GA1476@redhat.com \
--to=vfalico@redhat.com \
--cc=andy@greyhouse.net \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=fubar@us.ibm.com \
--cc=joe@perches.com \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).