path: root/src/tbf.h
diff options
authorMax <msuraev@sysmocom.de>2017-12-20 17:31:13 +0100
committerMax <msuraev@sysmocom.de>2017-12-20 17:49:25 +0100
commitee5be3a0095b4bae430032d35e3ad0716eff34ab (patch)
tree43d74ede1ad950f6d73cd251f8677b4c73d3f60d /src/tbf.h
parentc21f007277713b15d9a48d0bcc6f28aa51b4f908 (diff)
TBF: implement independent T31xx timers
Previously TBF got single timer so the pending timer was automatically cancelled when new one was scheduled. Let's make it more robust by implementing independent T31 xx timers from 3GPP TS 44.060 ยง13.2 with corresponding start/stop functions and counters. The semantics of the timers is preserved as before: pending timers are restarted unconditionally. It might be neecessary to change this later on after spec review. N. B. T0: used for assign/reject timeouts, have to be properly attributed and documented first. Change-Id: I0305873ca47534f53441247217881da59625e1f7 Related: OS#2407
Diffstat (limited to 'src/tbf.h')
1 files changed, 23 insertions, 2 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 15d414d..06c9f60 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -138,6 +138,24 @@ enum tbf_egprs_ul_counters {
#define LOGPTBFUL(tbf, level, fmt, args...) LOGP(DRLCMACUL, level, "%s " fmt, tbf_name(tbf), ## args)
#define LOGPTBFDL(tbf, level, fmt, args...) LOGP(DRLCMACDL, level, "%s " fmt, tbf_name(tbf), ## args)
+enum tbf_timers {
+ /* Wait for reuse of USF and TFI(s) after the MS uplink assignment for this TBF is invalid. */
+ T3169,
+ /* Wait for reuse of TFI(s) after sending of the last RLC Data Block on this TBF.
+ Wait for reuse of TFI(s) after sending the PACKET TBF RELEASE for an MBMS radio bearer. */
+ T3191,
+ /* Wait for reuse of TFI(s) after reception of the final PACKET DOWNLINK ACK/NACK from the
+ MS for this TBF. */
+ T3193,
+ /* Wait for reuse of TFI(s) when there is no response from the MS
+ (radio failure or cell change) for this TBF/MBMS radio bearer. */
+ T3195,
#define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */
#define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */
#define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */
@@ -177,7 +195,10 @@ struct gprs_rlcmac_tbf {
int update();
void handle_timeout();
void stop_timer(const char *reason);
- void stop_t3191();
+ void stop_timers(const char *reason);
+ bool timers_pending(enum tbf_timers t);
+ void t_stop(enum tbf_timers t, const char *reason);
+ void t_start(enum tbf_timers t, uint32_t sec, uint32_t microsec, const char *reason, bool force);
int establish_dl_tbf_on_pacch();
int check_polling(uint32_t fn, uint8_t ts,
@@ -305,7 +326,7 @@ private:
LListHead<gprs_rlcmac_tbf> m_list;
LListHead<gprs_rlcmac_tbf> m_ms_list;
bool m_egprs_enabled;
+ struct osmo_timer_list T31[T_MAX];
mutable char m_name_buf[60];