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/+/25054 ) Change subject: Get rid of tbf_dl:abort() ...................................................................... Get rid of tbf_dl:abort() Having that code in a separate function is confusing and adds code complexity since it looks like an entry point to start feeing a TBF, but it simply some (not yet really useful) set of instructions to be called one 1 code path in tbf_free. Let's move it there, this way it becomes clear tbf_free() is THE place to be (if you want to get rid of a TBF). Change-Id: I30febf4d21a0bfab37524c07598bbb0dd32f7f65 --- M src/tbf.cpp M src/tbf_dl.cpp M src/tbf_dl.h 3 files changed, 15 insertions(+), 29 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve diff --git a/src/tbf.cpp b/src/tbf.cpp index 16a53cc..097f002 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -275,10 +275,23 @@ bts_do_rate_ctr_inc(tbf->bts, CTR_TBF_UL_ABORTED); } else { gprs_rlcmac_dl_tbf *dl_tbf = as_dl_tbf(tbf); + gprs_rlc_dl_window *win = static_cast<gprs_rlc_dl_window *>(dl_tbf->window()); + bts_do_rate_ctr_inc(tbf->bts, CTR_TBF_DL_FREED); - if (tbf->state_is(TBF_ST_FLOW)) + if (tbf->state_is(TBF_ST_FLOW)) { bts_do_rate_ctr_inc(tbf->bts, CTR_TBF_DL_ABORTED); - dl_tbf->abort(); + /* range V(A)..V(S)-1 */ + uint16_t lost = win->count_unacked(); + /* report all outstanding packets as lost */ + gprs_rlcmac_received_lost(dl_tbf, 0, lost); + /* TODO: Reschedule all LLC frames starting with the one that is + * (partly) encoded in chunk 1 of block V(A). (optional) */ + } + /* This state change looks unneeded and can probably be dropped at some point: */ + tbf_fsm_state_chg(dl_tbf->state_fsm.fi, TBF_ST_RELEASING); + /* reset rlc states */ + win->reset(); + osmo_fsm_inst_dispatch(dl_tbf->state_fsm.fi, TBF_EV_ASSIGN_DEL_CCCH, NULL); } LOGPTBF(tbf, LOGL_INFO, "free\n"); diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index 0330a78..9e06917 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -1261,32 +1261,6 @@ return 0; } -int gprs_rlcmac_dl_tbf::abort() -{ - uint16_t lost; - - if (state_is(TBF_ST_FLOW)) { - /* range V(A)..V(S)-1 */ - lost = m_window.count_unacked(); - - /* report all outstanding packets as lost */ - gprs_rlcmac_received_lost(this, 0, lost); - - /* TODO: Reschedule all LLC frames starting with the one that is - * (partly) encoded in chunk 1 of block V(A). (optional) */ - } - - /* This state change looks unneeded and can probably be dropped at some point: */ - tbf_fsm_state_chg(this->state_fsm.fi, TBF_ST_RELEASING); - - /* reset rlc states */ - m_window.reset(); - - osmo_fsm_inst_dispatch(this->state_fsm.fi, TBF_EV_ASSIGN_DEL_CCCH, NULL); - - return 0; -} - int gprs_rlcmac_dl_tbf::rcvd_dl_ack(bool final_ack, unsigned first_bsn, struct bitvec *rbb) { diff --git a/src/tbf_dl.h b/src/tbf_dl.h index 6fddeb5..b8fecde 100644 --- a/src/tbf_dl.h +++ b/src/tbf_dl.h @@ -61,7 +61,6 @@ int frames_since_last_drain(unsigned fn) const; bool keep_open(unsigned fn) const; int release(); - int abort(); uint16_t window_size() const; void set_window_size(); void update_coding_scheme_counter_dl(enum CodingScheme cs); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/25054 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I30febf4d21a0bfab37524c07598bbb0dd32f7f65 Gerrit-Change-Number: 25054 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder 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/20210823/b40e31eb/attachment.htm>