summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2010-03-12 19:58:51 +0000
committerkmacy <kmacy@FreeBSD.org>2010-03-12 19:58:51 +0000
commita5e01102277b659f140548285e631c9572b8827e (patch)
tree9e0ad67fbf5520d644d0558e2c7c2de6c47e7286 /sys/net
parentde23516bf182128a4be6aa08dd63aa885d94e35b (diff)
downloadFreeBSD-src-a5e01102277b659f140548285e631c9572b8827e.zip
FreeBSD-src-a5e01102277b659f140548285e631c9572b8827e.tar.gz
flowtable_get_hashkey is only used by a DDB function - move under #ifdef DDB
pointed out by jkim@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/flowtable.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index a71495b..fe79c80 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -905,20 +905,6 @@ flowtable_set_hashkey(struct flentry *fle, uint32_t *key)
hashkey[i] = key[i];
}
-
-static uint32_t *
-flowtable_get_hashkey(struct flentry *fle)
-{
- uint32_t *hashkey;
-
- if (fle->f_flags & FL_IPV6)
- hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
- else
- hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
-
- return (hashkey);
-}
-
static int
flowtable_insert(struct flowtable *ft, uint32_t hash, uint32_t *key,
uint32_t fibnum, struct route *ro, uint16_t flags)
@@ -1601,6 +1587,19 @@ VNET_SYSUNINIT(flowtable_uninit, SI_SUB_KTHREAD_INIT, SI_ORDER_ANY,
#endif
#ifdef DDB
+static uint32_t *
+flowtable_get_hashkey(struct flentry *fle)
+{
+ uint32_t *hashkey;
+
+ if (fle->f_flags & FL_IPV6)
+ hashkey = ((struct flentry_v4 *)fle)->fl_flow.ipf_key;
+ else
+ hashkey = ((struct flentry_v6 *)fle)->fl_flow.ipf_key;
+
+ return (hashkey);
+}
+
static bitstr_t *
flowtable_mask_pcpu(struct flowtable *ft, int cpuid)
{
OpenPOWER on IntegriCloud