aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-12 12:08:54 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-03-12 18:08:18 +0100
commit7c44415d785422b8f7e02059420e7c6feb89f4e9 (patch)
treed738e6cf35a93346b1b0144c820287346c660690 /src/tbf.h
parent0eabffdc35bef3bb678014d4c377ab8a2ac5951f (diff)
tbf: Fix scheduling for DL Ack/Nack request
Currently the DL Ack/Nack is not requested, if the last chunk of the final LLC frame in the TBF fits exactly into the remaining space of the RLC block. It is also not requested, if the RRBP flag cannot be set due to scheduling issues (single block allocation, polling already pending for this TBF, ...). So up to POLL_ACK_AFTER_FRAMES (20) RLC data blocks will have to be resent, before requesting the Ack/Nack will be retried. This commit removes the first_fin_ack parameter of create_dl_acked_block entirely and adds a request_dl_ack() method that should be called, when the TBF's state changes to FINISHED. This request will be reset, when the block has been scheduled successfully. Since the first_fin_ack hasn't been set if chunk == space, calling request_dl_ack() on both places in create_new_bsn() when the state is changed to FINISHED will also fix the first issue described above. Note that DL scheduling might not be fair concerning access to first_ts when multiple TS are used for a TBF. In theory, a TBF might never get access to first_ts in the worst case. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 29959b95..8a2da963 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -322,6 +322,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
int rcvd_dl_ack(uint8_t final, uint8_t ssn, uint8_t *rbb);
struct msgb *create_dl_acked_block(uint32_t fn, uint8_t ts);
+ void request_dl_ack();
/* TODO: add the gettimeofday as parameter */
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);
@@ -334,6 +335,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
gprs_rlc_dl_window m_window;
int32_t m_tx_counter; /* count all transmitted blocks */
uint8_t m_wait_confirm; /* wait for CCCH IMM.ASS cnf */
+ bool m_dl_ack_requested;
struct {
struct timeval dl_bw_tv; /* timestamp for dl bw calculation */
@@ -347,7 +349,7 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
protected:
struct msgb *create_new_bsn(const uint32_t fn, const uint8_t ts);
struct msgb *create_dl_acked_block(const uint32_t fn, const uint8_t ts,
- const int index, const bool fin_first_ack);
+ const int index);
int update_window(const uint8_t ssn, const uint8_t *rbb);
int maybe_start_new_window();
bool dl_window_stalled() const;