pdch_ulc: Support picking RRBP other than N+13

Current algo always tries to sched RRBP the soonest possible.

Related: OS#5020
Change-Id: Ic6ddeea70e1f914cf423d0daab8fc492d0c992e2
changes/22/23522/3
Pau Espin 2 years ago
parent ce3bd2522a
commit 50a1ede693
  1. 6
      src/pcu_utils.h
  2. 45
      src/pdch_ul_controller.c
  3. 8
      src/pdch_ul_controller.h
  4. 36
      tests/tbf/TbfTest.err
  5. 60
      tests/ulc/PdchUlcTest.cpp
  6. 15
      tests/ulc/PdchUlcTest.err
  7. 19
      tests/ulc/PdchUlcTest.ok

@ -57,6 +57,12 @@ static inline unsigned fn2bn(unsigned fn)
return (fn % 52) / 4;
}
static inline bool fn_valid(uint32_t fn)
{
uint32_t f = fn % 13;
return f == 0 || f == 4 || f == 8;
}
static inline unsigned fn_next_block(unsigned fn)
{
unsigned bn = fn2bn(fn) + 1;

@ -112,20 +112,43 @@ bool pdch_ulc_fn_is_free(struct pdch_ulc *ulc, uint32_t fn)
return !pdch_ulc_get_node(ulc, fn);
}
struct rrbp_opt {
uint8_t offset;
enum rrbp_field coding;
};
int pdch_ulc_get_next_free_rrbp_fn(struct pdch_ulc *ulc, uint32_t fn, uint32_t *poll_fn, unsigned int *rrbp)
{
/* TODO: support other RRBP offsets, see TS 44.060 able 10.4.5.1 */
uint32_t new_poll_fn = next_fn(fn, 13);
if (!pdch_ulc_fn_is_free(ulc, new_poll_fn)) {
LOGPDCH(ulc->pdch, DRLCMAC, LOGL_ERROR, "Polling is already scheduled "
"for single block allocation at FN=%u\n", fn);
return -EBUSY;
}
*poll_fn = new_poll_fn;
*rrbp = 0;
uint8_t i;
static const struct rrbp_opt rrbp_list[] = {
{ 13, RRBP_N_plus_13 },
{ 17, RRBP_N_plus_17_18 },
{ 18, RRBP_N_plus_17_18 },
{ 21, RRBP_N_plus_21_22 },
{ 22, RRBP_N_plus_21_22 },
{ 26, RRBP_N_plus_26 },
};
for (i = 0; i < ARRAY_SIZE(rrbp_list); i++) {
uint32_t new_poll_fn = next_fn(fn, rrbp_list[i].offset);
if (!fn_valid(new_poll_fn))
continue;
if (pdch_ulc_fn_is_free(ulc, new_poll_fn)) {
LOGPDCH(ulc->pdch, DRLCMAC, LOGL_DEBUG, "POLL scheduled at FN %" PRIu32
" + %" PRIu8 " = %" PRIu32 "\n",
fn, rrbp_list[i].offset, new_poll_fn);
*poll_fn = new_poll_fn;
*rrbp = (unsigned int)rrbp_list[i].coding;
return 0;
}
LOGPDCH(ulc->pdch, DRLCMAC, LOGL_DEBUG, "UL block already scheduled at FN %" PRIu32
" + %" PRIu8 " = %" PRIu32 "\n",
fn, rrbp_list[i].offset, new_poll_fn);
return 0;
}
LOGPDCH(ulc->pdch, DRLCMAC, LOGL_ERROR, "FN=%" PRIu32 " "
"Failed allocating POLL, all RRBP values are already reserved!\n", fn);
return -EBUSY;
}
/* Get next free (unreserved) FN which is not located in time before "start_fn" */

