Feature #2709


use osmo_fsm for TBF

Added by msuraev about 4 years ago. Updated 3 months ago.

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


Spec Reference:


Right now TBF uses ad-hoc implementation of FSM which is hard to debug and maintain. We should switch it to osmo_fsm which would allow us to properly integrate timers with as well.

Related issues

Related to OsmoPCU - Bug #2407: N3101 not implemented in OsmoPCUClosedmsuraev07/29/2017

Related to OsmoPCU - Bug #1524: PACCH on the wrong timeslotFeedbackroh02/22/2016

Related to OsmoPCU - Bug #1756: regression: "tbf: Add state WAIT_ASSIGN"Closedlaforge06/16/2016

Actions #1

Updated by msuraev about 4 years ago

  • Related to Bug #2407: N3101 not implemented in OsmoPCU added
Actions #2

Updated by msuraev about 4 years ago

  • Related to Bug #1524: PACCH on the wrong timeslot added
Actions #3

Updated by laforge almost 4 years ago

  • Priority changed from Normal to Low
Actions #4

Updated by pespin 12 months ago

I just found a tbf.txt explaining the current state machine: Move src/tbf.txt to doc/

Actions #5

Updated by pespin 12 months ago

  • Related to Bug #1756: regression: "tbf: Add state WAIT_ASSIGN" added
Actions #6

Updated by pespin 9 months ago

  • Assignee set to pespin

I will probably work on this prior to improving/adding other features, since it will ease the path to extend code.

Actions #7

Updated by pespin 8 months ago

Initial commit for tbf_state FSM:

Actions #8

Updated by pespin 6 months ago

  • % Done changed from 0 to 60

I submitted a bunch of patches to start moving TBF_STATE infra to use FSM. Results look promising.

See this one and follow-up patches in gerrit:

Actions #9

Updated by pespin 6 months ago

  • % Done changed from 60 to 80

I pushed around 30 patches to osmo-pcu in gerrit over last days, doing a huge clean up which will certainly help in maintaining and further improving osmo-pcu:

All patches are available in gerrit as well as in branch "pespin/fsm" of osmo-pcu.git.
I have tested them both with unit tests, TTCN3 and manual testing with real phones. No regression observed anywhere.

ee0aaf7 Move tbf ul_ack_state to osmocom FSM
6eb8bcf tbf.h: Improve documentation on several flags
39355f2 tbf_dl: Clarify requirements for DL ACK/NACK
f53cca7 Move timer X2002 to tbf_fsm
d858cdf tbf: Use type bool for upgrade_to_multislot
bb48db5 Fix typos in comments documenting fsm st chg macro
d47a4cb tbf: Merge handle_ack_nack() into rcvd_dl_ack()
5f910a4 Get rid of lots of code only used by tests
2d7a610 Move timer X2001 to tbf_fsm
e0220b5 tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_UL_DATA
72e616f tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_DL_ASS
4cf3220 replace dl_ass_state with osmocom FSM
0863d31 tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_TO_UL_ASS
b5924bc tbf: Reimplement rlcmac_diag() and make it available from C
b63421d Replace ul_ass_state with osmocom FSM
4164f6b tbf_free: Get rid of uneeded tbf_state transition
225488a Get rid of tbf_dl:abort()
55979f9 Move rate_ctr free to tbf subclass destructor
cc3f1be Remove duplicate call to gprs_rlcmac_lost_rep
7efe2fb Drop logging last mas report before freeing TBF
ed1c43b Put dl_tbf::cleanup into destructor
e1f3bfd Drop duplicate log line
f261997 Move T3169 and T3195 to tbf_fsm
d99824b Move RELEASING tbf_state transition to tbf_fsm
04d6bae Move WAIT_RELEASE tbf_state transition to tbf_fsm
6996e71 Move FINISHED tbf_state transition to tbf_fsm
0ea6cac tests: tbf: Fix dl_tbf polled for data without being in FLOW state
0ee979a Move FLOW tbf_state transition to tbf_fsm.
710042b Move NULL and ASSIGN tbf_state transition to tbf_fsm
Actions #10

Updated by pespin 3 months ago

  • Status changed from New to Resolved
  • % Done changed from 80 to 100

FSMs start to be in good shape in osmo-pcu, and they have been in master branch for a while. Closing this ticket.


Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)