* Jarek Poplawski <[EMAIL PROTECTED]> 2007-03-28 13:19
> I hope I'm wrong, but isn't this at the cost of admins
> working with long rules' sets, which (probably) take extra
> time now?

That's right, it makes the insert and delete operation more
expensive.

A compromise would be to delay the flushing and wait for
some time (default 2 seconds) whether more rules or routes
are being added before flushing.

[NET] fib_rules: delay route cache flush by ip_rt_min_delay

Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>

Index: linux/net-2.6.22/net/decnet/dn_rules.c
===================================================================
--- linux.orig/net-2.6.22/net/decnet/dn_rules.c 2007-03-28 17:41:22.000000000 
+0200
+++ linux/net-2.6.22/net/decnet/dn_rules.c      2007-03-28 17:41:39.000000000 
+0200
@@ -242,7 +242,7 @@ static u32 dn_fib_rule_default_pref(void
 
 static void dn_fib_rule_flush_cache(void)
 {
-       dn_rt_cache_flush(0);
+       dn_rt_cache_flush(-1);
 }
 
 static struct fib_rules_ops dn_fib_rules_ops = {
Index: linux/net-2.6.22/net/ipv4/fib_rules.c
===================================================================
--- linux.orig/net-2.6.22/net/ipv4/fib_rules.c  2007-03-28 17:41:18.000000000 
+0200
+++ linux/net-2.6.22/net/ipv4/fib_rules.c       2007-03-28 17:41:30.000000000 
+0200
@@ -300,7 +300,7 @@ static size_t fib4_rule_nlmsg_payload(st
 
 static void fib4_rule_flush_cache(void)
 {
-       rt_cache_flush(0);
+       rt_cache_flush(-1);
 }
 
 static struct fib_rules_ops fib4_rules_ops = {
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to