aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-06bssgp: Add VTY command to Limit the bucket size by timeJacob Erlbeck1-0/+28
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
2015-05-06bssgp: Make BVC bucket size / leak rate configurableJacob Erlbeck1-0/+119
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
2015-05-04vty: Fix value range of commands accepting csecsJacob Erlbeck1-3/+3
Currently an uint8_t csec variable is used to temporarily store the number of centiseconds which can be set within the range 1 - 65535. This way values above 255 cannot be set properly. This affects the VTY commands "queue lifetime", "queue hysteres", and "queue idle-ack-delay". This commit replaces the uint8_t by an uint16_t. Sponsored-by: On-Waves ehf
2015-05-04vty: Fix warnings about undeclared functionsJacob Erlbeck1-0/+2
This commit adds missing includes to pcu_vty.c and fixes the llist_head type (missing struct keyword) used by tbf_print_vty_info. Sponsored-by: On-Waves ehf
2015-04-09vty: Use libosmocore VTY standardsJacob Erlbeck1-36/+2
This commit applies to following changes to pcu_vty.c: - Use vty_install_default() instead of install_default() - Add a blank after the '#' of the prompt - Rename the 'pcu' configuration node to 'config-pcu' Sponsored-by: On-Waves ehf
2015-04-02tbf: Force ACK after the last DL LCC frame has been receivedJacob Erlbeck1-1/+33
If the protocol layers above LLC (e.g. TCP) need an acknowledgement to continue, it can take up to 400ms (single TS) until the MS is polled for Ack/Nack which it can use to request an uplink TBF quickly. The 400ms result from requesting an DL Ack/Nack every 20 RLC blocks until all pending LLC frames have been sent. Especially TCP's slow start mechanism can lead to a high delay at the start of the connection, since the sender will eventually stop after having sent the first packets (up to 4 (RFC2581) or 10 (RFC6928)). This commit modifies append_data() to (re-)start a timer every time it handles an LLC packet and to request an Ack/Nack every time it expires. So if the server ceases to send IP packets, the MS is polled in the assumption, that the server is waiting for an ACK. The following VTY commands are added (pcu node): - queue idle-ack-delay <1-65535> timeout in centiseconds - no queue idle-ack-delay disable this feature (default) A sensible value is 10 (100ms) that at gave promising results when testing locally. Sponsored-by: On-Waves ehf
2015-04-02tbf: Use a hysteresis when discarding DL LLC framesJacob Erlbeck1-0/+34
Currently single LLC blocks are discarded when the PDU lifetime expires. If an IP packet has been fragmented either on the IP or on the LLC layer and is therefore distributed over several LLC frames, the kept fragments are transmitted and then discarded by the MS because of the missing PDU. This can cause massive IP packet loss when there are many fragmented packets (e.g. when trying 'ping -s1800' or if the GGSN chops downlink IP packets into several SNDCP packets). On the other hand, discarding too many packets might disturb the congestion handling of TCP. Dropping plain TCP ACKs might also hinder flow control and congestion avoidance. This commit adds a hysteresis algorithm to the LLC discard loop. If an LLC message's age reaches the high water mark, further message's with an age above the low water mark are discarded, too. This is aborted, if a GMM, a non-UI, or a small message is detected. In these cases, that message is kept. The following VTY commands are added (pcu config node): - queue hysteresis <1-65535> set the difference between high (lifetime) and low watermark in centiseconds - no queue hysteresis disable this feature (default) Since the SGSN will most probably send all fragments of a single N-PDU without much delay between them, a value slightly above the average transmission delay jitter between SGSN and PCU is probably a sensible value to discard all fragments of a single IP packet. This is an experimental feature that might be replaced by more advanced means of active queue management in the future. Sponsored-by: On-Waves ehf
2015-03-25tbf: Implement delayed release of a downlink TBFJacob Erlbeck1-0/+30
Currently a DL TBF is immediately closed, when the LLC queue is drained. This will lead to a new DL assignment if data is received afterwards. In addition, it is not possible to keep the PACCH open to poll the MS for UL establishment requests there. GSM 44.060, 9.3.1a suggests to delay the release of an inactive TBF for some time (max 5s). This commit mainly changes create_new_bsn() to send LLC dummy commands as filler if no LLC data is available until keep_open() returns false. The keep_open() functions returns true unless a configurable time has passed after the LLC data store drained. By default, that time is not set which causes keep_open() to always return false, so that delayed release is effectively disabled. The following VTY commands are added: - dl-tbf-idle-time <1-5000> to set the delay in ms - no dl-tbf-idle-time to disable delayed release Ticket: #556 Sponsored-by: On-Waves ehf
2014-12-20Fix VTY documentationHolger Hans Peter Freyther1-1/+1
Documentation error (missing docs): <command id='show tbf all'> <param name='all' doc='(null)' />
2014-07-02misc: Add missing include for the rate counterHolger Hans Peter Freyther1-0/+1
pcu_vty.c:285:2: warning: implicit declaration of function 'vty_out_rate_ctr_group' is invalid in C99 [-Wimplicit-function-declaration] vty_out_rate_ctr_group(vty, "", bts_main_data_stats()); ^
2014-07-02misc: Add missing include for atoiHolger Hans Peter Freyther1-0/+1
pcu_vty.c:128:21: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration] bts->fc_interval = atoi(argv[0]); ^
2014-07-02misc: Add {} to avoid nested if/if/else ambigioutyHolger Hans Peter Freyther1-1/+2
pcu_vty.c:89:3: warning: add explicit braces to avoid dangling else [-Wdangling-else] else
2014-01-15pcu_vty: Add a command to print info about all TBFsDaniel Willmann1-1/+23
2013-11-11pcu: Address the return without valueHolger Hans Peter Freyther1-0/+1
Fixes: Coverity CID 1040959
2013-10-30bts: Start creating statistics inside the BTS codeHolger Hans Peter Freyther1-0/+11
2013-10-30bts: Introduce a singleton for the BTS and use it in the codeHolger Hans Peter Freyther1-12/+12
Compared to the previous code there will be a branch to get the global pointer so the code will be slightly slower than the previous version but it allows us to start creating objects but still use the code from C. It is best approach I have found so far. One downside of C++ is that by default talloc will not be used (unless we override the new operator to use talloc. Right now we need to memset the C data structure by hand. The benefit of enforcing a better structure should is more important though.
2013-10-30bts: Move struct gprs_rlcmac_bts and other structs into a bts.hHolger Hans Peter Freyther1-0/+1
Begin to make the BTS a real C++ object with real responsibilities. The biggest issue will be the pcu_vty.c that might not like C++ at all.
2013-01-17VTY: complete the copyright messageHarald Welte1-1/+2
2012-10-03Allow setting of seperate coding schemes for uplink and downlinkAndreas Eversberg1-4/+14
2012-09-27Set Alpha and Gamma at assingment messages for power controlAndreas Eversberg1-2/+33
The initial power control value Alpha must be set in SI13.
2012-09-23Statefull reset and unblock BVCs and sending flow control messagesAndreas Eversberg1-1/+17
The flow control interval can be set via VTY.
2012-08-07Adding single block allocationAndreas Eversberg1-0/+28
It is mandatory to support it because MS may request a single block. In this case the network must assign a single block. It is possible to force single block allocation for all uplink requests on RACH. (VTY option)
2012-07-23VTY: Select timeslot allocation algorithm via VTYAndreas Eversberg1-0/+27
The selections are: single slot or multislot
2012-07-21Add check of lifetime of LLC frameAndreas Eversberg1-0/+50
If lifetime expires of queued LLC frames, they are discarded. The number of discarded frames and the sum of their octets are reported to SGSN via LLC-DISCARDED message. The lifetime can be overridden via VTY. The value can be centi-seconds or "infinite".
2012-07-20VTY: Added option to force given CS and ignore the scheme given by BTSAndreas Eversberg1-20/+67
2012-07-13VTY implementationAndreas Eversberg1-0/+104