@ -30,6 +30,14 @@ struct gprs_rlcmac_tbf;
struct gprs_rlcmac_ul_tbf;
struct gprs_rlcmac_sba;
/* RRBP offsets, see TS 44.060 able 10.4.5.1 */
enum rrbp_field {
RRBP_N_plus_13 = 0x0,
RRBP_N_plus_17_18 = 0x1,
RRBP_N_plus_21_22 = 0x2,
RRBP_N_plus_26 = 0x3,
};
struct pdch_ulc {
struct gprs_rlcmac_pdch *pdch; /* back pointer */
uint32_t last_fn; /* last FN rx from TDMA clock */

@ -64,6 +64,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -153,6 +154,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -242,6 +244,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) appending 200 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -1544,6 +1547,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=2654270
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -1628,6 +1632,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=2654270
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -1679,6 +1684,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) starting timer T0 [assignment (PA
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) appending 10 bytes
Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 1
Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654275 + 13 = 2654288
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Downlink Assignment -------------------------
@ -1715,6 +1721,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) need_padding 0 spb_status 0 spb
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying data unit 0 (BSN 0)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654279 + 13 = 2654292
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654292, TS=7)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 5 sec. 0 microsec, cur_fn=2654288
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654292, TS=7
@ -1735,6 +1742,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) need_padding 0 spb_status 0 spb
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying data unit 0 (BSN 0)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduling Ack/Nack polling, because polling timed out.
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654296 + 13 = 2654309
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654309, TS=7)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) restarting timer T3191 [final block (DL-TBF)] with 5 sec. 0 microsec, cur_fn=2654292
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654309, TS=7
@ -1780,6 +1788,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) poll timeout for FN=2654309, TS
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Timeout for polling PACKET DOWNLINK ACK: |Assignment was on PACCH|No downlink ACK received yet|
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) N3105 1 => 2 (< MAX 8)
Received RTS for PDCH: TRX=0 TS=7 FN=2654348 block_nr=2 scheduling USF=0 for required uplink resource of UL TFI=0
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654348 + 13 = 2654361
TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -1851,6 +1860,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/0, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: CS-1 -> CS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -1937,6 +1947,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=2654327
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654327 + 13 = 2654340
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -1997,6 +2008,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/0, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: CS-1 -> CS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -2144,6 +2156,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/0, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: CS-1 -> CS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -2235,6 +2248,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) appending 13 bytes
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) appending 13 bytes
Old MS: TLLI = 0xf1223344, TA = 7, IMSI = 0011223344, LLC = 40
Received RTS for PDCH: TRX=0 TS=7 FN=2654275 block_nr=9 scheduling USF=0 for required uplink resource of UL TFI=0
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654275 + 13 = 2654288
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Downlink Assignment -------------------------
@ -2649,6 +2663,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) need_padding 0 spb_status 0 spb 0 (
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) Copying data unit 0 (BSN 20)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) Scheduling Ack/Nack polling, because 20 blocks sent.
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654366 + 13 = 2654379
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) Scheduled DL Acknowledgement polling on PACCH (FN=2654379, TS=7)
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) Scheduled Ack/Nack polling on FN=2654379, TS=7
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FLOW) msg block (BSN 20, CS-1): 0f 00 28 16 35 45 54 20 32 38 4c 4c 43 20 50 41 43 4b 45 54 20 32 39
@ -2897,6 +2912,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=RELEASING) N3101 21 => 22 (< MAX 10)
PDCH(bts=0,trx=0,ts=7) Expiring FN=2654379 but previous FN=2654374 is still reserved!
PDCH(bts=0,trx=0,ts=7) Timeout for registered USF (FN=2654374): TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=RELEASING)
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=RELEASING) N3101 22 => 23 (< MAX 10)
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654400 + 13 = 2654413
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=ASSIGN) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Downlink Assignment -------------------------
@ -3118,6 +3134,7 @@ TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) need_padding 0 spb_status 0 spb
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Copying data unit 0 (BSN 10)
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654448 + 13 = 2654461
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled DL Acknowledgement polling on PACCH (FN=2654461, TS=7)
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) starting timer T3191 [final block (DL-TBF)] with 5 sec. 0 microsec, cur_fn=2654413
TBF(TFI=1 TLLI=0xf1223344 DIR=DL STATE=FINISHED) Scheduled Ack/Nack polling on FN=2654461, TS=7
@ -3268,6 +3285,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [alloc
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/1, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: MCS-1 -> MCS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -3360,6 +3378,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [alloc
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/1, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: MCS-1 -> MCS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -3573,6 +3592,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -3886,6 +3906,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -4149,6 +4170,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -4362,6 +4384,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -4555,6 +4578,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -4728,6 +4752,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -4871,6 +4896,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -5021,6 +5047,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -5160,6 +5187,7 @@ TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes DL ASS state from GPR
TBF(TFI=0 TLLI=0xffffffff DIR=DL STATE=NULL EGPRS) changes state from NULL to FLOW
The MS object cannot fully confirm an unexpected TLLI: 0xffeeddcc, partly confirmed
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) appending 10 bytes
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 0 + 13 = 13
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) New and old TBF are the same.
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
@ -5472,6 +5500,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) need_padding 0 spb_status 0 s
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 0 (BSN 1)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 8 + 13 = 21
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled DL Acknowledgement polling on UNKNOWN (FN=21, TS=4)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled Ack/Nack polling on FN=21, TS=4
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) msg block (BSN 1, MCS-5): 0f 40 00 08 d6 3f 4e 8e ce 0e 4f 8f cf 0f 50 90 d0 10 51 91 d1 11 52 92 d2 12 53 93 d3 13 54 94 d4 14 55 95 d5 15 56 96 d6 16 57 97 d7 17 58 98 d8 d8 ca ca ca ca ca ca ca ca ca 0a
@ -5549,6 +5578,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) need_padding 0 spb_status 0 s
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying 1 RLC blocks, 1 BSNs
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 0 (BSN 1)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 8 + 13 = 21
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled DL Acknowledgement polling on UNKNOWN (FN=21, TS=4)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled Ack/Nack polling on FN=21, TS=4
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) msg block (BSN 1, MCS-6): 0f 40 00 00 cd bf d2 12 53 93 d3 13 54 94 d4 14 55 95 d5 15 56 96 d6 16 57 97 d7 17 58 98 d8 d8 ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca ca 0a
@ -5621,6 +5651,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying 2 RLC blocks, 2 BSNs
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 0 (BSN 0)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 1 (BSN 1)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 4 + 13 = 17
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled DL Acknowledgement polling on UNKNOWN (FN=17, TS=4)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled Ack/Nack polling on FN=17, TS=4
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) msg block (BSN 0, MCS-7): 0f 00 00 02 a0 01 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c 40 44 48 4c 50 54 58 5c 60 64 68 6c 70 74 78 7c 80 84 88 8c 90 94 98 9c a0 a4 a8 ac b0 b4 b8 bc c0 c4 c8 cc d0 d4 d8 dc 80 f5 8f 93 a3 b3 c3 d3 e3 f3 03 14 24 34 44 54 64 74 84 94 a4 b4 c4 d4 e4 f4 04 15 25 35 45 55 65 75 85 95 a5 b5 c5 d5 e5 f5 05 16 26 36 b6 b2 b2 b2 b2 b2 b2 b2 b2 b2 02
@ -5697,6 +5728,7 @@ TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying 2 RLC blocks, 2 BSNs
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 0 (BSN 0)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Copying data unit 1 (BSN 1)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduling Ack/Nack polling, because it was requested explicitly (e.g. first final block sent).
PDCH(bts=0,trx=0,ts=4) POLL scheduled at FN 4 + 13 = 17
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled DL Acknowledgement polling on UNKNOWN (FN=17, TS=4)
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) Scheduled Ack/Nack polling on FN=17, TS=4
TBF(TFI=0 TLLI=0xffeeddcc DIR=DL STATE=FLOW EGPRS) msg block (BSN 0, MCS-9): 0f 00 00 02 00 01 04 08 0c 10 14 18 1c 20 24 28 2c 30 34 38 3c 40 44 48 4c 50 54 58 5c 60 64 68 6c 70 74 78 7c 80 84 88 8c 90 94 98 9c a0 a4 a8 ac b0 b4 b8 bc c0 c4 c8 cc d0 d4 d8 dc e0 e4 e8 ec f0 f4 f8 fc 00 05 09 0d 11 15 19 1d 21 25 41 f3 af b4 c4 d4 e4 f4 04 15 25 35 45 55 65 75 85 95 a5 b5 c5 d5 e5 f5 05 16 26 36 b6 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 b2 02
@ -6027,6 +6059,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [alloc
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/1, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: MCS-1 -> MCS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -6192,6 +6225,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [alloc
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/1, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: MCS-1 -> MCS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -6517,6 +6551,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [alloc
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS(TLLI=0xf1223344, IMSI=, TA=7, 1/1, UL) Link quality 12dB (old 12dB) left window [-256, 6], modifying uplink CS level: MCS-1 -> MCS-2
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654270 + 13 = 2654283
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) start Packet Uplink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Uplink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Uplink Assignment -------------------------
@ -7295,6 +7330,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) Scheduling Ack/Nack, because
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_NONE to GPRS_RLCMAC_UL_ACK_SEND_ACK
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=FLOW EGPRS) changes UL ACK state from GPRS_RLCMAC_UL_ACK_SEND_ACK to GPRS_RLCMAC_UL_ACK_NONE
Received RTS for PDCH: TRX=0 TS=7 FN=2654279 block_nr=10 scheduling USF=0 for required uplink resource of UL TFI=0
PDCH(bts=0,trx=0,ts=7) POLL scheduled at FN 2654279 + 13 = 2654292
TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=ASSIGN EGPRS) start Packet Downlink Assignment (PACCH)
+++++++++++++++++++++++++ TX : Packet Downlink Assignment +++++++++++++++++++++++++
------------------------- TX : Packet Downlink Assignment -------------------------

