[MINOR] session-counters: use "track-sc{1,2}" instead of "track-{fe,be}-counters"
The assumption that there was a 1:1 relation between tracked counters and
the frontend/backend role was wrong. It is perfectly possible to track the
track-fe-counters from the backend and the track-be-counters from the
frontend. Thus, in order to reduce confusion, let's remove this useless
{fe,be} reference and simply use {1,2} instead. The keywords have also been
renamed in order to limit confusion. The ACL rule action now becomes
"track-sc{1,2}". The ACLs are now "sc{1,2}_*" instead of "trk{fe,be}_*".
That means that we can reasonably document "sc1" and "sc2" (sticky counters
1 and 2) as sort of patterns that are available during the whole session's
life and use them just like any other pattern.
diff --git a/include/types/proto_tcp.h b/include/types/proto_tcp.h
index bee52aa..0ee2ec7 100644
--- a/include/types/proto_tcp.h
+++ b/include/types/proto_tcp.h
@@ -32,8 +32,8 @@
enum {
TCP_ACT_ACCEPT = 1,
TCP_ACT_REJECT = 2,
- TCP_ACT_TRK_FE_CTR = 3,
- TCP_ACT_TRK_BE_CTR = 4,
+ TCP_ACT_TRK_SC1 = 3,
+ TCP_ACT_TRK_SC2 = 4,
};
struct tcp_rule {
diff --git a/include/types/session.h b/include/types/session.h
index 7b6cf4f..79a8373 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -184,10 +184,11 @@
int flags;
} store[8]; /* tracked stickiness values to store */
int store_count;
- struct stksess *fe_tracked_counters; /* counters currently being tracked by this session (frontend) */
- struct stktable *fe_tracked_table; /* table the counters above belong to (undefined if counters are null) */
- struct stksess *be_tracked_counters; /* counters currently being tracked by this session (backend) */
- struct stktable *be_tracked_table; /* table the counters above belong to (undefined if counters are null) */
+
+ struct stksess *stkctr1_entry; /* entry containing counters currently being tracked as set 1 by this session */
+ struct stktable *stkctr1_table; /* table the counters above belong to (undefined if counters are null) */
+ struct stksess *stkctr2_entry; /* entry containing counters currently being tracked as set 2 by this session */
+ struct stktable *stkctr2_table; /* table the counters above belong to (undefined if counters are null) */
struct {
int logwait; /* log fields waiting to be collected : LW_* */