Actions
Bug #4695
closedRF-locking makes osmo-bts-trx lose all per-timeslot rate counters
Start date:
08/06/2020
Due date:
% Done:
100%
Spec Reference:
Description
I found this just by looking at the related code:
/* Deact RF on transceiver */
int bts_model_trx_deact_rf(struct gsm_bts_trx *trx)
{
// ...
/* close all logical channels and reset timeslots */
trx_sched_reset(&l1h->l1s);
// ...
}
In this case, resetting the scheduler is kind of expected, but let's look at the actual implementation:
/* close all logical channels and reset timeslots */
void trx_sched_reset(struct l1sched_trx *l1t)
{
trx_sched_exit(l1t); // <-- (!)
trx_sched_init(l1t, l1t->trx);
}
and here is the culprit, in trx_sched_exit():
void trx_sched_exit(struct l1sched_trx *l1t)
{
struct gsm_bts_trx_ts *ts;
uint8_t tn;
int i;
LOGP(DL1C, LOGL_NOTICE, "Exit scheduler for trx=%u\n", l1t->trx->nr);
for (tn = 0; tn < ARRAY_SIZE(l1t->ts); tn++) {
struct l1sched_ts *l1ts = l1sched_trx_get_ts(l1t, tn);
msgb_queue_flush(&l1ts->dl_prims);
rate_ctr_group_free(l1ts->ctrs); // <-- (!)
l1ts->ctrs = NULL; // <-- (!)
// ...
}
// ...
}
Related issues
Actions