All of lore.kernel.org
 help / color / mirror / Atom feed
From: Veaceslav Falico <vfalico@redhat.com>
To: Joe Perches <joe@perches.com>
Cc: netdev@vger.kernel.org, Jay Vosburgh <fubar@us.ibm.com>,
	Andy Gospodarek <andy@greyhouse.net>
Subject: Re: [PATCH net-next] bonding: net_ratelimit() pr_warn()s in 802.3ad mode
Date: Sun, 16 Mar 2014 18:02:36 +0100	[thread overview]
Message-ID: <20140316170236.GD30498@redhat.com> (raw)
In-Reply-To: <1394989163.5689.42.camel@joe-AO722>

On Sun, Mar 16, 2014 at 09:59:23AM -0700, Joe Perches wrote:
>On Sun, 2014-03-16 at 17:29 +0100, Veaceslav Falico wrote:
>> Only ratelimit the ones that might spam, omiting the ones from
>> enslave/deslave.
>
>No, this patch isn't good and must not be applied.
>You've also changed flow here.

Hrm, seems like geomagnetic storm that's going on outside buffed my
stupidity.

Sent v2 with pr_warn_ratelimit(), it changes nothing in the logic.

>
>> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
>[]
>> @@ -2080,7 +2081,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
>>
>>  		/* select the active aggregator for the bond */
>>  		if (port) {
>> -			if (!port->slave) {
>> +			if (!port->slave && net_ratelimit()) {
>>  				pr_warn("%s: Warning: bond's first port is uninitialized\n",
>>  					bond->dev->name);
>>  				goto re_arm;
>
>Now the goto is ratelimited too.
>
>> @@ -2095,7 +2096,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
>>  	/* for each port run the state machines */
>>  	bond_for_each_slave_rcu(bond, slave, iter) {
>>  		port = &(SLAVE_AD_INFO(slave).port);
>> -		if (!port->slave) {
>> +		if (!port->slave && net_ratelimit()) {
>>  			pr_warn("%s: Warning: Found an uninitialized port\n",
>>  				bond->dev->name);
>>  			goto re_arm;
>
>here too.
>
>> @@ -2157,7 +2158,7 @@ static int bond_3ad_rx_indication(struct lacpdu *lacpdu, struct slave *slave,
>>
>>  		port = &(SLAVE_AD_INFO(slave).port);
>>
>> -		if (!port->slave) {
>> +		if (!port->slave && net_ratelimit()) {
>>  			pr_warn("%s: Warning: port of slave %s is uninitialized\n",
>>  				slave->dev->name, slave->bond->dev->name);
>>  			return ret;
>
>And the return 3.
>

      reply	other threads:[~2014-03-16 17:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-16 16:29 [PATCH net-next] bonding: net_ratelimit() pr_warn()s in 802.3ad mode Veaceslav Falico
2014-03-16 16:45 ` Eric Dumazet
2014-03-16 16:50   ` Veaceslav Falico
2014-03-16 16:59 ` Joe Perches
2014-03-16 17:02   ` Veaceslav Falico [this message]

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=20140316170236.GD30498@redhat.com \
    --to=vfalico@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=fubar@us.ibm.com \
    --cc=joe@perches.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.