diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-20 20:10:53 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2023-04-26 13:28:55 +0200 |
commit | d6c555ebd6df69e8ef712ea0a7f559ef9a61d4d2 (patch) | |
tree | ffda4babad9a4d32b023ff373c19bf3efe1e74bd /src/tbf_ul.h | |
parent | a42b174beca450ee667d597f87db6a62cdd9d853 (diff) |
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
Diffstat (limited to 'src/tbf_ul.h')
-rw-r--r-- | src/tbf_ul.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tbf_ul.h b/src/tbf_ul.h index aa54c8fb..5ef84655 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -60,6 +60,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { gprs_rlcmac_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms); ~gprs_rlcmac_ul_tbf(); gprs_rlc_window *window(); + void apply_allocated_resources(const struct alloc_resources_res *res); /* blocks were acked */ int rcv_data_block_acknowledged( const struct gprs_rlc_data_info *rlc, |