Change in osmo-bts[master]: rach_pass_filter(): Add information about channel type

2019-12-04 Thread laforge
laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16481 )

Change subject: rach_pass_filter(): Add information about channel type
..

rach_pass_filter(): Add information about channel type

When logging about filtering access bursts, let's indicate if this is
on a CCCH, PDCH or handover related.

Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
---
M src/common/l1sap.c
1 file changed, 11 insertions(+), 10 deletions(-)

Approvals:
  pespin: Looks good to me, but someone else must approve
  fixeria: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e640ce9..213099d 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1337,14 +1337,15 @@

 #define RACH_MIN_TOA256 -2 * 256

-static bool rach_pass_filter(struct ph_rach_ind_param *rach_ind, struct 
gsm_bts *bts)
+static bool rach_pass_filter(struct ph_rach_ind_param *rach_ind, struct 
gsm_bts *bts,
+const char *chan_name)
 {
int16_t toa256 = rach_ind->acc_delay_256bits;

/* Check for RACH exceeding BER threshold (ghost RACH) */
if (rach_ind->ber10k > bts->max_ber10k_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "BER10k(%u) > BER10k_MAX(%u)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "BER10k(%u) > BER10k_MAX(%u)\n", chan_name,
rach_ind->ber10k, bts->max_ber10k_rach);
return false;
}
@@ -1355,16 +1356,16 @@
 * according to maximal allowed Timing Advance value.
 */
if (toa256 < RACH_MIN_TOA256 || toa256 > bts->max_ta * 256) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "ToA(%d) exceeds the allowed range (%d..%d)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "ToA(%d) exceeds the allowed range (%d..%d)\n", 
chan_name,
toa256, RACH_MIN_TOA256, bts->max_ta * 256);
return false;
}

/* Link quality defined by C/I (Carrier-to-Interference ratio) */
if (rach_ind->lqual_cb < bts->min_qual_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "link quality (%d) below the minimum (%d)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "link quality (%d) below the minimum (%d)\n", chan_name,
rach_ind->lqual_cb, bts->min_qual_rach);
return false;
}
@@ -1376,7 +1377,7 @@
 static int l1sap_handover_rach(struct gsm_bts_trx *trx, struct 
ph_rach_ind_param *rach_ind)
 {
/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, trx->bts)) {
+   if (!rach_pass_filter(rach_ind, trx->bts, "handover")) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
return 0;
}
@@ -1392,7 +1393,7 @@
 static int l1sap_pdch_rach(struct gsm_bts_trx *trx, struct ph_rach_ind_param 
*rach_ind)
 {
/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, trx->bts))
+   if (!rach_pass_filter(rach_ind, trx->bts, "PDCH"))
return -EAGAIN;

/* PTCCH/U (Packet Timing Advance Control Channel) */
@@ -1444,7 +1445,7 @@
bts->load.rach.busy++;

/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, bts)) {
+   if (!rach_pass_filter(rach_ind, bts, "CCCH")) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
return 0;
}

--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
Gerrit-Change-Number: 16481
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in osmo-bts[master]: rach_pass_filter(): Add information about channel type

2019-12-04 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16481 )

Change subject: rach_pass_filter(): Add information about channel type
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
Gerrit-Change-Number: 16481
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Wed, 04 Dec 2019 17:14:36 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: rach_pass_filter(): Add information about channel type

2019-12-04 Thread pespin
pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16481 )

Change subject: rach_pass_filter(): Add information about channel type
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
Gerrit-Change-Number: 16481
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-Reviewer: pespin 
Gerrit-CC: Jenkins Builder
Gerrit-Comment-Date: Wed, 04 Dec 2019 15:43:14 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: rach_pass_filter(): Add information about channel type

2019-12-04 Thread laforge
laforge has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/16481 )


Change subject: rach_pass_filter(): Add information about channel type
..

rach_pass_filter(): Add information about channel type

When logging about filtering access bursts, let's indicate if this is
on a CCCH, PDCH or handover related.

Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
---
M src/common/l1sap.c
1 file changed, 11 insertions(+), 10 deletions(-)



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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index e640ce9..213099d 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1337,14 +1337,15 @@

 #define RACH_MIN_TOA256 -2 * 256

-static bool rach_pass_filter(struct ph_rach_ind_param *rach_ind, struct 
gsm_bts *bts)
+static bool rach_pass_filter(struct ph_rach_ind_param *rach_ind, struct 
gsm_bts *bts,
+const char *chan_name)
 {
int16_t toa256 = rach_ind->acc_delay_256bits;

/* Check for RACH exceeding BER threshold (ghost RACH) */
if (rach_ind->ber10k > bts->max_ber10k_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "BER10k(%u) > BER10k_MAX(%u)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "BER10k(%u) > BER10k_MAX(%u)\n", chan_name,
rach_ind->ber10k, bts->max_ber10k_rach);
return false;
}
@@ -1355,16 +1356,16 @@
 * according to maximal allowed Timing Advance value.
 */
if (toa256 < RACH_MIN_TOA256 || toa256 > bts->max_ta * 256) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "ToA(%d) exceeds the allowed range (%d..%d)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "ToA(%d) exceeds the allowed range (%d..%d)\n", 
chan_name,
toa256, RACH_MIN_TOA256, bts->max_ta * 256);
return false;
}

/* Link quality defined by C/I (Carrier-to-Interference ratio) */
if (rach_ind->lqual_cb < bts->min_qual_rach) {
-   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access 
Burst: "
-   "link quality (%d) below the minimum (%d)\n",
+   LOGPFN(DL1C, LOGL_INFO, rach_ind->fn, "Ignoring an Access Burst 
on %s: "
+   "link quality (%d) below the minimum (%d)\n", chan_name,
rach_ind->lqual_cb, bts->min_qual_rach);
return false;
}
@@ -1376,7 +1377,7 @@
 static int l1sap_handover_rach(struct gsm_bts_trx *trx, struct 
ph_rach_ind_param *rach_ind)
 {
/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, trx->bts)) {
+   if (!rach_pass_filter(rach_ind, trx->bts, "handover")) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
return 0;
}
@@ -1392,7 +1393,7 @@
 static int l1sap_pdch_rach(struct gsm_bts_trx *trx, struct ph_rach_ind_param 
*rach_ind)
 {
/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, trx->bts))
+   if (!rach_pass_filter(rach_ind, trx->bts, "PDCH"))
return -EAGAIN;

/* PTCCH/U (Packet Timing Advance Control Channel) */
@@ -1444,7 +1445,7 @@
bts->load.rach.busy++;

/* Filter out noise / interference / ghosts */
-   if (!rach_pass_filter(rach_ind, bts)) {
+   if (!rach_pass_filter(rach_ind, bts, "CCCH")) {
rate_ctr_inc2(trx->bts->ctrs, BTS_CTR_RACH_DROP);
return 0;
}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/16481
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I03f21f2b54cbe5aad36ac71a614d5df98867df80
Gerrit-Change-Number: 16481
Gerrit-PatchSet: 1
Gerrit-Owner: laforge 
Gerrit-MessageType: newchange