[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-ass...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email ) Change subject: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment .. rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment The FSM can be reused several times to assign a UL TBF over its lifespan, eg. if a DL TBF DL ACK/NACK is reuse to request allocation of a UL TBF several times. Some state like ctx->tbf_starting_time_exists was being left as =true during the initial run of the FSM, and as a result subsequent runs going through the check delaying completing after sending the PKT CTRL ACK. Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 --- M src/rlcmac/tbf_ul_ass_fsm.c 1 file changed, 32 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve; Verified pespin: Looks good to me, approved diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c index b1be58c..df5b799 100644 --- a/src/rlcmac/tbf_ul_ass_fsm.c +++ b/src/rlcmac/tbf_ul_ass_fsm.c @@ -128,6 +128,12 @@ static int handle_imm_ass(struct gprs_rlcmac_tbf_ul_ass_fsm_ctx *ctx, const struct tbf_ul_ass_ev_rx_ccch_imm_ass_ctx *d) { + /* reset previous state: */ + memset(>phase1_alloc, 0, sizeof(ctx->phase1_alloc)); + ctx->sba = true; + ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; + /* TS 44.018 10.5.2.16 IA Rest Octets */ switch (d->iaro->UnionType) { case 1: /* d->iaro->u.lh.* (IA_RestOctetsLH_t) */ @@ -195,6 +201,12 @@ const Timeslot_Allocation_t *ts_alloc; const Timeslot_Allocation_Power_Ctrl_Param_t *ts_alloc_pwr_ctl; + /* reset previous state: */ + memset(>phase2_alloc, 0, sizeof(ctx->phase2_alloc)); + ctx->sba = false; + ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; + switch (ulass->UnionType) { case 0: /* ulass->u.PUA_GPRS_Struct.* (PUA_GPRS_t) */ ctx->ul_tbf->tx_cs = ulass->u.PUA_GPRS_Struct.CHANNEL_CODING_COMMAND + 1; @@ -258,6 +270,9 @@ ctx->dl_tbf = NULL; memset(>phase1_alloc, 0, sizeof(ctx->phase1_alloc)); memset(>phase2_alloc, 0, sizeof(ctx->phase2_alloc)); + ctx->sba = false; + ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; } static void st_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -368,7 +383,6 @@ data_ctx->msg = create_pkt_resource_req(ctx, data_ctx); if (!data_ctx->msg) return; - ctx->sba = false; /* Reset state */ tbf_ul_ass_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ASS_ST_WAIT_PKT_UL_ASS); break; default: -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 Gerrit-Change-Number: 34622 Gerrit-PatchSet: 3 Gerrit-Owner: pespin Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-MessageType: merged
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-ass...
Attention is currently required from: Hoernchen. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email ) Change subject: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 Gerrit-Change-Number: 34622 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Reviewer: pespin Gerrit-Attention: Hoernchen Gerrit-Comment-Date: Wed, 04 Oct 2023 10:15:42 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-ass...
Attention is currently required from: Hoernchen, pespin. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email ) Change subject: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment .. Patch Set 2: Verified+1 Code-Review+1 (1 comment) Patchset: PS2: It was confirmed [on mssdr setup] that this patch fixes the problem. -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 Gerrit-Change-Number: 34622 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-Reviewer: Hoernchen Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria Gerrit-Attention: Hoernchen Gerrit-Attention: pespin Gerrit-Comment-Date: Tue, 03 Oct 2023 16:36:46 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-ass...
pespin has uploaded a new patch set (#2). ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email ) Change subject: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment .. rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment The FSM can be reused several times to assign a UL TBF over its lifespan, eg. if a DL TBF DL ACK/NACK is reuse to request allocation of a UL TBF several times. Some state like ctx->tbf_starting_time_exists was being left as =true during the initial run of the FSM, and as a result subsequent runs going through the check delaying completing after sending the PKT CTRL ACK. Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 --- M src/rlcmac/tbf_ul_ass_fsm.c 1 file changed, 32 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/22/34622/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 Gerrit-Change-Number: 34622 Gerrit-PatchSet: 2 Gerrit-Owner: pespin Gerrit-CC: Jenkins Builder Gerrit-MessageType: newpatchset
[S] Change in libosmo-gprs[master]: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-ass...
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email ) Change subject: rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment .. rlcmac: tbf_ul_ass_fsm: Fix state not reset after first UL-TBF re-assignment The FSM can be reused several times to assign a UL TBF over its lifespan, eg. if a DL TBF DL ACK/NACK is reuse to request allocation of a UL TBF several times. Some state like ctx->tbf_starting_time_exists was being left as =true during the initial run of the FSM, and as a result subsequent runs going through the check delaying completing after sending the PKT CTRL ACK. Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 --- M src/rlcmac/tbf_ul_ass_fsm.c 1 file changed, 31 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/22/34622/1 diff --git a/src/rlcmac/tbf_ul_ass_fsm.c b/src/rlcmac/tbf_ul_ass_fsm.c index 5b5a892..df5b799 100644 --- a/src/rlcmac/tbf_ul_ass_fsm.c +++ b/src/rlcmac/tbf_ul_ass_fsm.c @@ -128,6 +128,12 @@ static int handle_imm_ass(struct gprs_rlcmac_tbf_ul_ass_fsm_ctx *ctx, const struct tbf_ul_ass_ev_rx_ccch_imm_ass_ctx *d) { + /* reset previous state: */ + memset(>phase1_alloc, 0, sizeof(ctx->phase1_alloc)); + ctx->sba = true; + ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; + /* TS 44.018 10.5.2.16 IA Rest Octets */ switch (d->iaro->UnionType) { case 1: /* d->iaro->u.lh.* (IA_RestOctetsLH_t) */ @@ -195,6 +201,12 @@ const Timeslot_Allocation_t *ts_alloc; const Timeslot_Allocation_Power_Ctrl_Param_t *ts_alloc_pwr_ctl; + /* reset previous state: */ + memset(>phase2_alloc, 0, sizeof(ctx->phase2_alloc)); + ctx->sba = false; + ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; + switch (ulass->UnionType) { case 0: /* ulass->u.PUA_GPRS_Struct.* (PUA_GPRS_t) */ ctx->ul_tbf->tx_cs = ulass->u.PUA_GPRS_Struct.CHANNEL_CODING_COMMAND + 1; @@ -258,7 +270,9 @@ ctx->dl_tbf = NULL; memset(>phase1_alloc, 0, sizeof(ctx->phase1_alloc)); memset(>phase2_alloc, 0, sizeof(ctx->phase2_alloc)); + ctx->sba = false; ctx->tbf_starting_time_exists = false; + ctx->tbf_starting_time = 0; } static void st_idle(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -369,7 +383,6 @@ data_ctx->msg = create_pkt_resource_req(ctx, data_ctx); if (!data_ctx->msg) return; - ctx->sba = false; /* Reset state */ tbf_ul_ass_fsm_state_chg(fi, GPRS_RLCMAC_TBF_UL_ASS_ST_WAIT_PKT_UL_ASS); break; default: -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/34622?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Iaddbd1e3924036be1cf6eed41367031d3e127f57 Gerrit-Change-Number: 34622 Gerrit-PatchSet: 1 Gerrit-Owner: pespin Gerrit-MessageType: newchange