diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-06 10:47:30 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-05-06 15:22:33 +0200 |
commit | 0288cdb0a8d4011905da55a5b74319e38e27e70d (patch) | |
tree | fa2b38468292440418d1ab8e73619193162e7421 /src/pcu_vty.c | |
parent | 3d62fc55d89fe1f2da0f0ca1950ab97da7e07418 (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/pcu_vty.c')
-rw-r--r-- | src/pcu_vty.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pcu_vty.c b/src/pcu_vty.c index bddcaccb..a08ec368 100644 --- a/src/pcu_vty.c +++ b/src/pcu_vty.c @@ -222,6 +222,32 @@ DEFUN(cfg_pcu_no_fc_ms_leak_rate, return CMD_SUCCESS; } +#define FC_BTIME_STR "Set target downlink maximum queueing time (only affects the advertised bucket size)\n" +DEFUN(cfg_pcu_fc_bucket_time, + cfg_pcu_fc_bucket_time_cmd, + "flow-control bucket-time <1-65534>", + FC_STR FC_BTIME_STR "Time in centi-seconds\n") +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->fc_bucket_time = atoi(argv[0]); + + return CMD_SUCCESS; +} + +DEFUN(cfg_pcu_no_fc_bucket_time, + cfg_pcu_no_fc_bucket_time_cmd, + "no flow-control bucket-time", + NO_STR FC_STR FC_BTIME_STR) +{ + struct gprs_rlcmac_bts *bts = bts_main_data(); + + bts->fc_bucket_time = 0; + + return CMD_SUCCESS; +} + + DEFUN(cfg_pcu_cs, cfg_pcu_cs_cmd, "cs <1-4> [<1-4>]", @@ -515,6 +541,8 @@ int pcu_vty_init(const struct log_info *cat) install_element(PCU_NODE, &cfg_pcu_alloc_cmd); install_element(PCU_NODE, &cfg_pcu_two_phase_cmd); install_element(PCU_NODE, &cfg_pcu_fc_interval_cmd); + install_element(PCU_NODE, &cfg_pcu_fc_bucket_time_cmd); + install_element(PCU_NODE, &cfg_pcu_no_fc_bucket_time_cmd); install_element(PCU_NODE, &cfg_pcu_fc_bvc_bucket_size_cmd); install_element(PCU_NODE, &cfg_pcu_no_fc_bvc_bucket_size_cmd); install_element(PCU_NODE, &cfg_pcu_fc_bvc_leak_rate_cmd); |