[PATCH] osmo-bts[master]: counters: split rach:sent into rach:drop, rach:ho, rach:cs a...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Mon Feb 26 11:28:39 UTC 2018


Review at  https://gerrit.osmocom.org/6927

counters: split rach:sent into rach:drop, rach:ho, rach:cs and rach:ps

Change-Id: I51e9938df0e05b8fdb12686b9a9bb6994546deed
---
M include/osmo-bts/bts.h
M src/common/bts.c
M src/common/l1sap.c
3 files changed, 14 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/27/6927/1

diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index 76f8ba5..34ba956 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -15,7 +15,10 @@
 	BTS_CTR_PAGING_DROP,
 	BTS_CTR_PAGING_SENT,
 	BTS_CTR_RACH_RCVD,
-	BTS_CTR_RACH_SENT,
+	BTS_CTR_RACH_DROP,
+	BTS_CTR_RACH_HO,
+	BTS_CTR_RACH_CS,
+	BTS_CTR_RACH_PS,
 	BTS_CTR_AGCH_RCVD,
 	BTS_CTR_AGCH_SENT,
 	BTS_CTR_AGCH_DELETED,
diff --git a/src/common/bts.c b/src/common/bts.c
index 60a309e..b10d7f2 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -87,7 +87,10 @@
 	[BTS_CTR_PAGING_SENT] =		{"paging:sent", "Sent paging requests (Um)"},
 
 	[BTS_CTR_RACH_RCVD] =		{"rach:rcvd", "Received RACH requests (Um)"},
-	[BTS_CTR_RACH_SENT] =		{"rach:sent", "Sent RACH requests (Abis)"},
+	[BTS_CTR_RACH_DROP] =		{"rach:drop", "Dropped RACH requests (Um)"},
+	[BTS_CTR_RACH_HO] =		{"rach:handover", "Received RACH requests (Handover)"},
+	[BTS_CTR_RACH_CS] =		{"rach:cs", "Received RACH requests (CS/Abis)"},
+	[BTS_CTR_RACH_PS] =		{"rach:ps", "Received RACH requests (PS/PCU)"},
 
 	[BTS_CTR_AGCH_RCVD] =		{"agch:rcvd", "Received AGCH requests (Abis)"},
 	[BTS_CTR_AGCH_SENT] =		{"agch:sent", "Sent AGCH requests (Abis)"},
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 88d5a34..2623d84 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1198,6 +1198,7 @@
 	if (!check_acc_delay(rach_ind, btsb, &acc_delay)) {
 		LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "ignoring RACH request %u > max_ta(%u)\n",
 		     acc_delay, btsb->max_ta);
+		rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
 		return 0;
 	}
 
@@ -1205,12 +1206,15 @@
 	set_ms_to_data(get_lchan_by_chan_nr(trx, rach_ind->chan_nr), acc_delay, false);
 
 	/* check for handover rach */
-	if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr))
+	if (!L1SAP_IS_CHAN_RACH(rach_ind->chan_nr)) {
+		rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_HO);
 		return l1sap_handover_rach(trx, l1sap, rach_ind);
+	}
 
 	/* check for packet access */
 	if ((trx == bts->c0 && L1SAP_IS_PACKET_RACH(rach_ind->ra)) ||
 		(trx == bts->c0 && rach_ind->is_11bit)) {
+		rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_PS);
 
 		LOGPFN(DL1P, LOGL_INFO, rach_ind->fn, "RACH for packet access (toa=%d, ra=%d)\n",
 			rach_ind->acc_delay, rach_ind->ra);
@@ -1223,7 +1227,7 @@
 
 	LOGPFN(DL1P, LOGL_INFO, rach_ind->fn, "RACH for RR access (toa=%d, ra=%d)\n",
 		rach_ind->acc_delay, rach_ind->ra);
-	rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_SENT);
+	rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_CS);
 	lapdm_phsap_up(&l1sap->oph, &lc->lapdm_dcch);
 
 	return 0;

-- 
To view, visit https://gerrit.osmocom.org/6927
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51e9938df0e05b8fdb12686b9a9bb6994546deed
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>



More information about the gerrit-log mailing list