pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcu/+/33264 )
Change subject: tbf_ul_fsm: Remove 3195 references, simplify T3169 set up as consequence
......................................................................
tbf_ul_fsm: Remove 3195 references, simplify T3169 set up as consequence
T3195 is triggered as consequence of N3105 reaching MAX, which only
occurs in DL TBFs. Hence, T3195 also only applies to DL TBFs.
The references to T3195 were there as a remains from time
where we had a single tbf_fsm for both UL and DL TBFs. It can now be
further simplified.
Change-Id: I07a43c13289d50707115187a3f22df21443a7b4a
---
M src/tbf_fsm.h
M src/tbf_ul_fsm.c
M tests/tbf/TbfTest.err
3 files changed, 22 insertions(+), 24 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/tbf_fsm.h b/src/tbf_fsm.h
index 6e9e478..cb075f1 100644
--- a/src/tbf_fsm.h
+++ b/src/tbf_fsm.h
@@ -70,7 +70,6 @@
struct gprs_rlcmac_ul_tbf *ul_tbf;
};
uint32_t state_flags;
- unsigned int T_release; /* Timer to be used to end release: T3169 or T3195 */
};
extern struct osmo_fsm tbf_dl_fsm;
diff --git a/src/tbf_ul_fsm.c b/src/tbf_ul_fsm.c
index 231ccd2..6160584 100644
--- a/src/tbf_ul_fsm.c
+++ b/src/tbf_ul_fsm.c
@@ -31,10 +31,10 @@
static const struct osmo_tdef_state_timeout tbf_ul_fsm_timeouts[32] = {
[TBF_ST_NEW] = {},
- [TBF_ST_ASSIGN] = { },
- [TBF_ST_FLOW] = { },
+ [TBF_ST_ASSIGN] = {},
+ [TBF_ST_FLOW] = {},
[TBF_ST_FINISHED] = {},
- [TBF_ST_RELEASING] = {},
+ [TBF_ST_RELEASING] = { .T = 3169 },
};
/* Transition to a state, using the T timer defined in tbf_fsm_timeouts.
@@ -43,7 +43,7 @@
#define tbf_ul_fsm_state_chg(fi, NEXT_STATE) \
osmo_tdef_fsm_inst_state_chg(fi, NEXT_STATE, \
tbf_ul_fsm_timeouts, \
- the_pcu->T_defs, \
+ tbf_ms(((struct tbf_dl_fsm_ctx *)(fi->priv))->tbf)->bts->T_defs_bts,
\
-1)
static void mod_ass_type(struct tbf_ul_fsm_ctx *ctx, uint8_t t, bool set)
@@ -190,7 +190,6 @@
tbf_ul_fsm_state_chg(fi, TBF_ST_FINISHED);
break;
case TBF_EV_MAX_N3101:
- ctx->T_release = 3169;
tbf_ul_fsm_state_chg(fi, TBF_ST_RELEASING);
break;
default:
@@ -233,7 +232,6 @@
ms_unref(ms, __func__);
break;
case TBF_EV_MAX_N3103:
- ctx->T_release = 3169;
tbf_ul_fsm_state_chg(fi, TBF_ST_RELEASING);
break;
default:
@@ -243,22 +241,10 @@
static void st_releasing_on_enter(struct osmo_fsm_inst *fi, uint32_t prev_state)
{
- struct tbf_ul_fsm_ctx *ctx = (struct tbf_ul_fsm_ctx *)fi->priv;
- unsigned long val;
-
- if (!ctx->T_release)
- return;
-
- /* In general we should end up here with an assigned timer in ctx->T_release.
Possible values are:
- * T3195: Wait for reuse of TFI(s) when there is no response from the MS
- * (radio failure or cell change) for this TBF/MBMS radio bearer.
- * T3169: Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is
invalid.
+ /* T3169 has been set entering this state: Wait for reuse of USF and
+ * TFI(s) after the MS uplink assignment for this TBF is invalid. Upon
+ * timeout, the timer_cb does tbf_free().
*/
- val = osmo_tdef_get(tbf_ms(ctx->tbf)->bts->T_defs_bts, ctx->T_release,
OSMO_TDEF_S, -1);
- fi->T = ctx->T_release;
- LOGPTBFUL(ctx->ul_tbf, LOGL_DEBUG, "starting timer T%u with %lu sec. %u
microsec\n",
- ctx->T_release, val, 0);
- osmo_timer_schedule(&fi->timer, val, 0);
}
static void st_releasing(struct osmo_fsm_inst *fi, uint32_t event, void *data)
@@ -277,7 +263,6 @@
LOGPTBFUL(ctx->ul_tbf, LOGL_NOTICE, "releasing due to PACCH assignment
timeout.\n");
/* fall-through */
case 3169:
- case 3195:
tbf_free(ctx->tbf);
break;
default:
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 7ffebea..9e75001 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -3797,7 +3797,6 @@
TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){FLOW} N3101 exceeded MAX (10)
UL_TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){FLOW}: Received Event MAX_N3101
UL_TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){FLOW}: state_chg to RELEASING
-TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){RELEASING} starting timer T3169 with
5 sec. 0 microsec
PDCH(bts=0,trx=0,ts=7) Expiring FN=2654379 but previous FN=2654322 is still reserved!
PDCH(bts=0,trx=0,ts=7) Timeout for registered USF (FN=2654322):
TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){RELEASING}
TBF(UL:TFI-0-0-0:G:IMSI-0011223344:TLLI-0xf1223344){RELEASING} N3101 10 => 11 (<
MAX 10)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-pcu/+/33264
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I07a43c13289d50707115187a3f22df21443a7b4a
Gerrit-Change-Number: 33264
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged