aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcu_vty.c
AgeCommit message (Collapse)AuthorFilesLines
2015-06-29vty: Fix documentation for 'no cs downgrade-threshold'Jacob Erlbeck1-1/+1
The NO_STR is missing, this commit adds it. Fixes: Jenkins #603 Sponsored-by: On-Waves ehf
2015-06-22ms: Reduce DL CS level if only a few LLC bytes are leftJacob Erlbeck1-0/+34
If just a few bytes are left to send to the MS, it makes sense to reduce the coding scheme level to increase the throughput. This has been shown by Chen and Goodman in their paper "Theoretical Analysis of GPRS Throughput and Delay". See their throughput over C/I measurement graphs (figures 4 and 5 in the paper) for details. This commit implements a simplified CS downgrade feature for the downlink. The coding scheme will be downgraded if there are only a few octets are left to be send over the TBF (see the downgrade-threshold command below) and the NACK rate is not low (the CS will not get degraded on a high quality RF link). As an exception, CS-3 will be degraded to CS-1, since CS-2 does not improve the throughput in general when a few small packets are sent and the signal fades slowly (see Chen/Goodman). The following VTY command is added to the config-pcu node: - cs downgrade-threshold <1-10000> - cs no downgrade-threshold to set the threshold of the number of remaining bytes to be RLC/MAC encoded. The CS will only be reduced, if the number is below the threshold. The 'no' command disables this feature completely. The default value is 200 octets. Sponsored-by: On-Waves ehf
2015-06-22ms: Add UL CS selection based on L1 link qualityJacob Erlbeck1-0/+45
Currently the UL CS values are set to the corresponding DL CS value, eventually limited by a maximum value. This approach does not reflect the general situation of the RF link between ME and BTS, which is rather asymmetric e.g. due to a lower degree of TX efficiency of the built-in antenna. This means, that UL and DL CS control should be decoupled for better results. This commit adds automatic UL CS selection based on the link quality measurement parameter. Each coding scheme is mapped to a link quality range. If the link quality value leaves that range, the current UL CS value is increased/decreased accordingly. This value will be copied when the next PACKET_UPLINK_ACK_NACK or PACKET_UPLINK_ASSIGMENT is sent to the MS. The following VTY command will be added to the config-pcu node: - cs link-quality-ranges cs1 <0-35> cs2 <0-35> <0-35> cs3 <0-35> <0-35> cs4 <0-35> which sets the ranges for the four coding schemes. For instance the example below reflects the current default values: cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12 set the following ranges, where the overlapping is used to configure a hysteresis: CS1: -inf .. 6 CS2: 5 .. 8 CS3: 7 .. 13 CS4: 12 .. inf Sponsored-by: On-Waves ehf
2015-06-08vty: Add command to show detailed MS infoJacob Erlbeck1-0/+26
This commit extends the "show ms" command to display an extended set of information for a single MS. The following VTY commands are added: - show ms tlli TLLI - show ms imsi IMSI Sponsored-by: On-Waves ehf
2015-06-08ms: Add support for maximum CS valuesJacob Erlbeck1-4/+48
Currently the CS values can be increased to CS4 even when the "cs" configuration command has been used with a lower value. The "cs" command just sets the initial coding scheme, so other means are needed to limit the selection. One approach is to use the CS flags passed in SI, but these are currently ignored. To make it possible to limit the CS selection by configuring the PCU, this commit adds the following VTY commands to config-pcu: - cs max <1-4> Limit DL and UL CS to the given value - cs max <1-4> <1-4> Limit DL and UL CS separately (DL first) - no cs max Don't limit Ticket: #1674 Sponsored-by: On-Waves ehf
2015-06-08tbf: Add adaptive coding scheme configurationJacob Erlbeck1-2/+52
This commit adds the following VTY commands to config-pcu: - cs threshold <0-100> <0-100> Enables adaptive CS selection - no cs threshold Disables it The "cs threshold LOW HIGH" command sets the water marks (cs_adj_lower_limit and cs_adj_upper_limit) used to decide about switching coding schemes. Ticket: #1739 Sponsored-by: On-Waves ehf
2015-06-08vty: Add 'show ms all' commandJacob Erlbeck1-0/+10
This command lists the entries of the ms_store by a line per MS. Beside TLLI and IMSI, some measurement and state information is shown. A ms_list() getter method is added to GprsMsStorage to obtain a list of the MsGprs objects. The following VTY command is added to the 'enable' node: - show ms all Sponsored-by: On-Waves ehf
2015-06-08vty: Add a file for C++ functionsJacob Erlbeck1-1/+3
Currently the pcu_vty.c doesn't compile with C++. Thus C++ object cannot be access directly there. This commit adds a helper C++ file that exports all functions with C calling conventions and naming to work around that limitation until the transition of pcu_vty.c is completed. Sponsored-by: On-Waves ehf
2015-05-28tbf: Set MS timeoutJacob Erlbeck1-0/+27
This commit sets the MS timeout when the MS object is created. The value is taken from the ms_idle_sec field in gprs_rlcmac_bts which can be changed by the VTY commands shown below. The following VTY commands are added to the config-pcu node: - ms-idle-time <1-7200> Set the timeout in seconds - no ms-idle-time Disable the timeout Another timer that is related is T3314 (Ready Timer, default 44s, GSM 24.008, 11.2.2) which requires the SGSN to use paging after its expiry. Longer timeouts can help if adaptive coding scheme selection is used (not yet implemented). On the other hand, measurement values (TA, signal quality) can get invalid after some time, especially with a moving MS. So a value slightly above T3314 is probably a good value to start with. Sponsored-by: On-Waves ehf
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