Change in osmo-bts[master]: osmo-bts-trx/scheduler: fix CLCK.ind handling during ramping down

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Sun Aug 2 11:35:14 UTC 2020


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/19503 )


Change subject: osmo-bts-trx/scheduler: fix CLCK.ind handling during ramping down
......................................................................

osmo-bts-trx/scheduler: fix CLCK.ind handling during ramping down

On receipt of either SIGTERM or SIGINT the shutdown FSM initiates
ramping down of the transmit power on Downlink.  I noticed that
for some reason osmo-bts-trx stops sending Downlink bursts during
the process of ramping down.

I also noticed the following imporatant message:

  DL1C NOTICE scheduler_trx.c:287 No more clock from transceiver

despite the transceiver is still powered on and keeps sending
the clock indications over the TRXC interface.

As it turned out, the problem is that on receipt of either SIGTERM
or SIGINT, we also raise the global 'quit' flag, so in the scheduler
trx_sched_clock() stealthy stops handling the clock indications.

Let's ensure that clock indications are handled regardless of the
state of 'quit' flag, so the ramping down would work as expected.

Change-Id: Ia71133d6f0b900e5e103595c83303a7cc5c06edf
---
M src/common/main.c
M src/osmo-bts-trx/scheduler_trx.c
2 files changed, 1 insertion(+), 6 deletions(-)



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

diff --git a/src/common/main.c b/src/common/main.c
index 6d8088c..f4dc505 100644
--- a/src/common/main.c
+++ b/src/common/main.c
@@ -56,7 +56,7 @@
 #include <osmocom/ctrl/control_vty.h>
 #include <osmo-bts/oml.h>
 
-int quit = 0;
+static int quit = 0;
 static const char *config_file = "osmo-bts.cfg";
 static int daemonize = 0;
 static int rt_prio = -1;
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index fcd1eee..85f0e92 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -134,8 +134,6 @@
 	ts->tv_nsec = ts->tv_nsec % 1000000000;
 }
 
-extern int quit;
-
 /*! this is the timerfd-callback firing for every FN to be processed */
 static int trx_fn_timer_cb(struct osmo_fd *ofd, unsigned int what)
 {
@@ -274,9 +272,6 @@
 	unsigned int fn_caught_up = 0;
 	const struct timespec interval = { .tv_sec = 0, .tv_nsec = GSM_TDMA_FN_DURATION_nS };
 
-	if (quit)
-		return 0;
-
 	/* reset lost counter */
 	tcs->fn_without_clock_ind = 0;
 

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia71133d6f0b900e5e103595c83303a7cc5c06edf
Gerrit-Change-Number: 19503
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200802/2ee68aee/attachment.htm>


More information about the gerrit-log mailing list