Feature #5132
closedGet rid of gprs_rlcmac_bts lists: ul_tbfs, dl_tbfs
0%
Description
Since a while ago, osmo-pcu code architecture was refactored so that tbf objects are always assigned to a GprsMS object.
However, gprs_rlcmac_bts still manages 2 lists of tbfs directly, on top of the ms_list, as heritage from old code.
struct gprs_rlcmac_bts { ... struct GprsMsStorage *ms_store; ... /* list of uplink TBFs */ struct llist_head ul_tbfs; /* list of gprs_rlcmac_tbf */ /* list of downlink TBFs */ struct llist_head dl_tbfs; /* list of gprs_rlcmac_tbf */ ...
Nowadays, those lists are seldom used, and we can get rid of the few places where it is used by using the ms_list indirectly to access the TBFs. This way, we simplify the code furthermore.
The lists are mainly being used in 3 places nowadays:
(A) src/pcu_vty_functions.cpp 110: llist_for_each_entry(iter, &bts->ul_tbfs, list) { (B) src/gprs_rlcmac_sched.cpp 51: llist_for_each_entry(pos, &bts->ul_tbfs, list) { (C) src/bts.cpp 349: &bts->ul_tbfs,
(A): pcu_vty_show_tbf_all() > Can be easily changed to iterate over MS, and then print ms>ul_tbf and ms->dl_tbf
(B): get_tbf_candidates() > Same, can be easily changed to iterate over MS, then over ms>ul_tbf or ms->dl_tbf
(C): bts_add_paging() -> I still need to figure out what/how does this work, but should be feasible to move it to the ms_list too.