@ -236,6 +236,64 @@ static void test_next_free_fn_sba()
printf("=== end: %s ===\n", __FUNCTION__);
}
static void test_next_free_fn_rrbp()
{
printf("=== start: %s ===\n", __FUNCTION__);
struct gprs_rlcmac_bts *bts = bts_alloc(the_pcu, 0);
struct gprs_rlcmac_pdch *pdch = &bts->trx[0].pdch[0];
struct gprs_rlcmac_sba *sba1;
uint32_t poll_fn, curr_fn;
unsigned int rrbp;
int rc;
rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, 26, &poll_fn, &rrbp);
OSMO_ASSERT(rc == 0);
OSMO_ASSERT(poll_fn == 26+13);
OSMO_ASSERT(rrbp == RRBP_N_plus_13);
pdch->last_rts_fn = 52;
printf("*** ALLOC 1 SBA FN=%" PRIu32 ":\n", pdch->last_rts_fn);
sba1 = sba_alloc(bts, pdch, 0); (void)sba1;
print_ulc_nodes(pdch->ulc);
curr_fn = sba1->fn - 13;
rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, curr_fn, &poll_fn, &rrbp);
OSMO_ASSERT(rc == 0);
printf("***NEXT FREE RRBP FN=%" PRIu32 ":\n", poll_fn);
OSMO_ASSERT(poll_fn == (curr_fn+17) || poll_fn == (curr_fn+18));
OSMO_ASSERT(rrbp == RRBP_N_plus_17_18);
pdch->last_rts_fn = fn_next_block(pdch->last_rts_fn);
printf("*** ALLOC 1 SBA FN=%" PRIu32 ":\n", pdch->last_rts_fn);
sba1 = sba_alloc(bts, pdch, 0); (void)sba1;
print_ulc_nodes(pdch->ulc);
rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, curr_fn, &poll_fn, &rrbp);
OSMO_ASSERT(rc == 0);
printf("***NEXT FREE RRBP FN=%" PRIu32 ":\n", poll_fn);
OSMO_ASSERT(poll_fn == (curr_fn+21) || poll_fn == (curr_fn+22));
OSMO_ASSERT(rrbp == RRBP_N_plus_21_22);
pdch->last_rts_fn = fn_next_block(pdch->last_rts_fn);
printf("*** ALLOC 1 SBA FN=%" PRIu32 ":\n", pdch->last_rts_fn);
sba1 = sba_alloc(bts, pdch, 0); (void)sba1;
print_ulc_nodes(pdch->ulc);
rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, curr_fn, &poll_fn, &rrbp);
OSMO_ASSERT(rc == 0);
printf("***NEXT FREE RRBP FN=%" PRIu32 ":\n", poll_fn);
OSMO_ASSERT(poll_fn == (curr_fn+26));
OSMO_ASSERT(rrbp == RRBP_N_plus_26);
pdch->last_rts_fn = fn_next_block(pdch->last_rts_fn);
printf("*** ALLOC 1 SBA FN=%" PRIu32 ":\n", pdch->last_rts_fn);
sba1 = sba_alloc(bts, pdch, 0); (void)sba1;
print_ulc_nodes(pdch->ulc);
rc = pdch_ulc_get_next_free_rrbp_fn(pdch->ulc, curr_fn, &poll_fn, &rrbp);
OSMO_ASSERT(rc == -EBUSY);
talloc_free(bts);
printf("=== end: %s ===\n", __FUNCTION__);
}
int main(int argc, char **argv)
{
tall_pcu_ctx = talloc_named_const(NULL, 1, "pdch_ulc test context");
@ -256,7 +314,7 @@ int main(int argc, char **argv)
test_reserve_multiple();
test_fn_wrap_around();
test_next_free_fn_sba();
test_next_free_fn_rrbp();
talloc_free(the_pcu);
return EXIT_SUCCESS;
}

