use osmo_fsm for TBF
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.
- % 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