[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+CtxLQEt+tXk-jMxtBr3=-Y3pzZ+gLcUqgaxovtFH2QCTRu4A@mail.gmail.com>
Date: Wed, 18 Mar 2015 17:06:05 +0530
From: Siva Mannem <siva.mannem.lnx@...il.com>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: Netdev <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
Scott Feldman <sfeldma@...il.com>
Subject: Re: [PATCH net-next v4 2/3] newly configured FDB ageing time becomes
effective immediately
On Tue, Mar 17, 2015 at 8:11 PM, Sergei Shtylyov
<sergei.shtylyov@...entembedded.com> wrote:
> Hello.
>
> On 3/17/2015 2:02 AM, Siva Mannem wrote:
>
>> This patch ensures that the newly configured FDB ageing time becomes
>> effective
>> immediately. It also makes the behavior consistent when the ageing_timer
>> is set
>> using any of the three existing mechanisms(sysfs, ioctl, netlink).
>
>
>> Signed-off-by: Siva Mannem <siva.mannem.lnx@...il.com>
>> Suggested-by: Scott Feldman <sfeldma@...il.com>
>> ---
>> net/bridge/br_device.c | 4 ++++
>> net/bridge/br_ioctl.c | 3 +--
>> net/bridge/br_sysfs_br.c | 8 +-------
>> 3 files changed, 6 insertions(+), 9 deletions(-)
>
>
>> diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
>> index 1a665aa..293a113 100644
>> --- a/net/bridge/br_device.c
>> +++ b/net/bridge/br_device.c
>> @@ -396,12 +396,16 @@ void br_dev_setup(struct net_device *dev)
>> int br_set_ageing_time(struct net_bridge *br, unsigned long val)
>> {
>> unsigned long t = clock_t_to_jiffies(val);
>> + unsigned long old_ageing_time;
>>
>> if (t < BR_MIN_AGEING_TIME || t > BR_MAX_AGEING_TIME)
>> return -ERANGE;
>>
>> spin_lock_bh(&br->lock);
>> + old_ageing_time = br->ageing_time;
>
>
> One space is enough after '='...
>
>> br->ageing_time = t;
>> + if (br->ageing_time < old_ageing_time)
>
>
> Isn't it enough to compare just 't' instead of 'br->ageing_time'?
>
>> + mod_timer(&br->gc_timer, jiffies);
>> spin_unlock_bh(&br->lock);
>> return 0;
>> }
>
> [...]
>
> WBR, Sergei
>
Yep. Will address them in next version.
Thanks.
--
Regards,
Siva Mannem.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists