Feature #1902

unify/refactor dynamic timeslot code

Added by neels about 1 year ago. Updated 3 months ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


The two kinds of dynamic timeslots could use the same data structures.

The IPAC style TCH/F_PDCH was implemented first, using ts->flags.
The Osmo style TCH/F_TCH/H_PDCH needed more detailed state, so ts->dyn was added.

The TCH/F_PDCH could also use ts->dyn.

Also, we had neverending bugs of places that forgot to check for dyn ts.
The code would be less fragile if we kept the actual current mode the
timeslot is in in the actual ts->pchan field, where all the code expects it.
Currently we keep "TCH_F_TCH_H_PDCH" in pchan and store the current real
mode in dyn->pchan_is. So all code needs to be aware of dynamic channels
and has to add checks to find out the current mode.

I assume it would be nicer if the fact that a channel is dynamic is kept
in ts->dyn, and the ts->pchan can be evaluated like with static channels.
ts->pchan should probably also reflect switchover as an invalid pchan.
This way all code can just directly use ts->pchan, and the places that
are concerned with switchover can look it up in ts->dyn.*.


#1 Updated by neels about 1 year ago

  • Description updated (diff)
  • Priority changed from Normal to Low

(accidentally hit enter when there was no description yet, adding description now)

#2 Updated by neels about 1 year ago

  • Assignee set to Osmocom Developers

#3 Updated by laforge 3 months ago

  • Project changed from OpenBSC to OsmoBSC

#4 Updated by laforge 3 months ago

  • Assignee changed from Osmocom Developers to sysmocom
  • Priority changed from Low to Normal

I think this should be done together with the introduction of osmo_fsm for handling a lchan, i.e. one FSM per lchan whihc then tracks all of it's activation/deactivation state.

Also available in: Atom PDF