Subject: Re: [PATCH net-next] bonding: net_ratelimit() pr_warn()s in 802.3ad mode

From: Veaceslav Falico <[email-masked]>
Date: Sun, 16 Mar 2014 17:50:34 +0100

On Sun, Mar 16, 2014 at 09:45:15AM -0700, Eric Dumazet wrote:
>On Sun, 2014-03-16 at 17:29 +0100, Veaceslav Falico wrote:
>
>> @@ -1559,7 +1560,7 @@ static void ad_agg_selection_logic(struct aggregator *agg)
>>  		}
>>
>>  		/* check if any partner replys */
>> -		if (best->is_individual) {
>> +		if (best->is_individual && net_ratelimit()) {
>
>This looks odd, to mix conditions that are not of the same domain.

It indeed looks odd and kinda hard to read.

>
>Have you considered using pr_warn_ratelimited() ?

Nice, didn't know (or forgot...) about that function.

Thanks, will use it and re-send.

>
>>  			pr_warn("%s: Warning: No 802.3ad response from the link partner for any adapters in the bond\n",
>>  				best->slave ?
>>  				best->slave->bond->dev->name : "NULL");
>> @@ -2080,7 +2081,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)
>
>
>
>