Feature #2709
closeduse osmo_fsm for TBF
100%
Description
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
Updated by msuraev over 6 years ago
- Related to Bug #2407: N3101 not implemented in OsmoPCU added
Updated by msuraev over 6 years ago
- Related to Bug #1524: PACCH on the wrong timeslot added
Updated by pespin about 3 years ago
I just found a tbf.txt explaining the current state machine:
https://gerrit.osmocom.org/c/osmo-pcu/+/22595 Move src/tbf.txt to doc/
Updated by pespin about 3 years ago
- Related to Bug #1756: regression: "tbf: Add state WAIT_ASSIGN" added
Updated by pespin almost 3 years 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.
Updated by pespin almost 3 years ago
Initial commit for tbf_state FSM:
https://gerrit.osmocom.org/c/osmo-pcu/+/24235
Updated by pespin over 2 years 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:
https://gerrit.osmocom.org/c/osmo-pcu/+/25011/
Updated by pespin over 2 years 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
Updated by pespin over 2 years 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.