This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25815 )
Change subject: ts_alloc: Rename s/tbf_/tbf/
......................................................................
ts_alloc: Rename s/tbf_/tbf/
My the top of my head: The tbf_ was kept during a previous refactoring
a while ago to avoid changing lots of more lines in the same patch.
Change-Id: I8ae689a272b7c4d244576ff157f6019a87041abc
---
M src/gprs_rlcmac_ts_alloc.cpp
1 file changed, 24 insertions(+), 26 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/15/25815/1
diff --git a/src/gprs_rlcmac_ts_alloc.cpp b/src/gprs_rlcmac_ts_alloc.cpp
index 3c16d8a..5b3b355 100644
--- a/src/gprs_rlcmac_ts_alloc.cpp
+++ b/src/gprs_rlcmac_ts_alloc.cpp
@@ -338,12 +338,12 @@
* Assign single slot for uplink and downlink
*
* \param[in,out] bts Pointer to BTS struct
- * \param[in,out] tbf_ Pointer to TBF struct
+ * \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, struct gprs_rlcmac_tbf *tbf_, bool single,
+int alloc_algorithm_a(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, bool single,
int8_t use_trx)
{
struct gprs_rlcmac_pdch *pdch;
@@ -354,8 +354,7 @@
int usf = -1;
uint8_t mask = 0xff;
const char *mask_reason = NULL;
- struct GprsMs *ms = tbf_->ms();
- const gprs_rlcmac_tbf *tbf = tbf_;
+ struct GprsMs *ms = tbf->ms();
gprs_rlcmac_trx *trx = ms_current_trx(ms);
LOGPAL(tbf, "A", single, use_trx, LOGL_DEBUG, "Alloc start\n");
@@ -404,24 +403,24 @@
pdch = &trx->pdch[ts];
- /* The allocation will be successful, so the system state and tbf_/ms_
+ /* The allocation will be successful, so the system state and tbf/ms
* may be modified from now on. */
if (tbf->direction == GPRS_RLCMAC_UL_TBF) {
- struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf_);
+ struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(tbf);
LOGPSL(tbf, LOGL_DEBUG, "Assign uplink TS=%d TFI=%d USF=%d\n", ts, tfi, usf);
assign_uplink_tbf_usf(pdch, ul_tbf, tfi, usf);
} else {
- struct gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf_);
+ struct gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf);
LOGPSL(tbf, LOGL_DEBUG, "Assign downlink TS=%d TFI=%d\n", ts, tfi);
assign_dlink_tbf(pdch, dl_tbf, tfi);
}
- tbf_->trx = trx;
+ tbf->trx = trx;
/* the only one TS is the common TS */
- tbf_->first_ts = tbf_->first_common_ts = ts;
+ tbf->first_ts = tbf->first_common_ts = ts;
ms_set_reserved_slots(ms, trx, 1 << ts, 1 << ts);
- tbf_->upgrade_to_multislot = false;
+ tbf->upgrade_to_multislot = false;
bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_ALGO_A);
return 0;
}
@@ -856,12 +855,12 @@
* Assign one uplink slot. (With free USF)
*
* \param[in,out] bts Pointer to BTS struct
- * \param[in,out] tbf_ Pointer to TBF struct
+ * \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, struct gprs_rlcmac_tbf *tbf_, bool single,
+int alloc_algorithm_b(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, bool single,
int8_t use_trx)
{
uint8_t dl_slots;
@@ -875,8 +874,7 @@
int usf[8] = {-1, -1, -1, -1, -1, -1, -1, -1};
int rc;
int tfi;
- struct GprsMs *ms = tbf_->ms();
- const gprs_rlcmac_tbf *tbf = tbf_;
+ struct GprsMs *ms = tbf->ms();
gprs_rlcmac_trx *trx;
LOGPAL(tbf, "B", single, use_trx, LOGL_DEBUG, "Alloc start\n");
@@ -942,28 +940,28 @@
}
if (single && slotcount) {
- tbf_->upgrade_to_multislot = (avail_count > slotcount);
+ tbf->upgrade_to_multislot = (avail_count > slotcount);
LOGPAL(tbf, "B", single, use_trx, LOGL_INFO, "using single slot at TS %d\n", first_ts);
} else {
- tbf_->upgrade_to_multislot = false;
+ tbf->upgrade_to_multislot = false;
LOGPAL(tbf, "B", single, use_trx, LOGL_INFO, "using %d slots\n", slotcount);
}
- /* The allocation will be successful, so the system state and tbf_/ms_
+ /* The allocation will be successful, so the system state and tbf/ms
* may be modified from now on. */
/* Step 4: Update MS and TBF and really allocate the resources */
update_ms_reserved_slots(trx, ms, reserved_ul_slots, reserved_dl_slots, ul_slots, dl_slots);
- tbf_->trx = trx;
- tbf_->first_common_ts = first_common_ts;
- tbf_->first_ts = first_ts;
+ tbf->trx = trx;
+ tbf->first_common_ts = first_common_ts;
+ tbf->first_ts = first_ts;
if (tbf->direction == GPRS_RLCMAC_DL_TBF)
- assign_dl_tbf_slots(as_dl_tbf(tbf_), trx, dl_slots, tfi);
+ assign_dl_tbf_slots(as_dl_tbf(tbf), trx, dl_slots, tfi);
else
- assign_ul_tbf_slots(as_ul_tbf(tbf_), trx, ul_slots, tfi, usf);
+ assign_ul_tbf_slots(as_ul_tbf(tbf), trx, ul_slots, tfi, usf);
bts_do_rate_ctr_inc(bts, CTR_TBF_ALLOC_ALGO_B);
@@ -979,12 +977,12 @@
* goal is to provide the highest possible bandwidth per MS.
*
* \param[in,out] bts Pointer to BTS struct
- * \param[in,out] tbf_ Pointer to TBF struct
+ * \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, struct gprs_rlcmac_tbf *tbf_, bool single,
+int alloc_algorithm_dynamic(struct gprs_rlcmac_bts *bts, struct gprs_rlcmac_tbf *tbf, bool single,
int8_t use_trx)
{
int rc;
@@ -997,7 +995,7 @@
}
if (!bts->multislot_disabled) {
- rc = alloc_algorithm_b(bts, tbf_, single, use_trx);
+ rc = alloc_algorithm_b(bts, tbf, single, use_trx);
if (rc >= 0)
return rc;
@@ -1006,7 +1004,7 @@
bts->multislot_disabled = 1;
}
- return alloc_algorithm_a(bts, tbf_, single, use_trx);
+ return alloc_algorithm_a(bts, tbf, single, use_trx);
}
int gprs_alloc_max_dl_slots_per_ms(const struct gprs_rlcmac_bts *bts, uint8_t ms_class)
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25815
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I8ae689a272b7c4d244576ff157f6019a87041abc
Gerrit-Change-Number: 25815
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211018/177caa71/attachment.htm>