aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_bssgp_pcu.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/gprs_bssgp_pcu.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/gprs_bssgp_pcu.h')
-rw-r--r--src/gprs_bssgp_pcu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gprs_bssgp_pcu.h b/src/gprs_bssgp_pcu.h
index e0b83121..bb449034 100644
--- a/src/gprs_bssgp_pcu.h
+++ b/src/gprs_bssgp_pcu.h
@@ -62,6 +62,9 @@ struct gprs_bssgp_pcu {
struct timeval queue_delay_sum;
unsigned queue_delay_count;
uint8_t fc_tag;
+ unsigned queue_frames_sent;
+ unsigned queue_bytes_recv;
+ unsigned queue_frames_recv;
/** callbacks below */
@@ -86,5 +89,7 @@ struct bssgp_bvc_ctx *gprs_bssgp_pcu_current_bctx(void);
void gprs_bssgp_update_queue_delay(const struct timeval *tv_recv,
const struct timeval *tv_now);
+void gprs_bssgp_update_frames_sent();
+void gprs_bssgp_update_bytes_received(unsigned bytes_recv, unsigned frames_recv);
#endif // GPRS_BSSGP_PCU_H