Project

General

Profile

Actions

Feature #5132

closed

Get rid of gprs_rlcmac_bts lists: ul_tbfs, dl_tbfs

Added by pespin almost 3 years ago. Updated almost 3 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
04/26/2021
Due date:
% Done:

0%

Spec Reference:

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.

Actions #1

Updated by pespin almost 3 years ago

There's a gprs_rlcmac_tbf::rotate_in_list() I missed, which is used in gprs_rlcmac_sched.cpp to move the tbf of the selected ctrl to the end of the list of tbf to avoid selecting always with higher prio the first tbfs in the list in get_ctrl_msg_tbf_candidates().


void gprs_rlcmac_tbf::rotate_in_list()
{
    llist_del(tbf_bts_list((struct gprs_rlcmac_tbf *)this));
    if (direction == GPRS_RLCMAC_UL_TBF)
        llist_add(tbf_bts_list((struct gprs_rlcmac_tbf *)this), &bts->ul_tbfs);
    else
        llist_add(tbf_bts_list((struct gprs_rlcmac_tbf *)this), &bts->dl_tbfs);
}
Actions #2

Updated by pespin almost 3 years ago

WIP patch available in osmo-pcu.git branch "pespin/tbf-list".

Actions #3

Updated by pespin almost 3 years ago

We may want to keep the tbf_list for reasons exposed above, but move it to the bts_trx structure, as Holger suggests in #1541.

Actions #4

Updated by Hoernchen almost 3 years ago

Since #1541 was solved, is there still something to do here?

Actions #5

Updated by pespin almost 3 years ago

  • Status changed from New to Rejected

Let's leave the list as it is since I didn't find a quick good way to get rid of it.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)