diff --git a/src/session.c b/src/session.c
index 9e3e8b2..a0e1c96 100644
--- a/src/session.c
+++ b/src/session.c
@@ -2919,80 +2919,32 @@
 	return 1;
 }
 
-/* set temp integer to the session rate in the stksess entry <ts> over the configured period */
+/* set <smp> to the HTTP request rate from the session's tracked frontend
+ * counters. Supports being called as "sc[0-9]_http_req_rate" or
+ * "src_http_req_rate" only.
+ */
 static int
-smp_fetch_http_req_rate(struct stktable *table, struct sample *smp, struct stksess *ts)
+smp_fetch_sc_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
+                           const struct arg *args, struct sample *smp, const char *kw)
 {
+	struct stkctr *stkctr = smp_fetch_sc_stkctr(l4, args, kw);
+
+	if (!stkctr)
+		return 0;
+
 	smp->flags = SMP_F_VOL_TEST;
 	smp->type = SMP_T_UINT;
 	smp->data.uint = 0;
-	if (ts != NULL) {
-		void *ptr = stktable_data_ptr(table, ts, STKTABLE_DT_HTTP_REQ_RATE);
+	if (stkctr->entry != NULL) {
+		void *ptr = stktable_data_ptr(stkctr->table, stkctr->entry, STKTABLE_DT_HTTP_REQ_RATE);
 		if (!ptr)
 			return 0; /* parameter not stored */
 		smp->data.uint = read_freq_ctr_period(&stktable_data_cast(ptr, http_req_rate),
-					       table->data_arg[STKTABLE_DT_HTTP_REQ_RATE].u);
+					       stkctr->table->data_arg[STKTABLE_DT_HTTP_REQ_RATE].u);
 	}
 	return 1;
 }
 
-/* set temp integer to the session rate from the session's tracked FE counters over
- * the configured period.
- */
-static int
-smp_fetch_sc0_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw)
-{
-	if (!l4->stkctr[0].entry)
-		return 0;
-
-	return smp_fetch_http_req_rate(l4->stkctr[0].table, smp, l4->stkctr[0].entry);
-}
-
-/* set temp integer to the session rate from the session's tracked BE counters over
- * the configured period.
- */
-static int
-smp_fetch_sc1_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw)
-{
-	if (!l4->stkctr[1].entry)
-		return 0;
-
-	return smp_fetch_http_req_rate(l4->stkctr[1].table, smp, l4->stkctr[1].entry);
-}
-
-/* set temp integer to the session rate from the session's tracked BE counters over
- * the configured period.
- */
-static int
-smp_fetch_sc2_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw)
-{
-	if (!l4->stkctr[2].entry)
-		return 0;
-
-	return smp_fetch_http_req_rate(l4->stkctr[2].table, smp, l4->stkctr[2].entry);
-}
-
-/* set temp integer to the session rate from the session's source address in the
- * table pointed to by expr, over the configured period.
- * Accepts exactly 1 argument of type table.
- */
-static int
-smp_fetch_src_http_req_rate(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
-                            const struct arg *args, struct sample *smp, const char *kw)
-{
-	struct stktable_key *key;
-
-	key = addr_to_stktable_key(&l4->si[0].conn->addr.from);
-	if (!key)
-		return 0;
-
-	px = args->data.prx;
-	return smp_fetch_http_req_rate(&px->table, smp, stktable_lookup_key(&px->table, key));
-}
-
 /* set temp integer to the cumulated number of sessions in the stksess entry <ts> */
 static int
 smp_fetch_http_err_cnt(struct stktable *table, struct sample *smp, struct stksess *ts)
@@ -3516,7 +3468,7 @@
 	{ "sc0_http_err_cnt",   smp_fetch_sc0_http_err_cnt,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc0_http_err_rate",  smp_fetch_sc0_http_err_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc0_http_req_cnt",   smp_fetch_sc_http_req_cnt,    0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
-	{ "sc0_http_req_rate",  smp_fetch_sc0_http_req_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
+	{ "sc0_http_req_rate",  smp_fetch_sc_http_req_rate,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc0_inc_gpc0",       smp_fetch_sc_inc_gpc0,        0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc0_kbytes_in",      smp_fetch_sc0_kbytes_in,      0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "sc0_kbytes_out",     smp_fetch_sc0_kbytes_out,     0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
@@ -3535,7 +3487,7 @@
 	{ "sc1_http_err_cnt",   smp_fetch_sc1_http_err_cnt,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc1_http_err_rate",  smp_fetch_sc1_http_err_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc1_http_req_cnt",   smp_fetch_sc_http_req_cnt,    0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
-	{ "sc1_http_req_rate",  smp_fetch_sc1_http_req_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
+	{ "sc1_http_req_rate",  smp_fetch_sc_http_req_rate,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc1_inc_gpc0",       smp_fetch_sc_inc_gpc0,        0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc1_kbytes_in",      smp_fetch_sc1_kbytes_in,      0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "sc1_kbytes_out",     smp_fetch_sc1_kbytes_out,     0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
@@ -3554,7 +3506,7 @@
 	{ "sc2_http_err_cnt",   smp_fetch_sc2_http_err_cnt,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc2_http_err_rate",  smp_fetch_sc2_http_err_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc2_http_req_cnt",   smp_fetch_sc_http_req_cnt,    0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
-	{ "sc2_http_req_rate",  smp_fetch_sc2_http_req_rate,  0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
+	{ "sc2_http_req_rate",  smp_fetch_sc_http_req_rate,   0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc2_inc_gpc0",       smp_fetch_sc_inc_gpc0,        0,           NULL, SMP_T_UINT, SMP_USE_INTRN, },
 	{ "sc2_kbytes_in",      smp_fetch_sc2_kbytes_in,      0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "sc2_kbytes_out",     smp_fetch_sc2_kbytes_out,     0,           NULL, SMP_T_UINT, SMP_USE_L4CLI, },
@@ -3573,7 +3525,7 @@
 	{ "src_http_err_cnt",   smp_fetch_src_http_err_cnt,   ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "src_http_err_rate",  smp_fetch_src_http_err_rate,  ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "src_http_req_cnt",   smp_fetch_sc_http_req_cnt,    ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
-	{ "src_http_req_rate",  smp_fetch_src_http_req_rate,  ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
+	{ "src_http_req_rate",  smp_fetch_sc_http_req_rate,   ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "src_inc_gpc0",       smp_fetch_sc_inc_gpc0,        ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "src_kbytes_in",      smp_fetch_src_kbytes_in,      ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
 	{ "src_kbytes_out",     smp_fetch_src_kbytes_out,     ARG1(1,TAB), NULL, SMP_T_UINT, SMP_USE_L4CLI, },
