Hello Harald Welte, Jenkins Builder, I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/3807 to look at the new patch set (#8). Simplify TS alloc: adjust allocator signatures * drop unused parameters (from both functions and structs) * document used parameters and return values * tighten types used for parameters * use consistent formatting Tests are adjusted accordingly but test results are left untouched to avoid regressions. Change-Id: I39d81ab64ff790b9c4c2d0312a574485cd83e755 Related: OS#2282 --- M src/bts.cpp M src/bts.h M src/gprs_rlcmac.h M src/gprs_rlcmac_ts_alloc.cpp M src/tbf.cpp M src/tbf.h M src/tbf_dl.cpp M tests/alloc/AllocTest.cpp M tests/tbf/TbfTest.cpp 9 files changed, 84 insertions(+), 91 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/07/3807/8 diff --git a/src/bts.cpp b/src/bts.cpp index b768569..1284f11 100644 --- a/src/bts.cpp +++ b/src/bts.cpp @@ -652,12 +652,11 @@ /* FIXME: Copy and paste with other routines.. */ if (is_11bit) { - tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, - ms_class, 1); + tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, ms_class, true); } else { /* set class to 0, since we don't know the multislot * class yet */ - tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, 0, 1); + tbf = tbf_alloc_ul_tbf(&m_bts, NULL, -1, 0, 0, true); } if (!tbf) { diff --git a/src/bts.h b/src/bts.h index d65cd2f..f15ca22 100644 --- a/src/bts.h +++ b/src/bts.h @@ -204,11 +204,9 @@ struct gsmtap_inst *gsmtap; uint32_t gsmtap_categ_mask; struct gprs_rlcmac_trx trx[8]; - int (*alloc_algorithm)(struct gprs_rlcmac_bts *bts, - struct GprsMs *ms, - struct gprs_rlcmac_tbf *tbf, uint32_t cust, uint8_t single, - int use_tbf); - uint32_t alloc_algorithm_curst; /* options to customize algorithm */ + int (*alloc_algorithm)(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, + bool single, int8_t use_tbf); + uint8_t force_two_phase; uint8_t alpha, gamma; uint8_t egprs_enabled; diff --git a/src/gprs_rlcmac.h b/src/gprs_rlcmac.h index be1e686..c16a954 100644 --- a/src/gprs_rlcmac.h +++ b/src/gprs_rlcmac.h @@ -21,6 +21,8 @@ #ifndef GPRS_RLCMAC_H #define GPRS_RLCMAC_H +#include <stdbool.h> + #ifdef __cplusplus #include <gsm_rlcmac.h> #include <gsm_timer.h> @@ -98,20 +100,14 @@ extern "C" { #endif -int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, - struct GprsMs *ms, - struct gprs_rlcmac_tbf *tbf, uint32_t cust, uint8_t single, - int use_trx); +int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, bool single, + int8_t use_trx); -int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, - struct GprsMs *ms, - struct gprs_rlcmac_tbf *tbf, uint32_t cust, uint8_t single, - int use_trx); +int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, bool single, + int8_t use_trx); -int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts, - struct GprsMs *ms, - struct gprs_rlcmac_tbf *tbf, uint32_t cust, uint8_t single, - int use_trx); +int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, bool single, + int8_t use_trx); #ifdef __cplusplus } #endif diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp index 57197b2..4ce2fa6 100644 --- a/src/gprs_rlcmac_ts_alloc.cpp +++ b/src/gprs_rlcmac_ts_alloc.cpp @@ -396,14 +396,19 @@ return tfi; } -/* Slot Allocation: Algorithm A +/*! Slot Allocation: Algorithm A * * Assign single slot for uplink and downlink + * + * \param[in,out] bts Pointer to BTS struct + * \param[in,out] ms_ Pointer to MS object + * \param[in,out] tbf_ Pointer to TBF struct + * \param[in] single flag indicating if we should force single-slot allocation + * \param[in] use_trx which TRX to use or -1 if it should be selected during allocation + * \returns negative error code or 0 on success */ -int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, - GprsMs *ms_, - struct gprs_rlcmac_tbf *tbf_, uint32_t cust, uint8_t single, - int use_trx) +int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, GprsMs *ms_, struct gprs_rlcmac_tbf *tbf_, bool single, + int8_t use_trx) { struct gprs_rlcmac_pdch *pdch; int ts = -1; @@ -796,15 +801,20 @@ return 0; } -/* Slot Allocation: Algorithm B +/*! Slot Allocation: Algorithm B * * Assign as many downlink slots as possible. * Assign one uplink slot. (With free USF) * + * \param[in,out] bts Pointer to BTS struct + * \param[in,out] ms_ Pointer to MS object + * \param[in,out] tbf_ Pointer to TBF struct + * \param[in] single flag indicating if we should force single-slot allocation + * \param[in] use_trx which TRX to use or -1 if it should be selected during allocation + * \returns negative error code or 0 on success */ -int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, - GprsMs *ms_, struct gprs_rlcmac_tbf *tbf_, - uint32_t cust, uint8_t single, int use_trx) +int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, GprsMs *ms_, struct gprs_rlcmac_tbf *tbf_, bool single, + int8_t use_trx) { uint8_t dl_slots; uint8_t ul_slots; @@ -1025,7 +1035,7 @@ return 0; } -/* Slot Allocation: Algorithm dynamic +/*! Slot Allocation: Algorithm dynamic * * This meta algorithm automatically selects on of the other algorithms based * on the current system state. @@ -1033,10 +1043,15 @@ * The goal is to support as many MS and TBF as possible. On low usage, the * goal is to provide the highest possible bandwidth per MS. * + * \param[in,out] bts Pointer to BTS struct + * \param[in,out] ms_ Pointer to MS object + * \param[in,out] tbf_ Pointer to TBF struct + * \param[in] single flag indicating if we should force single-slot allocation + * \param[in] use_trx which TRX to use or -1 if it should be selected during allocation + * \returns negative error code or 0 on success */ -int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts, - GprsMs *ms_, struct gprs_rlcmac_tbf *tbf_, - uint32_t cust, uint8_t single, int use_trx) +int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts, GprsMs *ms_, struct gprs_rlcmac_tbf *tbf_, bool single, + int8_t use_trx) { int rc; @@ -1048,7 +1063,7 @@ } if (!bts->multislot_disabled) { - rc = alloc_algorithm_b(bts, ms_, tbf_, cust, single, use_trx); + rc = alloc_algorithm_b(bts, ms_, tbf_, single, use_trx); if (rc >= 0) return rc; @@ -1057,8 +1072,7 @@ bts->multislot_disabled = 1; } - rc = alloc_algorithm_a(bts, ms_, tbf_, cust, single, use_trx); - return rc; + return alloc_algorithm_a(bts, ms_, tbf_, single, use_trx); } int gprs_alloc_max_dl_slots_per_ms(struct gprs_rlcmac_bts *bts, uint8_t ms_class) diff --git a/src/tbf.cpp b/src/tbf.cpp index 8e54157..fee4115 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -385,7 +385,7 @@ /* FIXME: Copy and paste with tbf_new_dl_assignment */ /* create new TBF, use same TRX as DL TBF */ /* use multislot class of downlink TBF */ - tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, ms_class, egprs_ms_class, 0); + tbf = tbf_alloc_ul_tbf(bts, ms, use_trx, ms_class, egprs_ms_class, false); if (!tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n"); /* FIXME: send reject */ @@ -489,8 +489,7 @@ return -EINVAL; tbf_unlink_pdch(this); - rc = bts_data->alloc_algorithm(bts_data, ms(), this, - bts_data->alloc_algorithm_curst, 0, -1); + rc = bts_data->alloc_algorithm(bts_data, ms(), this, false, -1); /* if no resource */ if (rc < 0) { LOGP(DRLCMAC, LOGL_ERROR, "No resource after update???\n"); @@ -752,9 +751,8 @@ LOGP(DRLCMAC, LOGL_ERROR, "- Poll Timeout, but no event!\n"); } -static int setup_tbf(struct gprs_rlcmac_tbf *tbf, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +static int setup_tbf(struct gprs_rlcmac_tbf *tbf, GprsMs *ms, int8_t use_trx, uint8_t ms_class, uint8_t egprs_ms_class, + bool single_slot) { int rc; struct gprs_rlcmac_bts *bts; @@ -769,8 +767,7 @@ tbf->m_created_ts = time(NULL); tbf->set_ms_class(ms_class); /* select algorithm */ - rc = bts->alloc_algorithm(bts, ms, tbf, bts->alloc_algorithm_curst, - single_slot, use_trx); + rc = bts->alloc_algorithm(bts, ms, tbf, single_slot, use_trx); /* if no resource */ if (rc < 0) { return -1; @@ -830,9 +827,8 @@ } } -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot) { struct gprs_rlcmac_ul_tbf *tbf; int rc; @@ -921,9 +917,8 @@ return 0; } -struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) +struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot) { struct gprs_rlcmac_dl_tbf *tbf; int rc; @@ -1314,9 +1309,8 @@ bts->tbf_reused(); - new_tbf = tbf_alloc_dl_tbf(bts->bts_data(), ms(), - this->trx->trx_no, ms_class(), - ms() ? ms()->egprs_ms_class() : 0, 0); + new_tbf = tbf_alloc_dl_tbf(bts->bts_data(), ms(), this->trx->trx_no, ms_class(), + ms() ? ms()->egprs_ms_class() : 0, false); if (!new_tbf) { LOGP(DRLCMAC, LOGL_NOTICE, "No PDCH resource\n"); diff --git a/src/tbf.h b/src/tbf.h index 95e1e89..8f92149 100644 --- a/src/tbf.h +++ b/src/tbf.h @@ -314,13 +314,11 @@ int8_t use_trx, uint8_t ms_class, uint8_t egprs_ms_class, uint32_t tlli, uint8_t ta, GprsMs *ms); -struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot); +struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot); -struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, - GprsMs *ms, int8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot); +struct gprs_rlcmac_dl_tbf *tbf_alloc_dl_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, uint8_t ms_class, + uint8_t egprs_ms_class, bool single_slot); void tbf_free(struct gprs_rlcmac_tbf *tbf); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 3d27883..cbde283 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -118,7 +118,7 @@ const uint8_t egprs_ms_class, struct gprs_rlcmac_dl_tbf **tbf) { - uint8_t ss; + bool ss; int8_t use_trx; uint16_t ta = GSM48_TA_INVALID; struct gprs_rlcmac_ul_tbf *ul_tbf = NULL, *old_ul_tbf; @@ -136,11 +136,11 @@ if (ul_tbf && ul_tbf->m_contention_resolution_done && !ul_tbf->m_final_ack_sent) { use_trx = ul_tbf->trx->trx_no; - ss = 0; + ss = false; old_ul_tbf = ul_tbf; } else { use_trx = -1; - ss = 1; /* PCH assignment only allows one timeslot */ + ss = true; /* PCH assignment only allows one timeslot */ old_ul_tbf = NULL; } diff --git a/tests/alloc/AllocTest.cpp b/tests/alloc/AllocTest.cpp index a88f477..13f3869 100644 --- a/tests/alloc/AllocTest.cpp +++ b/tests/alloc/AllocTest.cpp @@ -39,7 +39,7 @@ static gprs_rlcmac_tbf *tbf_alloc(struct gprs_rlcmac_bts *bts, GprsMs *ms, gprs_rlcmac_tbf_direction dir, uint8_t use_trx, - uint8_t ms_class, uint8_t egprs_ms_class, uint8_t single_slot) + uint8_t ms_class, uint8_t egprs_ms_class, bool single_slot) { if (dir == GPRS_RLCMAC_UL_TBF) return tbf_alloc_ul_tbf(bts, ms, use_trx, @@ -202,7 +202,7 @@ trx->pdch[6].enable(); trx->pdch[7].enable(); - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, 1); + ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, true); OSMO_ASSERT(ul_tbf); OSMO_ASSERT(ul_tbf->ms()); OSMO_ASSERT(ul_tbf->ms()->current_trx()); @@ -210,7 +210,7 @@ dump_assignment(ul_tbf, "UL"); /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); + dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, false); OSMO_ASSERT(dl_tbf); dump_assignment(dl_tbf, "DL"); @@ -244,7 +244,7 @@ trx->pdch[6].enable(); trx->pdch[7].enable(); - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, 1); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, true); dl_tbf->update_ms(0x23, GPRS_RLCMAC_DL_TBF); OSMO_ASSERT(dl_tbf); OSMO_ASSERT(dl_tbf->ms()); @@ -252,7 +252,7 @@ trx_no = dl_tbf->ms()->current_trx()->trx_no; dump_assignment(dl_tbf, "DL"); - ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, 0); + ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, false); ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); ul_tbf->m_contention_resolution_done = 1; OSMO_ASSERT(ul_tbf); @@ -294,7 +294,7 @@ tfi = the_bts.tfi_find_free(GPRS_RLCMAC_UL_TBF, &trx_no, -1); OSMO_ASSERT(tfi >= 0); - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, .1, ms_class, 0, 0); + ul_tbf = tbf_alloc_ul_tbf(bts, NULL, .1, ms_class, 0, false); OSMO_ASSERT(ul_tbf); OSMO_ASSERT(ul_tbf->ms()); OSMO_ASSERT(ul_tbf->ms()->current_trx()); @@ -302,7 +302,7 @@ dump_assignment(ul_tbf, "UL"); /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); + dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, false); OSMO_ASSERT(dl_tbf); dump_assignment(dl_tbf, "DL"); @@ -357,14 +357,14 @@ ENABLE_PDCH(6, ts6, trx); ENABLE_PDCH(7, ts7, trx); - ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, 1); + ul_tbf = tbf_alloc_ul_tbf(bts, NULL, -1, ms_class, 0, true); OSMO_ASSERT(ul_tbf->ms()); OSMO_ASSERT(ul_tbf->ms()->current_trx()); trx_no = ul_tbf->ms()->current_trx()->trx_no; OSMO_ASSERT(ul_tbf); /* assume final ack has not been sent */ - dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, 0); + dl_tbf = tbf_alloc_dl_tbf(bts, ul_tbf->ms(), trx_no, ms_class, 0, false); OSMO_ASSERT(dl_tbf); /* verify that both are on the same ts */ @@ -401,14 +401,14 @@ ENABLE_PDCH(6, ts6, trx); ENABLE_PDCH(7, ts7, trx); - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, 1); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, -1, ms_class, 0, true); OSMO_ASSERT(dl_tbf); OSMO_ASSERT(dl_tbf->ms()); OSMO_ASSERT(dl_tbf->ms()->current_trx()); trx_no = dl_tbf->ms()->current_trx()->trx_no; dl_tbf->update_ms(0x23, GPRS_RLCMAC_DL_TBF); - ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, 0); + ul_tbf = tbf_alloc_ul_tbf(bts, dl_tbf->ms(), trx_no, ms_class, 0, false); OSMO_ASSERT(ul_tbf); ul_tbf->update_ms(0x23, GPRS_RLCMAC_UL_TBF); ul_tbf->m_contention_resolution_done = 1; @@ -452,10 +452,8 @@ test_all_alloc_b(); } -typedef int (*algo_t)(struct gprs_rlcmac_bts *bts, - struct GprsMs *ms, - struct gprs_rlcmac_tbf *tbf, uint32_t cust, uint8_t single, - int use_trx); +typedef int (*algo_t)(struct gprs_rlcmac_bts *bts, struct GprsMs *ms, struct gprs_rlcmac_tbf *tbf, bool single, + int8_t use_trx); static char get_dir_char(uint8_t mask, uint8_t tx, uint8_t rx, uint8_t busy) { @@ -497,7 +495,7 @@ case TEST_MODE_UL_AND_DL: if (ms && ms->ul_tbf()) tbf_free(ms->ul_tbf()); - tbf = tbf_alloc_ul_tbf(bts, ms, trx_no, ms_class, 0, 0); + tbf = tbf_alloc_ul_tbf(bts, ms, trx_no, ms_class, 0, false); if (tbf == NULL) return NULL; break; @@ -506,7 +504,7 @@ case TEST_MODE_DL_AND_UL: if (ms && ms->dl_tbf()) tbf_free(ms->dl_tbf()); - tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, ms_class, 0, 0); + tbf = tbf_alloc_dl_tbf(bts, ms, trx_no, ms_class, 0, false); if (tbf == NULL) return NULL; } @@ -817,7 +815,7 @@ trx->pdch[6].enable(); trx->pdch[7].enable(); - dl_tbf1 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, 0); + dl_tbf1 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, false); OSMO_ASSERT(dl_tbf1); for (int i = 0; i < 8; i++) { @@ -827,7 +825,7 @@ OSMO_ASSERT(numTs1 == 4); printf("TBF1: numTs(%d)\n", numTs1); - dl_tbf2 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, 0); + dl_tbf2 = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, egprs_ms_class, false); OSMO_ASSERT(dl_tbf2); for (int i = 0; i < 8; i++) { diff --git a/tests/tbf/TbfTest.cpp b/tests/tbf/TbfTest.cpp index 0db7fde..43a6142 100644 --- a/tests/tbf/TbfTest.cpp +++ b/tests/tbf/TbfTest.cpp @@ -81,16 +81,12 @@ /* * Make a uplink and downlink allocation */ - gprs_rlcmac_tbf *dl_tbf = tbf_alloc_dl_tbf(the_bts.bts_data(), - NULL, - 0, 0, 0, 0); + gprs_rlcmac_tbf *dl_tbf = tbf_alloc_dl_tbf(the_bts.bts_data(), NULL, 0, 0, 0, false); OSMO_ASSERT(dl_tbf != NULL); dl_tbf->update_ms(0x2342, GPRS_RLCMAC_DL_TBF); dl_tbf->set_ta(4); - gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(the_bts.bts_data(), - dl_tbf->ms(), - 0, 0, 0, 0); + gprs_rlcmac_tbf *ul_tbf = tbf_alloc_ul_tbf(the_bts.bts_data(), dl_tbf->ms(), 0, 0, 0, false); OSMO_ASSERT(ul_tbf != NULL); ul_tbf->update_ms(0x2342, GPRS_RLCMAC_UL_TBF); @@ -170,7 +166,7 @@ tfi = the_bts->tfi_find_free(GPRS_RLCMAC_DL_TBF, &trx_no, -1); OSMO_ASSERT(tfi >= 0); - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, trx_no, ms_class, egprs_ms_class, 1); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, trx_no, ms_class, egprs_ms_class, true); dl_tbf->set_ta(0); check_tbf(dl_tbf); @@ -2209,7 +2205,7 @@ 1234, 1234, 1234, 1, 1, 0, 0, 0); /* Does no support EGPRS */ - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, 0, 0); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, 0, false); OSMO_ASSERT(dl_tbf != NULL); fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", dl_tbf->dl_slots(), @@ -2223,7 +2219,7 @@ bts->egprs_enabled = 1; /* Does support EGPRS */ - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, 0); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, false); OSMO_ASSERT(dl_tbf != NULL); fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", @@ -2267,7 +2263,7 @@ bts->egprs_enabled = 1; /* Does support EGPRS */ - dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, 1); + dl_tbf = tbf_alloc_dl_tbf(bts, NULL, 0, ms_class, ms_class, true); OSMO_ASSERT(dl_tbf != NULL); fprintf(stderr, "DL TBF slots: 0x%02x, N: %d, WS: %d\n", -- To view, visit https://gerrit.osmocom.org/3807 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I39d81ab64ff790b9c4c2d0312a574485cd83e755 Gerrit-PatchSet: 8 Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Owner: Max <msur...@sysmocom.de> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Holger Freyther <hol...@freyther.de> Gerrit-Reviewer: Jenkins Builder