Change in osmo-bts[master]: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()

2020-08-06 Thread fixeria
fixeria has abandoned this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/19537 )

Change subject: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()
..


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id20d12f76b1aac5c81a79eb293e537ed41a1c28a
Gerrit-Change-Number: 19537
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-MessageType: abandon


Change in osmo-bts[master]: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()

2020-08-06 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/19537 )

Change subject: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()
..


Patch Set 1:

> Patch Set 1: Code-Review-1
>
> as written in the respective redmine issue, I think this is the wrong 
> approach.  The problem is that the schedule is disabled/reset, when all we 
> actually want is disable mostly transmit.

ACK. I'll abandon this change.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id20d12f76b1aac5c81a79eb293e537ed41a1c28a
Gerrit-Change-Number: 19537
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Thu, 06 Aug 2020 16:09:12 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in osmo-bts[master]: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()

2020-08-06 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/19537 )

Change subject: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()
..


Patch Set 1: Code-Review-1

as written in the respective redmine issue, I think this is the wrong approach. 
 The problem is that the schedule is disabled/reset, when all we actually want 
is disable mostly transmit.


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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id20d12f76b1aac5c81a79eb293e537ed41a1c28a
Gerrit-Change-Number: 19537
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Thu, 06 Aug 2020 15:54:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in osmo-bts[master]: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()

2020-08-05 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-bts/+/19537 )


Change subject: osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()
..

osmo-bts-trx: fix resource leak in bts_model_trx_deact_rf()

I noticed that "RF-locking" a transceiver with active connections
(e.g. voice calls) leads to a resource leak: the BSC would continue
to consider the associated logical channels occupied, so the MSC
would also consider the CS connections active (if any).

The radio link timeout counter is expected prevent such cases, but
it's driven by either valid SACCH blocks, or bad frame indications
triggered by NOPE indications from transceiver.  The problem is
that we basically reset the scheduler in bts_model_trx_deact_rf(),
and stop sending / receiving bursts, so this counter would be lost.

Let's ensure that RSL Radio Link Failure indications are sent to
the BSC for all active logical channels that "survied" after the
ramping down.  This is exactly what the other BTS models do.

Change-Id: Id20d12f76b1aac5c81a79eb293e537ed41a1c28a
Related: OS#4694
---
M src/osmo-bts-trx/l1_if.c
1 file changed, 25 insertions(+), 0 deletions(-)



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

diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index a2b3415..c4c743f 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -213,6 +213,31 @@
struct phy_instance *pinst = trx_phy_instance(trx);
struct trx_l1h *l1h = pinst->u.osmotrx.hdl;
enum gsm_phys_chan_config pchan = trx->ts[0].pchan;
+   unsigned int tn, ln;
+
+   /* Send RSL Radio Link Failure for all active DCCHs */
+   for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++) {
+   const struct gsm_bts_trx_ts *ts = >ts[tn];
+   if (ts->pchan == GSM_PCHAN_NONE)
+   continue;
+
+   for (ln = 0; ln < ARRAY_SIZE(ts->lchan); ln++) {
+   const struct gsm_lchan *lchan = >lchan[ln];
+   if (lchan->state != LCHAN_S_ACTIVE)
+   continue;
+
+   switch (lchan->type) {
+   case GSM_LCHAN_SDCCH:
+   case GSM_LCHAN_TCH_F:
+   case GSM_LCHAN_TCH_H:
+   rsl_tx_conn_fail(lchan, 
RSL_ERR_RADIO_LINK_FAIL);
+   break;
+   default:
+   /* Make GCC happy */
+   continue;
+   }
+   }
+   }

/* close all logical channels and reset timeslots */
trx_sched_reset(>l1s);

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id20d12f76b1aac5c81a79eb293e537ed41a1c28a
Gerrit-Change-Number: 19537
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange