summaryrefslogtreecommitdiffstats
path: root/sys/net/flowtable.c
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2009-08-19 20:13:09 +0000
committerkmacy <kmacy@FreeBSD.org>2009-08-19 20:13:09 +0000
commite10b9149e4caecb02a6b0821411dc75c3fb63a74 (patch)
treedcc6043f893ee5967850a3d399cac83b0fcd8aa4 /sys/net/flowtable.c
parente28a844d86892621957f43e17d998f2429a4d43b (diff)
downloadFreeBSD-src-e10b9149e4caecb02a6b0821411dc75c3fb63a74.zip
FreeBSD-src-e10b9149e4caecb02a6b0821411dc75c3fb63a74.tar.gz
This change fixes a comment and addresses a complaint by kib@ by
moving a frequently executed flowtable syslog statement from being conditional on bootverbose to conditional on a per-vnet flowtable sysctl. Approved by: re@
Diffstat (limited to 'sys/net/flowtable.c')
-rw-r--r--sys/net/flowtable.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index e974727..f6cd778 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -199,6 +199,7 @@ static uint32_t flowclean_cycles;
* - idetach() cleanup for options VIMAGE builds.
*/
VNET_DEFINE(int, flowtable_enable) = 1;
+static VNET_DEFINE(int, flowtable_debug);
static VNET_DEFINE(int, flowtable_hits);
static VNET_DEFINE(int, flowtable_lookups);
static VNET_DEFINE(int, flowtable_misses);
@@ -214,6 +215,7 @@ static VNET_DEFINE(int, flowtable_nmbflows) = 4096;
static VNET_DEFINE(int, flowtable_ready) = 0;
#define V_flowtable_enable VNET(flowtable_enable)
+#define V_flowtable_debug VNET(flowtable_debug)
#define V_flowtable_hits VNET(flowtable_hits)
#define V_flowtable_lookups VNET(flowtable_lookups)
#define V_flowtable_misses VNET(flowtable_misses)
@@ -229,6 +231,8 @@ static VNET_DEFINE(int, flowtable_ready) = 0;
#define V_flowtable_ready VNET(flowtable_ready)
SYSCTL_NODE(_net_inet, OID_AUTO, flowtable, CTLFLAG_RD, NULL, "flowtable");
+SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, debug, CTLFLAG_RW,
+ &VNET_NAME(flowtable_debug), 0, "print debug info.");
SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW,
&VNET_NAME(flowtable_enable), 0, "enable flowtable caching.");
SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, hits, CTLFLAG_RD,
@@ -902,7 +906,7 @@ flowtable_free_stale(struct flowtable *ft)
V_flowtable_frees++;
fle_free(fle);
}
- if (bootverbose && count)
+ if (V_flowtable_debug && count)
log(LOG_DEBUG, "freed %d flow entries\n", count);
}
@@ -954,7 +958,7 @@ flowtable_cleaner(void)
flowclean_cycles++;
/*
- * The 20 second interval between cleaning checks
+ * The 10 second interval between cleaning checks
* is arbitrary
*/
mtx_lock(&flowclean_lock);
OpenPOWER on IntegriCloud