pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30220 )
Change subject: Split tbf_fsm as tbf_{ul,dl}_fsm ......................................................................
Split tbf_fsm as tbf_{ul,dl}_fsm
The 2 types of TBF share some parts of the implementation, but actually half of the code is specific to one direction or another. Since FSM are becoming (and will become even) more complex, split the FSM implementation into 2 separate FSMs, one for each direction. The FSM interface is kept compatible (events and states), hence code can still operate on the tbfs on events and states which are shared.
Test output changes are mainly due to: * FSM instance now created in subclass constructor, so order of log lines during constructor of parent class and subclass slightly changes. * osmo_fsm doesn't allow having 2 FSM types with same name registered, hence the "TBF" name has to be changed to "DL_TBF" and "UL_TBF" for each FSM class. * FSM classes now use DTBFUL and DTBFDL instead of DTBF for logging. Some tests don't have those categories enabled, hence some log lines dissappear (it's actually fine we don't care about those in the test cases).
Change-Id: I879af3f4b3e330687d498cd59f5f4933d6ca56f0 --- M src/Makefile.am M src/pcu_vty_functions.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M src/tbf_dl.h A src/tbf_dl_fsm.c M src/tbf_fsm.c M src/tbf_fsm.h M src/tbf_ul.cpp M src/tbf_ul.h A src/tbf_ul_fsm.c M tests/alloc/AllocTest.err M tests/tbf/TbfTest.err M tests/types/TypesTest.err 15 files changed, 1,472 insertions(+), 100,908 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve pespin: Looks good to me, approved