aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-06-15 17:06:19 +0200
committerpespin <pespin@sysmocom.de>2021-06-17 14:05:40 +0000
commitf274976df313c6fe222a2e2432e8c91511e8feee (patch)
treecbb941623346372a67b18f10a497243ed5706e3b
parentb9a62638230b65d3620adb949ad1a55e1130d8f9 (diff)
Introduce counters to track SRVCC procedures
-rw-r--r--include/osmocom/bsc/bts.h7
-rw-r--r--include/osmocom/bsc/gsm_data.h15
-rw-r--r--src/osmo-bsc/bts.c22
-rw-r--r--src/osmo-bsc/handover_fsm.c9
4 files changed, 53 insertions, 0 deletions
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 4436ed024..b6980d1fe 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -137,6 +137,13 @@ enum bts_counter_id {
BTS_CTR_INTER_BSC_HO_IN_FAILED,
BTS_CTR_INTER_BSC_HO_IN_TIMEOUT,
BTS_CTR_INTER_BSC_HO_IN_ERROR,
+ BTS_CTR_SRVCC_ATTEMPTED,
+ BTS_CTR_SRVCC_COMPLETED,
+ BTS_CTR_SRVCC_STOPPED,
+ BTS_CTR_SRVCC_NO_CHANNEL,
+ BTS_CTR_SRVCC_TIMEOUT,
+ BTS_CTR_SRVCC_FAILED,
+ BTS_CTR_SRVCC_ERROR,
};
extern const struct rate_ctr_desc bts_ctr_description[];
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 37e38993d..2a73f462a 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1116,6 +1116,13 @@ enum {
BSC_CTR_INTER_BSC_HO_IN_FAILED,
BSC_CTR_INTER_BSC_HO_IN_TIMEOUT,
BSC_CTR_INTER_BSC_HO_IN_ERROR,
+ BSC_CTR_SRVCC_ATTEMPTED,
+ BSC_CTR_SRVCC_COMPLETED,
+ BSC_CTR_SRVCC_STOPPED,
+ BSC_CTR_SRVCC_NO_CHANNEL,
+ BSC_CTR_SRVCC_TIMEOUT,
+ BSC_CTR_SRVCC_FAILED,
+ BSC_CTR_SRVCC_ERROR,
BSC_CTR_PAGING_ATTEMPTED,
BSC_CTR_PAGING_DETACHED,
BSC_CTR_PAGING_RESPONDED,
@@ -1181,6 +1188,14 @@ static const struct rate_ctr_desc bsc_ctr_description[] = {
[BSC_CTR_INTER_BSC_HO_IN_ERROR] = {"interbsc_ho_in:error",
"Handover from remote BSS failed for other reason"},
+ [BSC_CTR_SRVCC_ATTEMPTED] = {"srvcc:attempted", "Intra-BSC SRVCC attempts"},
+ [BSC_CTR_SRVCC_COMPLETED] = {"srvcc:completed", "Intra-BSC SRVCC completed"},
+ [BSC_CTR_SRVCC_STOPPED] = {"srvcc:stopped", "Connection ended during HO"},
+ [BSC_CTR_SRVCC_NO_CHANNEL] = {"srvcc:no_channel", "Failure to allocate lchan for HO"},
+ [BSC_CTR_SRVCC_TIMEOUT] = {"srvcc:timeout", "SRVCC timed out"},
+ [BSC_CTR_SRVCC_FAILED] = {"srvcc:failed", "Received SRVCC Fail messages"},
+ [BSC_CTR_SRVCC_ERROR] = {"srvcc:error", "Re-assignment failed for other reason"},
+
[BSC_CTR_PAGING_ATTEMPTED] = {"paging:attempted", "Paging attempts for a subscriber"},
[BSC_CTR_PAGING_DETACHED] = {"paging:detached", "Paging request send failures because no responsible BTS was found"},
[BSC_CTR_PAGING_RESPONDED] = {"paging:responded", "Paging attempts with successful response"},
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index e140565fa..b64890fae 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -1110,6 +1110,28 @@ const struct rate_ctr_desc bts_ctr_description[] = {
[BTS_CTR_INTER_BSC_HO_IN_ERROR] = \
{ "interbsc_ho_in:error",
"Handover from remote BSS failed for other reason" },
+
+ [BTS_CTR_SRVCC_ATTEMPTED] = \
+ { "srvcc:attempted",
+ "Intra-BSC handover attempts" },
+ [BTS_CTR_SRVCC_COMPLETED] = \
+ { "srvcc:completed",
+ "Intra-BSC handover completed" },
+ [BTS_CTR_SRVCC_STOPPED] = \
+ { "srvcc:stopped",
+ "Connection ended during HO" },
+ [BTS_CTR_SRVCC_NO_CHANNEL] = \
+ { "srvcc:no_channel",
+ "Failure to allocate lchan for HO" },
+ [BTS_CTR_SRVCC_TIMEOUT] = \
+ { "srvcc:timeout",
+ "Handover timed out" },
+ [BTS_CTR_SRVCC_FAILED] = \
+ { "srvcc:failed",
+ "Received Handover Fail messages" },
+ [BTS_CTR_SRVCC_ERROR] = \
+ { "srvcc:error",
+ "Re-assignment failed for other reason" },
};
const struct rate_ctr_group_desc bts_ctrg_desc = {
diff --git a/src/osmo-bsc/handover_fsm.c b/src/osmo-bsc/handover_fsm.c
index 08b1dc7c5..cae5167b4 100644
--- a/src/osmo-bsc/handover_fsm.c
+++ b/src/osmo-bsc/handover_fsm.c
@@ -725,6 +725,7 @@ void handover_start_inter_bsc_in(struct gsm_subscriber_connection *conn,
conn->fast_return.last_eutran_plmn_valid = true;
memcpy(&conn->fast_return.last_eutran_plmn, &req->last_eutran_plmn,
sizeof(conn->fast_return.last_eutran_plmn));
+ ho_count(ho->new_bts, CTR_SRVCC_ATTEMPTED);
}
lchan_activate(ho->new_lchan, &info);
@@ -824,6 +825,9 @@ static int result_counter_bts(enum handover_scope scope, enum handover_result re
}
}
+FUNC_RESULT_COUNTER(BSC, SRVCC)
+FUNC_RESULT_COUNTER(BTS, SRVCC)
+
static void send_handover_performed(struct gsm_subscriber_connection *conn)
{
struct gsm_lchan *lchan = conn->lchan;
@@ -977,6 +981,11 @@ void handover_end(struct gsm_subscriber_connection *conn, enum handover_result r
ho_count_bsc(result_counter_bsc(ho->scope, result));
ho_count_bts(bts, result_counter_BTS_HANDOVER(result));
ho_count_bts(bts, result_counter_bts(ho->scope, result));
+ if (ho->scope & HO_INTER_BSC_IN && conn->fast_return.last_eutran_plmn_valid) {
+ /* From outside local BSC and with Last EUTRAN PLMN Id => SRVCC */
+ ho_count_bsc(result_counter_BSC_SRVCC(result));
+ ho_count_bts(bts, result_counter_BTS_SRVCC(result));
+ }
LOG_HO(conn, LOGL_INFO, "Result: %s\n", handover_result_name(result));