summaryrefslogtreecommitdiffstats
path: root/include/haproxy/stick_table-t.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/haproxy/stick_table-t.h')
-rw-r--r--include/haproxy/stick_table-t.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/haproxy/stick_table-t.h b/include/haproxy/stick_table-t.h
index 749cb9a..4b98439 100644
--- a/include/haproxy/stick_table-t.h
+++ b/include/haproxy/stick_table-t.h
@@ -58,7 +58,8 @@ enum {
STKTABLE_DT_GPT, /* array of gpt */
STKTABLE_DT_GPC, /* array of gpc */
STKTABLE_DT_GPC_RATE, /* array of gpc_rate */
-
+ STKTABLE_DT_GLITCH_CNT, /* cumulated number of front glitches */
+ STKTABLE_DT_GLITCH_RATE, /* rate of front glitches */
STKTABLE_STATIC_DATA_TYPES,/* number of types above */
/* up to STKTABLE_EXTRA_DATA_TYPES types may be registered here, always
@@ -118,7 +119,7 @@ union stktable_data {
unsigned long long std_t_ull;
struct freq_ctr std_t_frqp;
struct dict_entry *std_t_dict;
-};
+} __attribute__((packed, aligned(sizeof(int))));
/* known data types */
struct stktable_data_type {
@@ -146,7 +147,8 @@ struct stksess {
unsigned int expire; /* session expiration date */
unsigned int ref_cnt; /* reference count, can only purge when zero */
__decl_thread(HA_RWLOCK_T lock); /* lock related to the table entry */
- int shard; /* shard */
+ int shard; /* shard number used by peers */
+ int seen; /* 0 only when no peer has seen this entry yet */
struct eb32_node exp; /* ebtree node used to hold the session in expiration tree */
struct eb32_node upd; /* ebtree node used to hold the update sequence tree */
struct ebmb_node key; /* ebtree node used to hold the session in table */
@@ -196,8 +198,12 @@ struct stktable {
THREAD_ALIGN(64);
- struct eb_root keys; /* head of sticky session tree */
- struct eb_root exps; /* head of sticky session expiration tree */
+ struct {
+ struct eb_root keys; /* head of sticky session tree */
+ struct eb_root exps; /* head of sticky session expiration tree */
+ __decl_thread(HA_RWLOCK_T sh_lock); /* for the trees above */
+ } shards[CONFIG_HAP_TBL_BUCKETS];
+
unsigned int refcnt; /* number of local peer over all peers sections
attached to this table */
unsigned int current; /* number of sticky sessions currently in table */