From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Siva Mannem <siva.mannem.lnx@gmail.com>, netdev@vger.kernel.org
Cc: davem@davemloft.net, sfeldma@gmail.com
Subject: Re: [PATCH net-next v4 2/3] newly configured FDB ageing time becomes effective immediately
Date: Tue, 17 Mar 2015 17:41:47 +0300 [thread overview]
Message-ID: <55083D2B.4050604@cogentembedded.com> (raw)
In-Reply-To: <80d2d6e6efcafd636712f8bf91c8f002d1d7692d.1426509272.git.siva.mannem.lnx@gmail.com>
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@gmail.com>
> Suggested-by: Scott Feldman <sfeldma@gmail.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
next prev parent reply other threads:[~2015-03-17 14:41 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 23:02 [PATCH net-next v4 0/3] bridge FDB ageing time Siva Mannem
2015-03-16 23:02 ` [PATCH net-next v4 1/3] Configure bridge FDB ageing time using netlink Siva Mannem
2015-03-16 23:02 ` [PATCH net-next v4 2/3] newly configured FDB ageing time becomes effective immediately Siva Mannem
2015-03-17 14:41 ` Sergei Shtylyov [this message]
2015-03-18 11:36 ` Siva Mannem
2015-03-16 23:02 ` [PATCH net-next v4 3/3] Validate all netlink attributes and return error if any of the validation fails Siva Mannem
2015-03-17 3:53 ` Scott Feldman
2015-03-17 4:24 ` David Miller
2015-03-17 4:59 ` Siva Mannem
2015-03-17 6:37 ` David Miller
2015-03-17 4:25 ` David Miller
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=55083D2B.4050604@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sfeldma@gmail.com \
--cc=siva.mannem.lnx@gmail.com \
/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.