From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH 1/6] ipv6: use timer pending
Date: Mon, 21 Jul 2008 12:28:35 -0700 [thread overview]
Message-ID: <20080721192919.971385103@vyatta.com> (raw)
In-Reply-To: 20080721192834.221648982@vyatta.com
[-- Attachment #1: ipv6-timer.patch --]
[-- Type: text/plain, Size: 1178 bytes --]
This fixes the bridge reference count problem and cleanups ipv6 FIB timer management.
Don't use expires field, because it is not a proper way to test,
instead use timer_pending().
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
--- a/net/ipv6/ip6_fib.c 2008-07-21 11:25:23.000000000 -0700
+++ b/net/ipv6/ip6_fib.c 2008-07-21 11:42:30.000000000 -0700
@@ -661,17 +661,17 @@ static int fib6_add_rt2node(struct fib6_
static __inline__ void fib6_start_gc(struct net *net, struct rt6_info *rt)
{
- if (net->ipv6.ip6_fib_timer->expires == 0 &&
+ if (!timer_pending(net->ipv6.ip6_fib_timer) &&
(rt->rt6i_flags & (RTF_EXPIRES|RTF_CACHE)))
- mod_timer(net->ipv6.ip6_fib_timer, jiffies +
- net->ipv6.sysctl.ip6_rt_gc_interval);
+ mod_timer(net->ipv6.ip6_fib_timer,
+ jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
}
void fib6_force_start_gc(struct net *net)
{
- if (net->ipv6.ip6_fib_timer->expires == 0)
- mod_timer(net->ipv6.ip6_fib_timer, jiffies +
- net->ipv6.sysctl.ip6_rt_gc_interval);
+ if (!timer_pending(net->ipv6.ip6_fib_timer))
+ mod_timer(net->ipv6.ip6_fib_timer,
+ jiffies + net->ipv6.sysctl.ip6_rt_gc_interval);
}
/*
--
next prev parent reply other threads:[~2008-07-21 19:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-21 19:28 [PATCH 0/6] IPV6 related gc bug + cleanups Stephen Hemminger
2008-07-21 19:28 ` Stephen Hemminger [this message]
2008-07-21 20:21 ` [PATCH 1/6] ipv6: use timer pending David Miller
2008-07-21 23:16 ` Ben Greear
2008-07-22 19:04 ` Stephen Hemminger
2008-07-22 19:10 ` Ben Greear
2008-07-23 0:35 ` Ben Greear
2008-07-21 19:28 ` [PATCH 2/6] netns: dont alloc ipv6 fib timer list Stephen Hemminger
2008-07-21 20:26 ` David Miller
2008-07-21 20:30 ` Stephen Hemminger
2008-07-21 20:33 ` David Miller
2008-07-21 20:44 ` [PATCH 2/3] netns: timer allocation Stephen Hemminger
2008-07-21 20:47 ` David Miller
2008-07-21 21:07 ` Stephen Hemminger
2008-07-21 23:28 ` David Miller
2008-07-22 2:20 ` [PATCH 2/6] netns: dont alloc ipv6 fib timer list Daniel Lezcano
2008-07-21 19:28 ` [PATCH 3/6] ipv6: use round_jiffies Stephen Hemminger
2008-07-21 19:28 ` [PATCH 4/6] ipv6: use spin_trylock_bh Stephen Hemminger
2008-07-21 19:28 ` [PATCH 5/6] ipv6: use kcalloc Stephen Hemminger
2008-07-21 19:28 ` [PATCH 6/6] ipv6: icmp6_dst_gc return change Stephen Hemminger
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=20080721192919.971385103@vyatta.com \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--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.