mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-pcu.git
synced 2025-11-02 13:13:31 +00:00
tbf_ul_ass_fsm: Clarify use of X2000 timer
See 683ce64039 for a complementary
analysis and description of the timer.
Related: OS#3928
Change-Id: Iee27d1b2a8ddac53e14efd20a8c8aec35de58174
This commit is contained in:
@@ -156,16 +156,26 @@ static void st_none_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
|
||||
unsigned long val;
|
||||
unsigned int sec, micro;
|
||||
|
||||
/* Start release after rejecting only if it is UL TBF */
|
||||
if (prev_state == TBF_UL_ASS_SEND_ASS_REJ &&
|
||||
tbf_direction(ctx->tbf) == GPRS_RLCMAC_UL_TBF) {
|
||||
/* tbf_free() called upon trigger */
|
||||
/* If TBF object doing the UL assignment is also an UL TBF, and
|
||||
* it was just rejected over PACCH, then there's nothing more to do
|
||||
* with this UL TBF other than freeing it and waiting for MS to
|
||||
* retry asking for another UL TBF assignment. But since we are
|
||||
* currently being called from the scheduled (we arrived here
|
||||
* through st_send_ass_rej(TBF_UL_ASS_EV_CREATE_RLCMAC_MSG)),
|
||||
* then we need to delay the tbf_free() to do it asynchrosnouly
|
||||
* in the event loop. Using a fixed 0ms internal fsm timer
|
||||
* number would have been fine here, but since for historical
|
||||
* reasons we have VTY-configurable X2000 for this purpose, keep
|
||||
* using it (it is expected to be 0 usually).
|
||||
*/
|
||||
fi->T = -2000;
|
||||
val = osmo_tdef_get(the_pcu->T_defs, fi->T, OSMO_TDEF_MS, -1);
|
||||
sec = val / 1000;
|
||||
micro = (val % 1000) * 1000;
|
||||
LOGPTBF(ctx->tbf, LOGL_DEBUG, "Starting timer X2000 [reject (PACCH)] with %u sec. %u microsec\n",
|
||||
sec, micro);
|
||||
LOGPTBF(ctx->tbf, LOGL_DEBUG, "Starting timer X2000 [delay free after Packet Access Reject (PACCH)] with %lums\n",
|
||||
val);
|
||||
osmo_timer_schedule(&fi->timer, sec, micro);
|
||||
}
|
||||
|
||||
|
||||
@@ -11923,7 +11923,7 @@ UL_ASS_TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){NONE}: Received Event SCHED_ASS_REJ
|
||||
UL_ASS_TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){NONE}: state_chg to SEND_ASS_REJ
|
||||
UL_ASS_TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){SEND_ASS_REJ}: Received Event CREATE_RLCMAC_MSG
|
||||
UL_ASS_TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){SEND_ASS_REJ}: state_chg to NONE
|
||||
TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){ASSIGN} Starting timer X2000 [reject (PACCH)] with 0 sec. 0 microsec
|
||||
TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){ASSIGN} Starting timer X2000 [delay free after Packet Access Reject (PACCH)] with 0ms
|
||||
PDCH(bts=0,trx=0,ts=7) FN=2654218 Scheduling control message at RTS for TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){ASSIGN}
|
||||
UL_ASS_TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){NONE}: Timeout of X2000
|
||||
TBF(UL:TFI-0-0--1:G:TLLI-0xffeeddcc){ASSIGN} free
|
||||
|
||||
Reference in New Issue
Block a user