aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/ip_vs.h10
-rw-r--r--net/ipv4/ipvs/Kconfig3
2 files changed, 3 insertions, 10 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 1b13cef4b547..38f4f690b186 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -621,16 +621,8 @@ extern void ip_vs_init_hash_table(struct list_head *table, int rows);
621#ifndef CONFIG_IP_VS_TAB_BITS 621#ifndef CONFIG_IP_VS_TAB_BITS
622#define CONFIG_IP_VS_TAB_BITS 12 622#define CONFIG_IP_VS_TAB_BITS 12
623#endif 623#endif
624/* make sure that IP_VS_CONN_TAB_BITS is located in [8, 20] */ 624
625#if CONFIG_IP_VS_TAB_BITS < 8
626#define IP_VS_CONN_TAB_BITS 8
627#endif
628#if CONFIG_IP_VS_TAB_BITS > 20
629#define IP_VS_CONN_TAB_BITS 20
630#endif
631#if 8 <= CONFIG_IP_VS_TAB_BITS && CONFIG_IP_VS_TAB_BITS <= 20
632#define IP_VS_CONN_TAB_BITS CONFIG_IP_VS_TAB_BITS 625#define IP_VS_CONN_TAB_BITS CONFIG_IP_VS_TAB_BITS
633#endif
634#define IP_VS_CONN_TAB_SIZE (1 << IP_VS_CONN_TAB_BITS) 626#define IP_VS_CONN_TAB_SIZE (1 << IP_VS_CONN_TAB_BITS)
635#define IP_VS_CONN_TAB_MASK (IP_VS_CONN_TAB_SIZE - 1) 627#define IP_VS_CONN_TAB_MASK (IP_VS_CONN_TAB_SIZE - 1)
636 628
diff --git a/net/ipv4/ipvs/Kconfig b/net/ipv4/ipvs/Kconfig
index 794cecb249af..de6004de80bc 100644
--- a/net/ipv4/ipvs/Kconfig
+++ b/net/ipv4/ipvs/Kconfig
@@ -41,7 +41,8 @@ config IP_VS_DEBUG
41 41
42config IP_VS_TAB_BITS 42config IP_VS_TAB_BITS
43 int "IPVS connection table size (the Nth power of 2)" 43 int "IPVS connection table size (the Nth power of 2)"
44 default "12" 44 range 8 20
45 default 12
45 ---help--- 46 ---help---
46 The IPVS connection hash table uses the chaining scheme to handle 47 The IPVS connection hash table uses the chaining scheme to handle
47 hash collisions. Using a big IPVS connection hash table will greatly 48 hash collisions. Using a big IPVS connection hash table will greatly