This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25752 ) Change subject: tbf_dl_ass_fsm: Move block msg generation conditions to rts() function ...................................................................... tbf_dl_ass_fsm: Move block msg generation conditions to rts() function Move the required conditions to generate a message to the rts() function, this way the scheduler knows this TBF cannot yet attempt the procedure and hence will not request it to create a message which will fail. This way the scheduler will schedule other itneresting messages instead of failing and scheduling a dummy block as a result. Change-Id: Idbe4f9bbd23005a43c586b737cf9adc2114287e2 --- M src/tbf_dl_ass_fsm.c 1 file changed, 22 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/52/25752/1 diff --git a/src/tbf_dl_ass_fsm.c b/src/tbf_dl_ass_fsm.c index 5ac1c1a..37ced61 100644 --- a/src/tbf_dl_ass_fsm.c +++ b/src/tbf_dl_ass_fsm.c @@ -65,31 +65,10 @@ /* We only use this function in control TS (PACCH) so that MS can always answer the poll */ OSMO_ASSERT(tbf_is_control_ts(ctx->tbf, d->ts)); - if (tbf_ul_ass_fi(ctx->tbf)->state == TBF_UL_ASS_WAIT_ACK) - { - LOGPTBF(ctx->tbf, LOGL_DEBUG, - "Polling is already scheduled, so we must wait for the uplink assignment...\n"); - // FIXME: call tbf_dl_ass_fsm_state_chg(ctx->fi, TBF_DL_ASS_NONE); ? - return NULL; - } rc = tbf_check_polling(ctx->tbf, d->fn, d->ts, &new_poll_fn, &rrbp); if (rc < 0) return NULL; - /* on uplink TBF we get the downlink TBF to be assigned. */ - if (tbf_direction(ctx->tbf) == GPRS_RLCMAC_UL_TBF) { - struct gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(ctx->tbf); - - /* be sure to check first, if contention resolution is done, - * otherwise we cannot send the assignment yet (3GPP TS 44.060 sec 7.1.3.1) */ - if (!ul_tbf_contention_resolution_done(ul_tbf)) { - LOGPTBF(ctx->tbf, LOGL_DEBUG, - "Cannot assign DL TBF now, because contention resolution is not finished.\n"); - // FIXME: call tbf_dl_ass_fsm_state_chg(ctx->fi, TBF_DL_ASS_NONE); ? - return NULL; - } - } - new_dl_tbf = ms_dl_tbf(ms); if (!new_dl_tbf) { LOGPTBF(ctx->tbf, LOGL_ERROR, @@ -273,8 +252,28 @@ return data_ctx.msg; } -bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf* tbf) +bool tbf_dl_ass_rts(const struct gprs_rlcmac_tbf *tbf) { struct osmo_fsm_inst *fi = tbf_dl_ass_fi(tbf); - return fi->state == TBF_DL_ASS_SEND_ASS; + if (fi->state != TBF_DL_ASS_SEND_ASS) + return false; + + if (tbf_ul_ass_fi(tbf)->state == TBF_UL_ASS_WAIT_ACK) { + LOGPTBF(tbf, LOGL_DEBUG, + "Polling is already scheduled, so we must wait for the uplink assignment...\n"); + return false; + } + + /* on uplink TBF we get the downlink TBF to be assigned. */ + if (tbf_direction(tbf) == GPRS_RLCMAC_UL_TBF) { + const struct gprs_rlcmac_ul_tbf *ul_tbf = (const struct gprs_rlcmac_ul_tbf *)tbf; + /* be sure to check first, if contention resolution is done, + * otherwise we cannot send the assignment yet (3GPP TS 44.060 sec 7.1.3.1) */ + if (!ul_tbf_contention_resolution_done(ul_tbf)) { + LOGPTBF(tbf, LOGL_DEBUG, + "Cannot assign DL TBF now, because contention resolution is not finished.\n"); + return false; + } + } + return true; } -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25752 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Idbe4f9bbd23005a43c586b737cf9adc2114287e2 Gerrit-Change-Number: 25752 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211013/ccf215b8/attachment.htm>