mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MEDIUM: stktable: split src-based key smp_fetch_sc functions
In this patch we split several sample fetch functions that are leveraged by the "src-" fetches such as smp_fetch_sc_inc_gpc(). Indeed, for all of them, we add an intermediate helper function that takes a stkctr pointer as parameter and performs the logic, leaving the lookup part in the calling function. Before this patch existing functions were doing the lookup + the fetch logic. Thanks to this patch it will become easier to add generic converters taking lookup key as input. List of targeted functions: - smp_fetch_sc_inc_gpc() - smp_fetch_sc_inc_gpc0() - smp_fetch_sc_inc_gpc1() - smp_fetch_sc_clr_gpc() - smp_fetch_sc_clr_gpc0() - smp_fetch_sc_clr_gpc1() - smp_fetch_sc_conn_cnt() - smp_fetch_sc_conn_rate() - smp_fetch_sc_updt_conn_cnt() - smp_fetch_sc_conn_curr() - smp_fetch_sc_glitch_cnt() - smp_fetch_sc_glitch_rate() - smp_fetch_sc_sess_cnt() - smp_fetch_sc_sess_rate() - smp_fetch_sc_http_req_cnt() - smp_fetch_sc_http_req_rate() - smp_fetch_sc_http_err_cnt() - smp_fetch_sc_http_err_rate() - smp_fetch_sc_http_fail_cnt() - smp_fetch_sc_http_fail_rate() - smp_fetch_sc_kbytes_in() - smp_fetch_sc_bytes_in_rate() - smp_fetch_kbytes_out() - smp_fetch_sc_gpc1_rate() - smp_fetch_sc_gpc0_rate() - smp_fetch_sc_gpc_rate() - smp_fetch_sc_get_gpc1() - smp_fetch_sc_get_gpc0() - smp_fetch_sc_get_gpc() - smp_fetch_sc_get_gpt0() - smp_fetch_sc_get_gpt() - smp_fetch_sc_bytes_out_rate() Please note that this patch doesn't render any good using "git show" or "git diff". For all the functions listed above, a new helper function was defined right above it, with the same name without "_sc". These new functions perform the fetch part, while the original ones (with "_sc") now simply perform the lookup and then leverage the corresponding fetch helper.
This commit is contained in:
parent
f71bad4694
commit
22229a41a2