[MAJOR] session-counters: split FE and BE track counters

Having a single tracking pointer for both frontend and backend counters
does not work. Instead let's have one for each. The keyword has changed
to "track-be-counters" and "track-fe-counters", and the ACL "trk_*"
changed to "trkfe_*" and "trkbe_*".
diff --git a/include/proto/session.h b/include/proto/session.h
index a5dd881..0959320 100644
--- a/include/proto/session.h
+++ b/include/proto/session.h
@@ -53,45 +53,97 @@
  */
 static inline void session_store_counters(struct session *s)
 {
-	if (s->tracked_counters) {
-		void *ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_CONN_CUR);
+	void *ptr;
+
+	if (s->be_tracked_counters) {
+		ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_CONN_CUR);
+		if (ptr)
+			stktable_data_cast(ptr, conn_cur)--;
+		s->be_tracked_counters->ref_cnt--;
+		s->be_tracked_counters = NULL;
+	}
+
+	if (s->fe_tracked_counters) {
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_CONN_CUR);
 		if (ptr)
 			stktable_data_cast(ptr, conn_cur)--;
+		s->fe_tracked_counters->ref_cnt--;
+		s->fe_tracked_counters = NULL;
 	}
-	s->tracked_counters->ref_cnt--;
-	s->tracked_counters = NULL;
 }
 
-/* Enable tracking of session counters on stksess <ts>. The caller is
- * responsible for ensuring that <t> and <ts> are valid pointers and that no
- * previous tracked_counters was assigned to the session.
+/* Remove the refcount from the session counters tracked only by the backend if
+ * any, and clear the pointer to ensure this is only performed once. The caller
+ * is responsible for ensuring that the pointer is valid first.
  */
-static inline void session_track_counters(struct session *s, struct stktable *t, struct stksess *ts)
+static inline void session_stop_backend_counters(struct session *s)
 {
-	ts->ref_cnt++;
-	s->tracked_table = t;
-	s->tracked_counters = ts;
-	if (ts) {
-		void *ptr;
+	void *ptr;
 
-		ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CUR);
-		if (ptr)
-			stktable_data_cast(ptr, conn_cur)++;
+	if (!s->be_tracked_counters)
+		return;
 
-		ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CNT);
-		if (ptr)
-			stktable_data_cast(ptr, conn_cnt)++;
+	ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_CONN_CUR);
+	if (ptr)
+		stktable_data_cast(ptr, conn_cur)--;
+	s->be_tracked_counters->ref_cnt--;
+	s->be_tracked_counters = NULL;
+}
 
-		ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_RATE);
-		if (ptr)
-			update_freq_ctr_period(&stktable_data_cast(ptr, conn_rate),
-					       t->data_arg[STKTABLE_DT_CONN_RATE].u, 1);
+/* Increase total and concurrent connection count for stick entry <ts> of table
+ * <t>. The caller is responsible for ensuring that <t> and <ts> are valid
+ * pointers, and for calling this only once per connection.
+ */
+static inline void session_start_counters(struct stktable *t, struct stksess *ts)
+{
+	void *ptr;
 
-		if (tick_isset(t->expire))
-			ts->expire = tick_add(now_ms, MS_TO_TICKS(t->expire));
-	}
+	ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CUR);
+	if (ptr)
+		stktable_data_cast(ptr, conn_cur)++;
+
+	ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_CNT);
+	if (ptr)
+		stktable_data_cast(ptr, conn_cnt)++;
+
+	ptr = stktable_data_ptr(t, ts, STKTABLE_DT_CONN_RATE);
+	if (ptr)
+		update_freq_ctr_period(&stktable_data_cast(ptr, conn_rate),
+				       t->data_arg[STKTABLE_DT_CONN_RATE].u, 1);
+	if (tick_isset(t->expire))
+		ts->expire = tick_add(now_ms, MS_TO_TICKS(t->expire));
+}
+
+/* Enable frontend tracking of session counters on stksess <ts>. The caller is
+ * responsible for ensuring that <t> and <ts> are valid pointers. Some controls
+ * are performed to ensure the state can still change.
+ */
+static inline void session_track_fe_counters(struct session *s, struct stktable *t, struct stksess *ts)
+{
+	if (s->fe_tracked_counters)
+		return;
+
+	ts->ref_cnt++;
+	s->fe_tracked_table = t;
+	s->fe_tracked_counters = ts;
+	session_start_counters(t, ts);
 }
 
