[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55083D2B.4050604@cogentembedded.com>
Date: Tue, 17 Mar 2015 17:41:47 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Siva Mannem <siva.mannem.lnx@...il.com>, netdev@...r.kernel.org
CC: davem@...emloft.net, sfeldma@...il.com
Subject: Re: [PATCH net-next v4 2/3] newly configured FDB ageing time becomes
effective immediately
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
--
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