@ -41,3 +41,18 @@ PDCH(bts=0,trx=0,ts=0) Expiring FN=43 but previous FN=34 is still reserved!
PDCH(bts=0,trx=0,ts=0) Timeout for registered POLL (FN=34): TBF(TFI=0 TLLI=0x12345678 DIR=DL STATE=RELEASING)
PDCH(bts=0,trx=0,ts=0) Expiring FN=43 but previous FN=39 is still reserved!
PDCH(bts=0,trx=0,ts=0) Timeout for registered POLL (FN=39): TBF(TFI=0 TLLI=0x12345678 DIR=DL STATE=RELEASING)
PDCH(bts=0,trx=0,ts=0) POLL scheduled at FN 26 + 13 = 39
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 13 = 104
PDCH(bts=0,trx=0,ts=0) POLL scheduled at FN 91 + 17 = 108
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 13 = 104
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 17 = 108
PDCH(bts=0,trx=0,ts=0) POLL scheduled at FN 91 + 21 = 112
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 13 = 104
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 17 = 108
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 21 = 112
PDCH(bts=0,trx=0,ts=0) POLL scheduled at FN 91 + 26 = 117
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 13 = 104
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 17 = 108
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 21 = 112
PDCH(bts=0,trx=0,ts=0) UL block already scheduled at FN 91 + 26 = 117
PDCH(bts=0,trx=0,ts=0) FN=91 Failed allocating POLL, all RRBP values are already reserved!

@ -256,3 +256,22 @@ FN=117 type=SBA
FN=121 type=SBA
FN=125 type=SBA
=== end: test_next_free_fn_sba ===
=== start: test_next_free_fn_rrbp ===
*** ALLOC 1 SBA FN=52:
FN=104 type=SBA
***NEXT FREE RRBP FN=108:
*** ALLOC 1 SBA FN=56:
FN=104 type=SBA
FN=108 type=SBA
***NEXT FREE RRBP FN=112:
*** ALLOC 1 SBA FN=60:
FN=104 type=SBA
FN=108 type=SBA
FN=112 type=SBA
***NEXT FREE RRBP FN=117:
*** ALLOC 1 SBA FN=65:
FN=104 type=SBA
FN=108 type=SBA
FN=112 type=SBA
FN=117 type=SBA
=== end: test_next_free_fn_rrbp ===

Loading…
Cancel
Save