diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-04-21 12:56:48 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-06 15:20:35 +0200 |
commit | 87d7341fbe290582ac4a03f67349496e5306eb04 (patch) | |
tree | 453e943c92b5e0758481e856fe2da0b4d1d0357a /src/gprs_bssgp_pcu.cpp | |
parent | 29d91e92715945f53aff4530602add765d63946e (diff) |
bssgp: Make BVC bucket size / leak rate configurable
Currently the FLOW-CONTROL_BVC message contains fixed values: The tag
is 1, the BVC bucket size is 6MB, the BVC bucket leak rate is
820kbit/s, the MS bucket size is 50kB, and the MS leak rate is
50kbit/s.
This commit makes the BVC parameters configurable and adds the
following VTY commands:
- flow-control force-bvc-bucket-size <1-6553500>
- no flow-control force-bvc-bucket-size
- flow-control force-bvc-leak-rate <1-6553500>
- no flow-control force-bvc-leak-rate
- flow-control force-ms-bucket-size <1-6553500>
- no flow-control force-ms-bucket-size
- flow-control force-ms-leak-rate <1-6553500>
- no flow-control force-ms-leak-rate
The 'no' variants restore the default behaviour.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/gprs_bssgp_pcu.cpp')
-rw-r--r-- | src/gprs_bssgp_pcu.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gprs_bssgp_pcu.cpp b/src/gprs_bssgp_pcu.cpp index 09047203..7c9bb754 100644 --- a/src/gprs_bssgp_pcu.cpp +++ b/src/gprs_bssgp_pcu.cpp @@ -484,12 +484,20 @@ static int nsvc_signal_cb(unsigned int subsys, unsigned int signal, int gprs_bssgp_tx_fc_bvc(void) { + struct gprs_rlcmac_bts *bts; + if (!the_pcu.bctx) { LOGP(DBSSGP, LOGL_ERROR, "No bctx\n"); return -EIO; } + bts = bts_main_data(); + /* FIXME: use real values */ - return bssgp_tx_fc_bvc(the_pcu.bctx, 1, 6553500, 819100, 50000, 50000, + return bssgp_tx_fc_bvc(the_pcu.bctx, 1, + bts->fc_bvc_bucket_size ? bts->fc_bvc_bucket_size : 6553500, + bts->fc_bvc_leak_rate ? bts->fc_bvc_leak_rate : 819100, + bts->fc_ms_bucket_size ? bts->fc_ms_bucket_size : 50000, + bts->fc_ms_leak_rate ? bts->fc_ms_leak_rate : 50000, NULL, NULL); } |