Commit Graph

5 Commits

Author SHA1 Message Date
Vadim Yanitskiy 5fd0022b62 copyright: fix typo: sysmocom s/s.m.f.c./s.f.m.c./ GmbH
Change-Id: If51895e67271c0913e000ff9d28db8d8fe761201
2023-05-18 17:22:26 +07:00
Pau Espin d6c555ebd6 Move out of alloc_algo code modifying the data model
This way the alloc_algo() becomes idempotent, simplifying implementation
of new alloc_algos as well as rolling back if allocation fails (for
instance because some resource is exhausted at the time).

For now the code applying the results is moved to tbf::alloc_algo(), but
it will eventually get out of tbf code, so that the MS object is
responsible for running it. As a result, there's no even need to create
TBF object before trying to allocate resources, which will help furher in
rollback operations described above.

Change-Id: I5ffd00f5f80bde4b73b78db44896f65e70e12b20
2023-04-26 13:28:55 +02:00
Pau Espin a42b174bec alloc_algo: Move printing outside of update_ms_reserved_slots()
Change-Id: I0d8838829c519bb6da8a68d62947b98bab35a39f
2023-04-21 14:43:30 +02:00
Pau Espin a6a972e11e alloc_algo: Pass a struct containing all req params
This is a first step towards isolating the allocation algorithm from
applying changes on PCU state.
In next steps the tbf pointer will be dropped and the allocation
algorithm will only result a "result" struct which then the caller can
apply to whatever TBF object it requires.

Change-Id: Ie4d9ace526ad012d97738bc55bdb5cc1472c632d
2023-04-21 14:43:30 +02:00
Pau Espin ff7c581011 Rename gprs_rlcmac_ts_alloc.cpp -> alloc_algo.cpp & create own .h file
First commit towards trying to have alloc algorithm as isolated as
possible from others parts of the code trying to avoid state changes on
data structures.
Change name also because the alloc_algo not only allocated TS, but TFIs
and USFs.

Change-Id: I33a6c178c64a769f05d3880a69c38acb154afa62
2022-12-16 12:08:07 +01:00