aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-07 18:49:00 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-09-11 11:52:02 +0200
commit2db0f08e08d074dc2876b780c76f7261851e7296 (patch)
treede7b47483ea75519b7a22297c74c7adeada9d2d6 /src/tbf.h
parent7c8d39a67b7568cda38829c774ea541250f3142f (diff)
bssgp: Use measured leak rate for flow control
The leak rate sent to the SGSN does not reflect the current CS level, lost frames, and control message overhead. So the SGSN cannot do proper queue control under non-optimal conditions. This commit computes the leak rate for the last flow control interval by computing the maximum theoretical leak rate and basically substracting control blocks, nacked blocks, and reduced block sizes due to CS downgrade. By using this approach, the value will by more stable on low load, where the value will tend to be near the value derived from the configuration. On full load the transmitted value is completely derived from the measurements. Note that the MS default values are no adapted to the adapted BVC leak rate, since a single MS which has a lower link quality would otherwise be reducing the rate of another MS with good radio conditions, which would not make much sense if they did not share any PDCH. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tbf.h b/src/tbf.h
index 3619910e..5b83bed1 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -371,6 +371,13 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
} m_bw;
protected:
+ struct ana_result {
+ unsigned received_packets;
+ unsigned lost_packets;
+ unsigned received_bytes;
+ unsigned lost_bytes;
+ };
+
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);
@@ -379,7 +386,7 @@ protected:
bool dl_window_stalled() const;
void reuse_tbf();
void start_llc_timer();
- int analyse_errors(char *show_rbb, uint8_t ssn);
+ int analyse_errors(char *show_rbb, uint8_t ssn, ana_result *res);
void schedule_next_frame();
struct osmo_timer_list m_llc_timer;