mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-pcu.git
synced 2025-11-02 13:13:31 +00:00
alloc_algo: Move printing outside of update_ms_reserved_slots()
Change-Id: I0d8838829c519bb6da8a68d62947b98bab35a39f
This commit is contained in:
@@ -773,22 +773,14 @@ static int allocate_usf(const gprs_rlcmac_trx *trx, uint8_t selected_ul_slots, u
|
||||
* \param[in] tbf_ Pointer to TBF struct
|
||||
* \param[in] res_ul_slots Newly reserved UL slots
|
||||
* \param[in] res_dl_slots Newly reserved DL slots
|
||||
* \param[in] ul_slots available UL slots (for logging only)
|
||||
* \param[in] dl_slots available DL slots (for logging only)
|
||||
*/
|
||||
static void update_ms_reserved_slots(gprs_rlcmac_trx *trx, GprsMs *ms, uint8_t res_ul_slots, uint8_t res_dl_slots,
|
||||
uint8_t ul_slots, uint8_t dl_slots)
|
||||
static void update_ms_reserved_slots(gprs_rlcmac_trx *trx, GprsMs *ms, uint8_t res_ul_slots, uint8_t res_dl_slots)
|
||||
{
|
||||
char slot_info[9] = { 0 };
|
||||
|
||||
if (res_ul_slots == ms_reserved_ul_slots(ms) && res_dl_slots == ms_reserved_dl_slots(ms))
|
||||
return;
|
||||
|
||||
/* The reserved slots have changed, update the MS */
|
||||
ms_set_reserved_slots(ms, trx, res_ul_slots, res_dl_slots);
|
||||
|
||||
ts_format(slot_info, dl_slots, ul_slots);
|
||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Reserved DL/UL slots: (TS=0)\"%s\"(TS=7)\n", slot_info);
|
||||
}
|
||||
|
||||
/*! Assign given UL timeslots to UL TBF
|
||||
@@ -857,6 +849,7 @@ int alloc_algorithm_b(const struct alloc_resources_req *req)
|
||||
int rc;
|
||||
int tfi;
|
||||
gprs_rlcmac_trx *trx;
|
||||
char slot_info[9] = { 0 };
|
||||
struct gprs_rlcmac_pdch *first_common_ts = ms_first_common_ts(req->ms);
|
||||
|
||||
LOGPAL(req, "B", LOGL_DEBUG, "Alloc start\n");
|
||||
@@ -927,12 +920,15 @@ int alloc_algorithm_b(const struct alloc_resources_req *req)
|
||||
LOGPAL(req, "B", LOGL_INFO, "using %d slots\n", slotcount);
|
||||
}
|
||||
|
||||
ts_format(slot_info, dl_slots, ul_slots);
|
||||
LOGP(DRLCMAC, LOGL_DEBUG, "- Available DL/UL slots: (TS=0)\"%s\"(TS=7)\n", slot_info);
|
||||
|
||||
/* 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, req->ms, reserved_ul_slots, reserved_dl_slots, ul_slots, dl_slots);
|
||||
update_ms_reserved_slots(trx, req->ms, reserved_ul_slots, reserved_dl_slots);
|
||||
ms_set_first_common_ts(req->ms, first_common_ts);
|
||||
req->tbf->trx = trx;
|
||||
|
||||
|
||||
@@ -4159,7 +4159,7 @@ Slot Allocation (Algorithm B) for class 12
|
||||
Rx=4 Tx=4 Sum Rx+Tx=5, Tta=2 Ttb=1, Tra=2 Trb=1, Type=1
|
||||
Selected DL slots: (TS=0)"..DDDD.."(TS=7), multi
|
||||
[DL] algo B <multi> (suggested TRX: 0): using 4 slots
|
||||
- Reserved DL/UL slots: (TS=0)"..DDCD.."(TS=7)
|
||||
- Available DL/UL slots: (TS=0)"..DDCD.."(TS=7)
|
||||
- Assigning DL TS 2
|
||||
PDCH(bts=0,trx=0,ts=2) Attaching TBF(DL:TFI-0-0-0:STATE-NEW:GPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
- Assigning DL TS 3
|
||||
@@ -4205,7 +4205,7 @@ Slot Allocation (Algorithm B) for class 12
|
||||
Rx=4 Tx=4 Sum Rx+Tx=5, Tta=2 Ttb=1, Tra=2 Trb=1, Type=1
|
||||
Selected DL slots: (TS=0)"..DDDD.."(TS=7), multi
|
||||
[DL] algo B <multi> (suggested TRX: 0): using 4 slots
|
||||
- Reserved DL/UL slots: (TS=0)"..DDCD.."(TS=7)
|
||||
- Available DL/UL slots: (TS=0)"..DDCD.."(TS=7)
|
||||
- Assigning DL TS 2
|
||||
PDCH(bts=0,trx=0,ts=2) Attaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
- Assigning DL TS 3
|
||||
@@ -7551,7 +7551,7 @@ Slot Allocation (Algorithm B) for class 11
|
||||
Rx=4 Tx=3 Sum Rx+Tx=5, Tta=3 Ttb=1, Tra=2 Trb=1, Type=1
|
||||
Selected DL slots: (TS=0)"..ddDd.."(TS=7), single
|
||||
[DL] algo B <single> (suggested TRX: 0): using single slot at TS 4
|
||||
- Reserved DL/UL slots: (TS=0)"...DC..."(TS=7)
|
||||
- Available DL/UL slots: (TS=0)"...DC..."(TS=7)
|
||||
- Assigning DL TS 4
|
||||
PDCH(bts=0,trx=0,ts=4) Attaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS) Setting Control TS PDCH(bts=0,trx=0,ts=4)
|
||||
@@ -7567,6 +7567,7 @@ PDCH(bts=0,trx=0,ts=4) Detaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs
|
||||
Found first unallocated TRX=0 TFI=0
|
||||
Selected DL slots: (TS=0)"..DDDD.."(TS=7), multi
|
||||
[DL] algo B <multi> (suggested TRX: -1): using 4 slots
|
||||
- Available DL/UL slots: (TS=0)"..DDCD.."(TS=7)
|
||||
- Assigning DL TS 2
|
||||
PDCH(bts=0,trx=0,ts=2) Attaching TBF(DL:TFI-0-0-0:STATE-NEW:EGPRS), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
- Assigning DL TS 3
|
||||
@@ -9976,7 +9977,7 @@ Rx=4 Tx=3 Sum Rx+Tx=5, Tta=3 Ttb=1, Tra=2 Trb=1, Type=1
|
||||
- Skipping TS 6, because num TBFs 0 >= 0
|
||||
Selected DL slots: (TS=0)".ddd.D.."(TS=7), single
|
||||
[DL] algo B <single> (suggested TRX: -1): using single slot at TS 5
|
||||
- Reserved DL/UL slots: (TS=0)"..D..CU."(TS=7)
|
||||
- Available DL/UL slots: (TS=0)"..D..CU."(TS=7)
|
||||
- Assigning DL TS 5
|
||||
PDCH(bts=0,trx=1,ts=5) Attaching TBF(DL:TFI-0-1-0:STATE-NEW:GPRS:IMSI-001001000000001:TLLI-0xa3c2f953), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
TBF(DL:TFI-0-1-0:STATE-NEW:GPRS:IMSI-001001000000001:TLLI-0xa3c2f953) Setting Control TS PDCH(bts=0,trx=1,ts=5)
|
||||
@@ -10014,7 +10015,7 @@ Rx=4 Tx=4 Sum Rx+Tx=5, Tta=2 Ttb=1, Tra=2 Trb=1, Type=1
|
||||
- Skipping TS 3, because num TBFs 0 >= 0
|
||||
Selected UL slots: (TS=0)"..U.uu.."(TS=7), single
|
||||
[UL] algo B <single> (suggested TRX: 0): using single slot at TS 2
|
||||
- Reserved DL/UL slots: (TS=0)"..C.DDD."(TS=7)
|
||||
- Available DL/UL slots: (TS=0)"..C.DDD."(TS=7)
|
||||
- Assigning UL TS 2
|
||||
PDCH(bts=0,trx=0,ts=2) Attaching TBF(UL:TFI-0-0-0:STATE-NEW:GPRS:TLLI-0xecc1f953), 1 TBFs, USFs = 01, TFIs = 00000001.
|
||||
TBF(UL:TFI-0-0-0:STATE-NEW:GPRS:TLLI-0xecc1f953) Setting Control TS PDCH(bts=0,trx=0,ts=2)
|
||||
@@ -10047,6 +10048,7 @@ DL_TBF{NEW}: Allocated
|
||||
Found first unallocated TRX=0 TFI=0
|
||||
Selected DL slots: (TS=0)".DDDddd."(TS=7), multi
|
||||
[DL] algo B <multi> (suggested TRX: 0): using 3 slots
|
||||
- Available DL/UL slots: (TS=0)"..C.DDD."(TS=7)
|
||||
- Assigning DL TS 1
|
||||
PDCH(bts=0,trx=0,ts=1) Attaching TBF(DL:TFI-0-0-0:STATE-NEW:GPRS:IMSI-001001000000001:TLLI-0xecc1f953), 1 TBFs, USFs = 00, TFIs = 00000001.
|
||||
- Assigning DL TS 2
|
||||
|
||||
Reference in New Issue
Block a user