+/* Enable backend tracking of session counters on stksess <ts>. The caller is
+ * responsible for ensuring that <t> and <ts> are valid pointers. Some controls
+ * are performed to ensure the state can still change.
+ */
+static inline void session_track_be_counters(struct session *s, struct stktable *t, struct stksess *ts)
+{
+	if (s->be_tracked_counters)
+		return;
+
+	ts->ref_cnt++;
+	s->be_tracked_table = t;
+	s->be_tracked_counters = ts;
+	session_start_counters(t, ts);
+}
+
 static void inline trace_term(struct session *s, unsigned int code)
 {
 	s->term_trace <<= TT_BIT_SHIFT;
@@ -101,17 +153,28 @@
 /* Increase the number of cumulated HTTP requests in the tracked counters */
 static void inline session_inc_http_req_ctr(struct session *s)
 {
-	if (s->tracked_counters) {
-		void *ptr;
+	void *ptr;
+
+	if (s->be_tracked_counters) {
+		ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_HTTP_REQ_CNT);
+		if (ptr)
+			stktable_data_cast(ptr, http_req_cnt)++;
+
+		ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_HTTP_REQ_RATE);
+		if (ptr)
+			update_freq_ctr_period(&stktable_data_cast(ptr, http_req_rate),
+					       s->be_tracked_table->data_arg[STKTABLE_DT_HTTP_REQ_RATE].u, 1);
+	}
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_HTTP_REQ_CNT);
+	if (s->fe_tracked_counters) {
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_HTTP_REQ_CNT);
 		if (ptr)
 			stktable_data_cast(ptr, http_req_cnt)++;
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_HTTP_REQ_RATE);
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_HTTP_REQ_RATE);
 		if (ptr)
 			update_freq_ctr_period(&stktable_data_cast(ptr, http_req_rate),
-					       s->tracked_table->data_arg[STKTABLE_DT_HTTP_REQ_RATE].u, 1);
+					       s->fe_tracked_table->data_arg[STKTABLE_DT_HTTP_REQ_RATE].u, 1);
 	}
 }
 
@@ -123,17 +186,28 @@
  */
 static void inline session_inc_http_err_ctr(struct session *s)
 {
-	if (s->tracked_counters) {
-		void *ptr;
+	void *ptr;
+
+	if (s->be_tracked_counters) {
+		ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_HTTP_ERR_CNT);
+		if (ptr)
+			stktable_data_cast(ptr, http_err_cnt)++;
+
+		ptr = stktable_data_ptr(s->be_tracked_table, s->be_tracked_counters, STKTABLE_DT_HTTP_ERR_RATE);
+		if (ptr)
+			update_freq_ctr_period(&stktable_data_cast(ptr, http_err_rate),
+					       s->be_tracked_table->data_arg[STKTABLE_DT_HTTP_ERR_RATE].u, 1);
+	}
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_HTTP_ERR_CNT);
+	if (s->fe_tracked_counters) {
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_HTTP_ERR_CNT);
 		if (ptr)
 			stktable_data_cast(ptr, http_err_cnt)++;
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_HTTP_ERR_RATE);
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_HTTP_ERR_RATE);
 		if (ptr)
 			update_freq_ctr_period(&stktable_data_cast(ptr, http_err_rate),
-					       s->tracked_table->data_arg[STKTABLE_DT_HTTP_ERR_RATE].u, 1);
+					       s->fe_tracked_table->data_arg[STKTABLE_DT_HTTP_ERR_RATE].u, 1);
 	}
 }
 
diff --git a/include/types/proto_tcp.h b/include/types/proto_tcp.h
index a7ca56a..bee52aa 100644
--- a/include/types/proto_tcp.h
+++ b/include/types/proto_tcp.h
@@ -32,7 +32,8 @@
 enum {
 	TCP_ACT_ACCEPT = 1,
 	TCP_ACT_REJECT = 2,
-	TCP_ACT_TRK_CTR = 3,
+	TCP_ACT_TRK_FE_CTR = 3,
+	TCP_ACT_TRK_BE_CTR = 4,
 };
 
 struct tcp_rule {
diff --git a/include/types/session.h b/include/types/session.h
index 4a1dc6e..7b6cf4f 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -184,8 +184,10 @@
 		int flags;
 	} store[8];				/* tracked stickiness values to store */
 	int store_count;
