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 submitted this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/25010 ) Change subject: tbf: Drop impossible paths in create_dl_ass() ...................................................................... tbf: Drop impossible paths in create_dl_ass() create_dl_ass() is only called in gprs_rlcmac_sched.cpp on tbf_cand->dl_ass pointer, which is always assigned under the guard "!tbf->is_control_ts(pdch->ts_no)", since we only send CTRL messages for a TBF on its control TS. Hence, condition "!is_control_ts(ts)" in create_dl_ass will always be false, and as a result poll_ass_dl will always be 1. So we can drop different code paths. Change-Id: Ibea4100a5dc8bd49303cb6a3d02417038c3d3887 --- M src/tbf.cpp 1 file changed, 13 insertions(+), 27 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve daniel: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/src/tbf.cpp b/src/tbf.cpp index e83f472..fcad879 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -852,29 +852,24 @@ struct msgb *msg; struct gprs_rlcmac_dl_tbf *new_dl_tbf = NULL; RlcMacDownlink_t *mac_control_block = NULL; - int poll_ass_dl = 1; + const int poll_ass_dl = 1; unsigned int rrbp = 0; uint32_t new_poll_fn = 0; int rc; bool old_tfi_is_valid = is_tfi_assigned(); - if (direction == GPRS_RLCMAC_DL_TBF && !is_control_ts(ts)) { - LOGPTBF(this, LOGL_NOTICE, - "Cannot poll for downlink assignment, because MS cannot reply. (TS=%d, first common TS=%d)\n", - ts, first_common_ts); - poll_ass_dl = 0; + /* We only use this function in control TS (PACCH) so that MS can always answer the poll */ + OSMO_ASSERT(is_control_ts(ts)); + + if (ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) + { + LOGPTBF(this, LOGL_DEBUG, + "Polling is already scheduled, so we must wait for the uplink assignment...\n"); + return NULL; } - if (poll_ass_dl) { - if (ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) - { - LOGPTBF(this, LOGL_DEBUG, - "Polling is already scheduled, so we must wait for the uplink assignment...\n"); - return NULL; - } - rc = check_polling(fn, ts, &new_poll_fn, &rrbp); - if (rc < 0) - return NULL; - } + rc = check_polling(fn, ts, &new_poll_fn, &rrbp); + if (rc < 0) + return NULL; /* on uplink TBF we get the downlink TBF to be assigned. */ if (direction == GPRS_RLCMAC_UL_TBF) { @@ -938,16 +933,7 @@ LOGP(DTBF, LOGL_DEBUG, "------------------------- TX : Packet Downlink Assignment -------------------------\n"); bts_do_rate_ctr_inc(bts, CTR_PKT_DL_ASSIGNMENT); - if (poll_ass_dl) { - set_polling(new_poll_fn, ts, PDCH_ULC_POLL_DL_ASS); - } else { - dl_ass_state = GPRS_RLCMAC_DL_ASS_NONE; - TBF_SET_STATE(new_dl_tbf, TBF_ST_FLOW); - tbf_assign_control_ts(new_dl_tbf); - /* stop pending assignment timer */ - new_dl_tbf->t_stop(T0, "assignment (DL-TBF)"); - - } + set_polling(new_poll_fn, ts, PDCH_ULC_POLL_DL_ASS); talloc_free(mac_control_block); return msg; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25010 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: Ibea4100a5dc8bd49303cb6a3d02417038c3d3887 Gerrit-Change-Number: 25010 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: osmith <osmith at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210723/a92db50c/attachment.htm>