diff options
| author | Sven Wegener <sven.wegener@stealer.net> | 2008-09-03 00:23:14 +0000 |
|---|---|---|
| committer | Sven Wegener <sven.wegener@stealer.net> | 2010-02-06 13:49:15 +0000 |
| commit | c1d9422a64e70d4e8d9b158d00d7458fb299801d (patch) | |
| tree | 2782550ec8c91a01ad321215434c1c6d8235c7ee /include | |
| parent | 7aeef972cce30b0ab04047e07918b04d867e7a29 (diff) | |
ipvs: Make number of locks protecting connection table configurableipvs/experimental
The size of the connection table can be increased up to 20 bits,
resulting in a table size of 1048576 entries. The number of locks is
fixed to 4 bits, resulting in only 16 locks. This doesn't scale well,
make the number of locks configurable too. Lowest value is 4 and the
upper bound is the size of the connection table.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/ip_vs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 8dc3296b7bea..eb425393f15a 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h @@ -603,6 +603,14 @@ extern void ip_vs_init_hash_table(struct list_head *table, int rows); #define IP_VS_CONN_TAB_SIZE (1 << IP_VS_CONN_TAB_BITS) #define IP_VS_CONN_TAB_MASK (IP_VS_CONN_TAB_SIZE - 1) +#ifndef CONFIG_IP_VS_LOCK_BITS +#define CONFIG_IP_VS_LOCK_BITS 4 +#endif + +#define IP_VS_CONN_LOCK_BITS CONFIG_IP_VS_LOCK_BITS +#define IP_VS_CONN_LOCK_SIZE (1 << IP_VS_CONN_LOCK_BITS) +#define IP_VS_CONN_LOCK_MASK (IP_VS_CONN_LOCK_SIZE - 1) + enum { IP_VS_DIR_INPUT = 0, IP_VS_DIR_OUTPUT, |