-	struct stksess *tracked_counters;       /* counters currently being tracked by this session */
-	struct stktable *tracked_table;         /* table the counters above belong to (undefined if counters are null) */
+	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 {
 		int logwait;			/* log fields waiting to be collected : LW_* */
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 7a33910..19785f0 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -4990,7 +4990,7 @@
 		list_for_each_entry(trule, &curproxy->tcp_req.l4_rules, list) {
 			struct proxy *target;
 
-			if (trule->action != TCP_ACT_TRK_CTR)
+			if (trule->action != TCP_ACT_TRK_FE_CTR && trule->action != TCP_ACT_TRK_BE_CTR)
 				continue;
 
 			if (trule->act_prm.trk_ctr.table.n)
diff --git a/src/proto_http.c b/src/proto_http.c
index 7e28762..1d126fc 100644
--- a/src/proto_http.c
+++ b/src/proto_http.c
@@ -3704,6 +3704,7 @@
 
 	s->logs.t_close = tv_ms_elapsed(&s->logs.tv_accept, &now);
 	session_process_counters(s);
+	session_stop_backend_counters(s);
 
 	if (s->txn.status) {
 		int n;
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 20fcd6a..4ff9ed0 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -705,7 +705,7 @@
 int tcp_exec_req_rules(struct session *s)
 {
 	struct tcp_rule *rule;
-	struct stksess *ts = s->tracked_counters;
+	struct stksess *ts;
 	struct stktable *t = NULL;
 	int result = 1;
 	int ret;
@@ -734,8 +734,8 @@
 				result = 0;
 				break;
 			}
-			else if (rule->action == TCP_ACT_TRK_CTR) {
-				if (!s->tracked_counters) {
+			else if (rule->action == TCP_ACT_TRK_FE_CTR) {
+				if (!s->fe_tracked_counters) {
 					/* only the first valid track-counters directive applies.
 					 * Also, note that right now we can only track SRC so we
 					 * don't check how to get the key, but later we may need
@@ -744,9 +744,22 @@
 					t = rule->act_prm.trk_ctr.table.t;
 					ts = stktable_get_entry(t, tcpv4_src_to_stktable_key(s));
 					if (ts)
-						session_track_counters(s, t, ts);
+						session_track_fe_counters(s, t, ts);
 				}
 			}
+			else if (rule->action == TCP_ACT_TRK_BE_CTR) {
+				if (!s->be_tracked_counters) {
+					/* only the first valid track-counters directive applies.
+					 * Also, note that right now we can only track SRC so we
+					 * don't check how to get the key, but later we may need
+					 * to consider rule->act_prm->trk_ctr.type.
+					 */
+					t = rule->act_prm.trk_ctr.table.t;
+					ts = stktable_get_entry(t, tcpv4_src_to_stktable_key(s));
+					if (ts)
+						session_track_be_counters(s, t, ts);
+				}
+			}
 			else {
 				/* otherwise it's an accept */
 				break;
@@ -868,7 +881,7 @@
 		arg++;
 		rule->action = TCP_ACT_REJECT;
 	}
-	else if (strcmp(args[1], "track-counters") == 0) {
+	else if (strcmp(args[1], "track-fe-counters") == 0) {
 		int ret;
 
 		arg++;
@@ -878,11 +891,23 @@
 		if (ret < 0) /* nb: warnings are not handled yet */
 			goto error;
 
-		rule->action = TCP_ACT_TRK_CTR;
+		rule->action = TCP_ACT_TRK_FE_CTR;
+	}
+	else if (strcmp(args[1], "track-be-counters") == 0) {
+		int ret;
+
+		arg++;
+		ret = parse_track_counters(args, &arg, section_type, curpx,
+					   &rule->act_prm.trk_ctr, defpx, err, errlen);
+
+		if (ret < 0) /* nb: warnings are not handled yet */
+			goto error;
+
+		rule->action = TCP_ACT_TRK_BE_CTR;
 	}
 	else {
 		retlen = snprintf(err, errlen,
-				  "'%s' expects 'inspect-delay', 'content', 'accept', 'reject', or 'track-counters' in %s '%s' (was '%s')",
+				  "'%s' expects 'inspect-delay', 'content', 'accept', 'reject',  'track-fe-counters' or 'track-be-counters' in %s '%s' (was '%s')",
 				  args[0], proxy_type_str(curpx), curpx->id, args[1]);
 		goto error;
 	}
diff --git a/src/session.c b/src/session.c
index 1266935..b195173 100644
--- a/src/session.c
+++ b/src/session.c
@@ -64,8 +64,10 @@
 	/* minimum session initialization required for monitor mode below */
 	s->flags = 0;
 	s->logs.logwait = p->to_log;
-	s->tracked_counters = NULL;
-	s->tracked_table = NULL;
+	s->fe_tracked_counters = NULL;
+	s->be_tracked_counters = NULL;
+	s->fe_tracked_table = NULL;
+	s->be_tracked_table = NULL;
 
 	/* if this session comes from a known monitoring system, we want to ignore
 	 * it as soon as possible, which means closing it immediately for TCP, but
@@ -120,7 +122,7 @@
 	 * even initializing the stream interfaces.
 	 */
 	if ((l->options & LI_O_TCP_RULES) && !tcp_exec_req_rules(s)) {
-		if (s->tracked_counters)
+		if (s->fe_tracked_counters || s->be_tracked_counters)
 			session_store_counters(s);
 		task_free(t);
 		LIST_DEL(&s->list);
@@ -135,17 +137,17 @@
 	if (p->feconn > p->counters.feconn_max)
 		p->counters.feconn_max = p->feconn;
 	proxy_inc_fe_sess_ctr(l, p);
-	if (s->tracked_counters) {
+	if (s->fe_tracked_counters) {
 		void *ptr;
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_SESS_CNT);
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_SESS_CNT);
 		if (ptr)
 			stktable_data_cast(ptr, sess_cnt)++;
 
-		ptr = stktable_data_ptr(s->tracked_table, s->tracked_counters, STKTABLE_DT_SESS_RATE);
+		ptr = stktable_data_ptr(s->fe_tracked_table, s->fe_tracked_counters, STKTABLE_DT_SESS_RATE);
 		if (ptr)
 			update_freq_ctr_period(&stktable_data_cast(ptr, sess_rate),
-					       s->tracked_table->data_arg[STKTABLE_DT_SESS_RATE].u, 1);
+					       s->fe_tracked_table->data_arg[STKTABLE_DT_SESS_RATE].u, 1);
 	}
 
 	/* this part should be common with other protocols */
@@ -273,7 +275,7 @@
 			/* work is finished, we can release everything (eg: monitoring) */
 			pool_free2(pool2_buffer, s->rep);
 			pool_free2(pool2_buffer, s->req);
-			if (s->tracked_counters)
+			if (s->fe_tracked_counters || s->be_tracked_counters)
 				session_store_counters(s);
 			task_free(t);
 			LIST_DEL(&s->list);
@@ -297,7 +299,7 @@
 	pool_free2(pool2_buffer, s->req);
  out_free_task:
 	p->feconn--;
-	if (s->tracked_counters)
+	if (s->fe_tracked_counters || s->be_tracked_counters)
 		session_store_counters(s);
 	task_free(t);
  out_free_session:
@@ -361,7 +363,7 @@
 		pool_free2(fe->req_cap_pool, txn->req.cap);
 	}
 
-	if (s->tracked_counters)
+	if (s->fe_tracked_counters || s->be_tracked_counters)
 		session_store_counters(s);
 
 	list_for_each_entry_safe(bref, back, &s->back_refs, users) {
@@ -417,21 +419,38 @@
 			if (s->listener->counters)
 				s->listener->counters->bytes_in		+= bytes;
 
-			if (s->tracked_counters) {
+			if (s->be_tracked_counters) {
 				void *ptr;
 
-				ptr = stktable_data_ptr(s->tracked_table,
-							s->tracked_counters,
+				ptr = stktable_data_ptr(s->be_tracked_table,
+							s->be_tracked_counters,
 							STKTABLE_DT_BYTES_IN_CNT);
 				if (ptr)
 					stktable_data_cast(ptr, bytes_in_cnt) += bytes;
 
-				ptr = stktable_data_ptr(s->tracked_table,
-							s->tracked_counters,
+				ptr = stktable_data_ptr(s->be_tracked_table,
+							s->be_tracked_counters,
 							STKTABLE_DT_BYTES_IN_RATE);
 				if (ptr)
 					update_freq_ctr_period(&stktable_data_cast(ptr, bytes_in_rate),
-							       s->tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
+							       s->be_tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
+			}
+
+			if (s->fe_tracked_counters) {
+				void *ptr;
+
+				ptr = stktable_data_ptr(s->fe_tracked_table,
+							s->fe_tracked_counters,
+							STKTABLE_DT_BYTES_IN_CNT);
+				if (ptr)
+					stktable_data_cast(ptr, bytes_in_cnt) += bytes;
+
+				ptr = stktable_data_ptr(s->fe_tracked_table,
+							s->fe_tracked_counters,
+							STKTABLE_DT_BYTES_IN_RATE);
+				if (ptr)
+					update_freq_ctr_period(&stktable_data_cast(ptr, bytes_in_rate),
+							       s->fe_tracked_table->data_arg[STKTABLE_DT_BYTES_IN_RATE].u, bytes);
 			}
 		}
 	}
@@ -451,21 +470,38 @@
 			if (s->listener->counters)
 				s->listener->counters->bytes_out	+= bytes;
 
+			if (s->be_tracked_counters) {
+				void *ptr;
+
+				ptr = stktable_data_ptr(s->be_tracked_table,
+							s->be_tracked_counters,
+							STKTABLE_DT_BYTES_OUT_CNT);
+				if (ptr)
+					stktable_data_cast(ptr, bytes_out_cnt) += bytes;
+
+				ptr = stktable_data_ptr(s->be_tracked_table,
+							s->be_tracked_counters,
+							STKTABLE_DT_BYTES_OUT_RATE);
+				if (ptr)
+					update_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
+							       s->be_tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
+			}
+
-			if (s->tracked_counters) {
+			if (s->fe_tracked_counters) {
 				void *ptr;
 
-				ptr = stktable_data_ptr(s->tracked_table,
-							s->tracked_counters,
+				ptr = stktable_data_ptr(s->fe_tracked_table,
+							s->fe_tracked_counters,
 							STKTABLE_DT_BYTES_OUT_CNT);
 				if (ptr)
 					stktable_data_cast(ptr, bytes_out_cnt) += bytes;
 
-				ptr = stktable_data_ptr(s->tracked_table,
-							s->tracked_counters,
+				ptr = stktable_data_ptr(s->fe_tracked_table,
+							s->fe_tracked_counters,
 							STKTABLE_DT_BYTES_OUT_RATE);
 				if (ptr)
 					update_freq_ctr_period(&stktable_data_cast(ptr, bytes_out_rate),
-							       s->tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
+							       s->fe_tracked_table->data_arg[STKTABLE_DT_BYTES_OUT_RATE].u, bytes);
 			}
 		}
 	}
@@ -2118,15 +2154,27 @@
 }
 
 /* set test->i to the General Purpose Counter 0 value from the session's tracked
- * counters.
+ * frontend counters.
  */
 static int
-acl_fetch_trk_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+	return acl_fetch_get_gpc0(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the General Purpose Counter 0 value from the session's tracked
+ * backend counters.
+ */
+static int
+acl_fetch_trkbe_get_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
-	return acl_fetch_get_gpc0(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_get_gpc0(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the General Purpose Counter 0 value from the session's source
@@ -2169,15 +2217,27 @@
 }
 
 /* Increment the General Purpose Counter 0 value from the session's tracked
- * counters and return it into test->i.
+ * frontend counters and return it into test->i.
  */
 static int
-acl_fetch_trk_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+	return acl_fetch_inc_gpc0(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* Increment the General Purpose Counter 0 value from the session's tracked
+ * backend counters and return it into test->i.
+ */
+static int
+acl_fetch_trkbe_inc_gpc0(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
-	return acl_fetch_inc_gpc0(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_inc_gpc0(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* Increment the General Purpose Counter 0 value from the session's source
@@ -2217,15 +2277,26 @@
 	return 1;
 }
 
-/* set test->i to the cumulated number of connections from the session's tracked counters */
+/* set test->i to the cumulated number of connections from the session's tracked FE counters */
 static int
-acl_fetch_trk_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_conn_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of connections from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_conn_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_conn_cnt(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_conn_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the cumulated number of connections from the session's source
@@ -2266,17 +2337,30 @@
 	return 1;
 }
 
-/* set test->i to the connection rate from the session's tracked counters over
+/* set test->i to the connection rate from the session's tracked FE counters over
  * the configured period.
  */
 static int
-acl_fetch_trk_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_conn_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the connection rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_conn_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                          struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_conn_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_conn_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the connection rate from the session's source address in the
@@ -2351,17 +2435,28 @@
 	return 1;
 }
 
-/* set test->i to the number of concurrent connections from the session's tracked counters */
+/* set test->i to the number of concurrent connections from the session's tracked FE counters */
 static int
-acl_fetch_trk_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
-                       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->fe_tracked_counters)
 		return 0;
 
-	return acl_fetch_conn_cur(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_conn_cur(l4->fe_tracked_table, test, l4->fe_tracked_counters);
 }
 
+/* set test->i to the number of concurrent connections from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_conn_cur(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->be_tracked_counters)
+		return 0;
+
+	return acl_fetch_conn_cur(l4->be_tracked_table, test, l4->be_tracked_counters);
+}
+
 /* set test->i to the number of concurrent connections from the session's source
  * address in the table pointed to by expr.
  */
@@ -2399,15 +2494,26 @@
 	return 1;
 }
 
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
 static int
-acl_fetch_trk_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_sess_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_sess_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                         struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_sess_cnt(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_sess_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the cumulated number of session from the session's source
@@ -2448,17 +2554,30 @@
 	return 1;
 }
 
+/* set test->i to the session rate from the session's tracked FE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkfe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                          struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_sess_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked BE counters over
  * the configured period.
  */
 static int
-acl_fetch_trk_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+acl_fetch_trkbe_sess_rate(struct proxy *px, struct session *l4, void *l7, int dir,
 			struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_sess_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_sess_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the session rate from the session's source address in the
@@ -2498,15 +2617,26 @@
 	return 1;
 }
 
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
 static int
-acl_fetch_trk_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                             struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_http_req_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_http_req_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                             struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_http_req_cnt(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_http_req_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the cumulated number of session from the session's source
@@ -2547,17 +2677,30 @@
 	return 1;
 }
 
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked FE counters over
  * the configured period.
  */
 static int
-acl_fetch_trk_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_http_req_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the session rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_http_req_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_http_req_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_http_req_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the session rate from the session's source address in the
@@ -2597,15 +2740,26 @@
 	return 1;
 }
 
-/* set test->i to the cumulated number of sessions from the session's tracked counters */
+/* set test->i to the cumulated number of sessions from the session's tracked FE counters */
 static int
-acl_fetch_trk_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
-		       struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                             struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_http_err_cnt(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the cumulated number of sessions from the session's tracked BE counters */
+static int
+acl_fetch_trkbe_http_err_cnt(struct proxy *px, struct session *l4, void *l7, int dir,
+                             struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_http_err_cnt(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_http_err_cnt(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the cumulated number of session from the session's source
@@ -2646,17 +2800,30 @@
 	return 1;
 }
 
-/* set test->i to the session rate from the session's tracked counters over
+/* set test->i to the session rate from the session's tracked FE counters over
  * the configured period.
  */
 static int
-acl_fetch_trk_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_http_err_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the session rate from the session's tracked BE counters over
+ * the configured period.
+ */
+static int
+acl_fetch_trkbe_http_err_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_http_err_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_http_err_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the session rate from the session's source address in the
@@ -2698,16 +2865,29 @@
 }
 
 /* set test->i to the number of kbytes received from clients according to the
- * session's tracked counters.
+ * session's tracked FE counters.
  */
 static int
-acl_fetch_trk_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
+                          struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_kbytes_in(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the number of kbytes received from clients according to the
+ * session's tracked BE counters.
+ */
+static int
+acl_fetch_trkbe_kbytes_in(struct proxy *px, struct session *l4, void *l7, int dir,
+                          struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_kbytes_in(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_kbytes_in(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the number of kbytes received from the session's source
@@ -2750,17 +2930,30 @@
 	return 1;
 }
 
-/* set test->i to the bytes rate from clients from the session's tracked
+/* set test->i to the bytes rate from clients from the session's tracked FE
  * counters over the configured period.
  */
 static int
-acl_fetch_trk_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_bytes_in_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the bytes rate from clients from the session's tracked BE
+ * counters over the configured period.
+ */
+static int
+acl_fetch_trkbe_bytes_in_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                              struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_bytes_in_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_bytes_in_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the bytes rate from clients from the session's source address
@@ -2802,16 +2995,29 @@
 }
 
 /* set test->i to the number of kbytes sent to clients according to the session's
- * tracked counters.
+ * tracked FE counters.
  */
 static int
-acl_fetch_trk_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
-			 struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
+                           struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_kbytes_out(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the number of kbytes sent to clients according to the session's
+ * tracked BE counters.
+ */
+static int
+acl_fetch_trkbe_kbytes_out(struct proxy *px, struct session *l4, void *l7, int dir,
+                           struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_kbytes_out(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_kbytes_out(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the number of kbytes sent to the session's source address in
@@ -2854,17 +3060,30 @@
 	return 1;
 }
 
-/* set test->i to the bytes rate to clients from the session's tracked counters
+/* set test->i to the bytes rate to clients from the session's tracked FE counters
  * over the configured period.
  */
 static int
-acl_fetch_trk_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
-			struct acl_expr *expr, struct acl_test *test)
+acl_fetch_trkfe_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                               struct acl_expr *expr, struct acl_test *test)
+{
+	if (!l4->fe_tracked_counters)
+		return 0;
+
+	return acl_fetch_bytes_out_rate(l4->fe_tracked_table, test, l4->fe_tracked_counters);
+}
+
+/* set test->i to the bytes rate to clients from the session's tracked BE counters
+ * over the configured period.
+ */
+static int
+acl_fetch_trkbe_bytes_out_rate(struct proxy *px, struct session *l4, void *l7, int dir,
+                               struct acl_expr *expr, struct acl_test *test)
 {
-	if (!l4->tracked_counters)
+	if (!l4->be_tracked_counters)
 		return 0;
 
-	return acl_fetch_bytes_out_rate(l4->tracked_table, test, l4->tracked_counters);
+	return acl_fetch_bytes_out_rate(l4->be_tracked_table, test, l4->be_tracked_counters);
 }
 
 /* set test->i to the bytes rate to client from the session's source address in
@@ -2892,37 +3111,52 @@
 
 /* Note: must not be declared <const> as its list will be overwritten */
 static struct acl_kw_list acl_kws = {{ },{
-	{ "trk_get_gpc0",       acl_parse_int,   acl_fetch_trk_get_gpc0,      acl_match_int, ACL_USE_NOTHING },
-	{ "src_get_gpc0",       acl_parse_int,   acl_fetch_src_get_gpc0,      acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_inc_gpc0",       acl_parse_int,   acl_fetch_trk_inc_gpc0,      acl_match_int, ACL_USE_NOTHING },
-	{ "src_inc_gpc0",       acl_parse_int,   acl_fetch_src_inc_gpc0,      acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_conn_cnt",       acl_parse_int,   acl_fetch_trk_conn_cnt,      acl_match_int, ACL_USE_NOTHING },
-	{ "src_conn_cnt",       acl_parse_int,   acl_fetch_src_conn_cnt,      acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_conn_rate",      acl_parse_int,   acl_fetch_trk_conn_rate,     acl_match_int, ACL_USE_NOTHING },
-	{ "src_conn_rate",      acl_parse_int,   acl_fetch_src_conn_rate,     acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "src_updt_conn_cnt",  acl_parse_int,   acl_fetch_src_updt_conn_cnt, acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_conn_cur",       acl_parse_int,   acl_fetch_trk_conn_cur,      acl_match_int, ACL_USE_NOTHING },
-	{ "src_conn_cur",       acl_parse_int,   acl_fetch_src_conn_cur,      acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_sess_cnt",       acl_parse_int,   acl_fetch_trk_sess_cnt,      acl_match_int, ACL_USE_NOTHING },
-	{ "src_sess_cnt",       acl_parse_int,   acl_fetch_src_sess_cnt,      acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_sess_rate",      acl_parse_int,   acl_fetch_trk_sess_rate,     acl_match_int, ACL_USE_NOTHING },
-	{ "src_sess_rate",      acl_parse_int,   acl_fetch_src_sess_rate,     acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_http_req_cnt",   acl_parse_int,   acl_fetch_trk_http_req_cnt,  acl_match_int, ACL_USE_NOTHING },
-	{ "src_http_req_cnt",   acl_parse_int,   acl_fetch_src_http_req_cnt,  acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_http_req_rate",  acl_parse_int,   acl_fetch_trk_http_req_rate, acl_match_int, ACL_USE_NOTHING },
-	{ "src_http_req_rate",  acl_parse_int,   acl_fetch_src_http_req_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_http_err_cnt",   acl_parse_int,   acl_fetch_trk_http_err_cnt,  acl_match_int, ACL_USE_NOTHING },
-	{ "src_http_err_cnt",   acl_parse_int,   acl_fetch_src_http_err_cnt,  acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_http_err_rate",  acl_parse_int,   acl_fetch_trk_http_err_rate, acl_match_int, ACL_USE_NOTHING },
-	{ "src_http_err_rate",  acl_parse_int,   acl_fetch_src_http_err_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_kbytes_in",      acl_parse_int,   acl_fetch_trk_kbytes_in,     acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "src_kbytes_in",      acl_parse_int,   acl_fetch_src_kbytes_in,     acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_bytes_in_rate",  acl_parse_int,   acl_fetch_trk_bytes_in_rate, acl_match_int, ACL_USE_NOTHING },
-	{ "src_bytes_in_rate",  acl_parse_int,   acl_fetch_src_bytes_in_rate, acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_kbytes_out",     acl_parse_int,   acl_fetch_trk_kbytes_out,    acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "src_kbytes_out",     acl_parse_int,   acl_fetch_src_kbytes_out,    acl_match_int, ACL_USE_TCP4_VOLATILE },
-	{ "trk_bytes_out_rate", acl_parse_int,   acl_fetch_trk_bytes_out_rate,acl_match_int, ACL_USE_NOTHING },
-	{ "src_bytes_out_rate", acl_parse_int,   acl_fetch_src_bytes_out_rate,acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_get_gpc0",       acl_parse_int,   acl_fetch_trkfe_get_gpc0,       acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_get_gpc0",       acl_parse_int,   acl_fetch_trkbe_get_gpc0,       acl_match_int, ACL_USE_NOTHING },
+	{ "src_get_gpc0",         acl_parse_int,   acl_fetch_src_get_gpc0,         acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_inc_gpc0",       acl_parse_int,   acl_fetch_trkfe_inc_gpc0,       acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_inc_gpc0",       acl_parse_int,   acl_fetch_trkbe_inc_gpc0,       acl_match_int, ACL_USE_NOTHING },
+	{ "src_inc_gpc0",         acl_parse_int,   acl_fetch_src_inc_gpc0,         acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_conn_cnt",       acl_parse_int,   acl_fetch_trkfe_conn_cnt,       acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_conn_cnt",       acl_parse_int,   acl_fetch_trkbe_conn_cnt,       acl_match_int, ACL_USE_NOTHING },
+	{ "src_conn_cnt",         acl_parse_int,   acl_fetch_src_conn_cnt,         acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_conn_rate",      acl_parse_int,   acl_fetch_trkfe_conn_rate,      acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_conn_rate",      acl_parse_int,   acl_fetch_trkbe_conn_rate,      acl_match_int, ACL_USE_NOTHING },
+	{ "src_conn_rate",        acl_parse_int,   acl_fetch_src_conn_rate,        acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "src_updt_conn_cnt",    acl_parse_int,   acl_fetch_src_updt_conn_cnt,    acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_conn_cur",       acl_parse_int,   acl_fetch_trkfe_conn_cur,       acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_conn_cur",       acl_parse_int,   acl_fetch_trkbe_conn_cur,       acl_match_int, ACL_USE_NOTHING },
+	{ "src_conn_cur",         acl_parse_int,   acl_fetch_src_conn_cur,         acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_sess_cnt",       acl_parse_int,   acl_fetch_trkfe_sess_cnt,       acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_sess_cnt",       acl_parse_int,   acl_fetch_trkbe_sess_cnt,       acl_match_int, ACL_USE_NOTHING },
+	{ "src_sess_cnt",         acl_parse_int,   acl_fetch_src_sess_cnt,         acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_sess_rate",      acl_parse_int,   acl_fetch_trkfe_sess_rate,      acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_sess_rate",      acl_parse_int,   acl_fetch_trkbe_sess_rate,      acl_match_int, ACL_USE_NOTHING },
+	{ "src_sess_rate",        acl_parse_int,   acl_fetch_src_sess_rate,        acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_http_req_cnt",   acl_parse_int,   acl_fetch_trkfe_http_req_cnt,   acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_http_req_cnt",   acl_parse_int,   acl_fetch_trkbe_http_req_cnt,   acl_match_int, ACL_USE_NOTHING },
+	{ "src_http_req_cnt",     acl_parse_int,   acl_fetch_src_http_req_cnt,     acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_http_req_rate",  acl_parse_int,   acl_fetch_trkfe_http_req_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_http_req_rate",  acl_parse_int,   acl_fetch_trkbe_http_req_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "src_http_req_rate",    acl_parse_int,   acl_fetch_src_http_req_rate,    acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_http_err_cnt",   acl_parse_int,   acl_fetch_trkfe_http_err_cnt,   acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_http_err_cnt",   acl_parse_int,   acl_fetch_trkbe_http_err_cnt,   acl_match_int, ACL_USE_NOTHING },
+	{ "src_http_err_cnt",     acl_parse_int,   acl_fetch_src_http_err_cnt,     acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_http_err_rate",  acl_parse_int,   acl_fetch_trkfe_http_err_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_http_err_rate",  acl_parse_int,   acl_fetch_trkbe_http_err_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "src_http_err_rate",    acl_parse_int,   acl_fetch_src_http_err_rate,    acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_kbytes_in",      acl_parse_int,   acl_fetch_trkfe_kbytes_in,      acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkbe_kbytes_in",      acl_parse_int,   acl_fetch_trkbe_kbytes_in,      acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "src_kbytes_in",        acl_parse_int,   acl_fetch_src_kbytes_in,        acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_bytes_in_rate",  acl_parse_int,   acl_fetch_trkfe_bytes_in_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_bytes_in_rate",  acl_parse_int,   acl_fetch_trkbe_bytes_in_rate,  acl_match_int, ACL_USE_NOTHING },
+	{ "src_bytes_in_rate",    acl_parse_int,   acl_fetch_src_bytes_in_rate,    acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_kbytes_out",     acl_parse_int,   acl_fetch_trkfe_kbytes_out,     acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkbe_kbytes_out",     acl_parse_int,   acl_fetch_trkbe_kbytes_out,     acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "src_kbytes_out",       acl_parse_int,   acl_fetch_src_kbytes_out,       acl_match_int, ACL_USE_TCP4_VOLATILE },
+	{ "trkfe_bytes_out_rate", acl_parse_int,   acl_fetch_trkfe_bytes_out_rate, acl_match_int, ACL_USE_NOTHING },
+	{ "trkbe_bytes_out_rate", acl_parse_int,   acl_fetch_trkbe_bytes_out_rate, acl_match_int, ACL_USE_NOTHING },
+	{ "src_bytes_out_rate",   acl_parse_int,   acl_fetch_src_bytes_out_rate,   acl_match_int, ACL_USE_TCP4_VOLATILE },
 	{ NULL, NULL, NULL, NULL },
 }};