diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-03-29 19:10:19 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2021-03-31 17:39:50 +0200 |
commit | 16e1678bfc1ecc83908b73b8d3fafa3ec34d71d5 (patch) | |
tree | 64b2b88d903a9f04ebfd9511f13e34deba01fd01 /src | |
parent | 58046e45d13c2881e5f150973655240a23f6db04 (diff) |
tbf: Get rid of attribute poll_ts
That field is not needed anymore, and it works only under the assumption
that only 1 poll request can be active at a time per TBF, which is not
true.
Change-Id: I9b8bed7741d385bab4cd8c64b841a78a02a05fe1
Diffstat (limited to 'src')
-rw-r--r-- | src/pdch_ul_controller.c | 2 | ||||
-rw-r--r-- | src/tbf.cpp | 22 | ||||
-rw-r--r-- | src/tbf.h | 7 | ||||
-rw-r--r-- | src/tbf_dl.cpp | 2 |
4 files changed, 14 insertions, 19 deletions
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c index 59110800..f8089ffb 100644 --- a/src/pdch_ul_controller.c +++ b/src/pdch_ul_controller.c @@ -318,7 +318,7 @@ void pdch_ulc_expire_fn(struct pdch_ulc *ulc, uint32_t fn) LOGPDCH(ulc->pdch, DRLCMAC, LOGL_NOTICE, "Timeout for registered POLL (FN=%u): %s\n", item->fn, tbf_name(item->tbf_poll.poll_tbf)); - tbf_poll_timeout(item->tbf_poll.poll_tbf, item->fn, item->tbf_poll.reason); + tbf_poll_timeout(item->tbf_poll.poll_tbf, ulc->pdch, item->fn, item->tbf_poll.reason); break; case PDCH_ULC_NODE_SBA: sba = item->sba.sba; diff --git a/src/tbf.cpp b/src/tbf.cpp index 92dede57..69c35f8d 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -125,7 +125,6 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms, gprs_ first_ts(0), first_common_ts(0), control_ts(0xff), - poll_ts(0), fT(0), num_fT_exp(0), was_releasing(0), @@ -581,45 +580,44 @@ void gprs_rlcmac_tbf::set_polling(uint32_t new_poll_fn, uint8_t ts, enum pdch_ul chan, new_poll_fn, ts); return; } - poll_ts = ts; switch (reason) { case PDCH_ULC_POLL_UL_ASS: ul_ass_state = GPRS_RLCMAC_UL_ASS_WAIT_ACK; LOGPTBFDL(this, LOGL_INFO, "Scheduled UL Assignment polling on %s (FN=%d, TS=%d)\n", - chan, new_poll_fn, poll_ts); + chan, new_poll_fn, ts); break; case PDCH_ULC_POLL_DL_ASS: dl_ass_state = GPRS_RLCMAC_DL_ASS_WAIT_ACK; LOGPTBFDL(this, LOGL_INFO, "Scheduled DL Assignment polling on %s (FN=%d, TS=%d)\n", - chan, new_poll_fn, poll_ts); + chan, new_poll_fn, ts); break; case PDCH_ULC_POLL_UL_ACK: ul_ack_state = GPRS_RLCMAC_UL_ACK_WAIT_ACK; LOGPTBFUL(this, LOGL_DEBUG, "Scheduled UL Acknowledgement polling on %s (FN=%d, TS=%d)\n", - chan, new_poll_fn, poll_ts); + chan, new_poll_fn, ts); break; case PDCH_ULC_POLL_DL_ACK: LOGPTBFDL(this, LOGL_DEBUG, "Scheduled DL Acknowledgement polling on %s (FN=%d, TS=%d)\n", - chan, new_poll_fn, poll_ts); + chan, new_poll_fn, ts); break; case PDCH_ULC_POLL_CELL_CHG_CONTINUE: LOGPTBFDL(this, LOGL_DEBUG, "Scheduled 'Packet Cell Change Continue' polling on %s (FN=%d, TS=%d)\n", - chan, new_poll_fn, poll_ts); + chan, new_poll_fn, ts); break; } } -void gprs_rlcmac_tbf::poll_timeout(uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason) +void gprs_rlcmac_tbf::poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason) { uint16_t pgroup; gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(this); LOGPTBF(this, LOGL_NOTICE, "poll timeout for FN=%d, TS=%d (curr FN %d)\n", - poll_fn, poll_ts, bts_current_frame_number(bts)); + poll_fn, pdch->ts_no, bts_current_frame_number(bts)); if (ul_tbf && ul_tbf->handle_ctrl_ack(reason)) { if (!ul_tbf->ctrl_ack_to_toggle()) { @@ -679,7 +677,7 @@ void gprs_rlcmac_tbf::poll_timeout(uint32_t poll_fn, enum pdch_ulc_tbf_poll_reas /* reschedule DL assignment */ dl_ass_state = GPRS_RLCMAC_DL_ASS_SEND_ASS; } else if (m_ms->nacc && m_ms->nacc->fi->state == NACC_ST_WAIT_CELL_CHG_CONTINUE_ACK && - m_ms->nacc->continue_poll_fn == poll_fn && m_ms->nacc->continue_poll_ts == poll_ts) { + m_ms->nacc->continue_poll_fn == poll_fn && m_ms->nacc->continue_poll_ts == pdch->ts_no) { /* Timeout waiting for CTRL ACK acking Pkt Cell Change Continue */ osmo_fsm_inst_dispatch(m_ms->nacc->fi, NACC_EV_TIMEOUT_CELL_CHG_CONTINUE, NULL); return; @@ -1209,7 +1207,7 @@ void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t return tbf->set_polling(new_poll_fn, ts, t); } -void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason) +void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason) { - tbf->poll_timeout(poll_fn, reason); + tbf->poll_timeout(pdch, poll_fn, reason); } @@ -193,7 +193,7 @@ uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf); int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf); int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp); void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t); -void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); +void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); #ifdef __cplusplus } #endif @@ -251,7 +251,7 @@ struct gprs_rlcmac_tbf { int check_polling(uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp) const; void set_polling(uint32_t poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason); - void poll_timeout(uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); + void poll_timeout(struct gprs_rlcmac_pdch *pdch, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason); /** tlli handling */ uint32_t tlli() const; @@ -291,9 +291,6 @@ struct gprs_rlcmac_tbf { struct gprs_rlcmac_pdch *pdch[8]; /* list of PDCHs allocated to TBF */ gprs_llc m_llc; - - uint8_t poll_ts; /* TS to poll */ - gprs_rlc m_rlc; unsigned int fT; /* fTxxxx number */ diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp index c122bba8..dd5d0f26 100644 --- a/src/tbf_dl.cpp +++ b/src/tbf_dl.cpp @@ -994,7 +994,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block( LOGPTBFDL(this, LOGL_INFO, "Scheduled Ack/Nack polling on FN=%d, TS=%d\n", - new_poll_fn, poll_ts); + new_poll_fn, ts); } } |