aboutsummaryrefslogtreecommitdiffstats
path: root/src/gprs_bssgp_pcu.cpp
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-06 10:47:30 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2015-05-06 15:22:33 +0200
commit0288cdb0a8d4011905da55a5b74319e38e27e70d (patch)
treefa2b38468292440418d1ab8e73619193162e7421 /src/gprs_bssgp_pcu.cpp
parent3d62fc55d89fe1f2da0f0ca1950ab97da7e07418 (diff)
bssgp: Add VTY command to Limit the bucket size by time
Currently the bucket size is by default being computed based on the leak rate and the expected life time of LLC frames. The latter is either taken from 'queue lifetime' (if given) or a fixed value is used. Using 'queue lifetime' has the drawback that it sets a 'hard' limit, since frames will be dropped if they stay in the queue for a longer time. This commit adds a VTY command to specifically set the time used for the computation of the bucket size advertised to the SGSN. It does not affect the PCUs queue handling in any way. If the bucket time is not set (or if the 'no' command has been used), the old behaviour (see above) is applied. The following VTY commands are added (config-pcu node): - flow-control bucket-time <1-65534> Sets the time in centisecs - no flow-control bucket-time Don't use this time Ticket: OW#1432 Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r--src/gprs_bssgp_pcu.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp
index 3737438c..bb6f7c53 100644
--- a/src/gprs_bssgp_pcu.cpp
+++ b/src/gprs_bssgp_pcu.cpp
@@ -530,12 +530,16 @@ static uint32_t compute_bucket_size(struct gprs_rlcmac_bts *bts,
uint32_t leak_rate, uint32_t fallback)
{
uint32_t bucket_size = 0;
+ uint16_t bucket_time = bts->fc_bucket_time;
- if (bts->force_llc_lifetime == 0xffff)
+ if (bucket_time == 0)
+ bucket_time = bts->force_llc_lifetime;
+
+ if (bucket_time == 0xffff)
bucket_size = FC_MAX_BUCKET_SIZE;
- if (bucket_size == 0 && bts->force_llc_lifetime && leak_rate)
- bucket_size = (uint64_t)leak_rate * bts->force_llc_lifetime / 100;
+ if (bucket_size == 0 && bucket_time && leak_rate)
+ bucket_size = (uint64_t)leak_rate * bucket_time / 100;
if (bucket_size == 0 && leak_rate)
bucket_size = leak_rate * FC_DEFAULT_LIFE_TIME_SECS;