Age | Commit message (Collapse) | Author | Files | Lines |
|
* document used parameters and return values
* use consistent formatting
* constify function parameters where appropriate (adjusting parameter
types if necessary)
Change-Id: I211b10b4da59c73d509b719346774515c761886a
Related: OS#2282
|
|
* define and use constant for occupied TFI instead copying the same
magic number all over the place
* use libosmocore's define for bit pretty-printer
Change-Id: I2699ceebf0cbec01652a02fa68ccc9e9419d0293
Related: OS#2282
|
|
* drop unused parameters (from both functions and structs)
* document used parameters and return values
* tighten types used for parameters
* use consistent formatting
Tests are adjusted accordingly but test results are left untouched to
avoid regressions.
Change-Id: I39d81ab64ff790b9c4c2d0312a574485cd83e755
Related: OS#2282
|
|
* make is_11bit parameter into bool
* remove is_single_block() from public interface and mark it as static
* move logging outside of if ladder
* move side-effects from is_single_block() into separate static
functions
* simplify UL-TBF allocation in case of 11-bit RACH
This immediately makes it obvious that priority is never actually used
despite being computed - seems like a leftover from merge of incomplete
patch series.
Change-Id: If189b7166a29a87ffb17a7a9bc560f674851fd53
Related: OS#1548
|
|
Move function declarations which use gprs_rlcmac_ul_tbf into tbf.h to
avoid compiler warning:
In file included from pcu_vty.c:15:0:
bts.h:166:27: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter list will not be visible outside of this definition or declaration
void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta);
^~~~~~~~~~~~~~~~~~
bts.h:167:24: warning: ‘struct gprs_rlcmac_ul_tbf’ declared inside parameter list will not be visible outside of this definition or declaration
void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta);
^~~~~~~~~~~~~~~~~~
Change-Id: Ic34c72c8bff6d7c775f56bb6026fec5425f7dcb4
|
|
Promblem:
TA provided from L1 PH-DATA-IND is a relative amount of TA adjustment to actual TA
being used for given TBF. The current TA update algorithm in PCU simply applies the relative
amount of TA to given TBF but does not take into account of current TA.
As a result, the PCU will request wrong TA jump for given TBF if the MS is moving away from
BTS more than 2 km.
Related issue: http://osmocom.org/issues/2611
Fixes:
- The PCU needs increase or decrease current TA of given TBF on receiving of relative
amount of TA adjustment provided by PH-DATA-IND from L1
- The PCU needs to set absolute TA of given TBF on receiving absolute TA provided by
PH-RA-IND from L1.
Change-Id: I65212f8203f1a35278890f51db038d689b2493d5
|
|
* store SI13 in BTS struct
* check and handle BCCH SAPI
Change-Id: I610a93ce23725b182ec14e3507331295bd542f74
Related: OS#2400
|
|
We have seen that UL MCS5- MCS9 link adaptation has not been implemented in current PCU implementation.
If the MS slowly moves far away from the BTS, the UL MCS will always stick at MCS9 no matter UL link quality values leading to poor data service experience.
The UL MCS is expected to adapt from MCS9 -> MCSx due to bad UL quality.
Below PCU traces indicate that UL MCS is quickly increasing to MCS9 (max MCS 9 was used in this test) and it never changes to other UL MCS due zero thresholds.
<0004> gprs_ms.cpp:670 MS (IMSI ): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-6 -> MCS-7
<0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-7 -> MCS-8
<0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 0], modifying uplink CS level: MCS-8 -> MCS-9
Change-Id: I9272c337ad6399da4a47cc6e2736e25f24e099d8
|
|
This function does not really belongs to BTS and it heavily relies on
direct access to TBF-DL members anyway.
Change-Id: I04584103018675a2f35cfb565473bfd81a208d7c
Closes: OS#1540
|
|
osmo-bts already supports configuring a different path for the bts<->pcu
socket by using the 'pcu-socket' config field.
Change-Id: I9b3e1171da467519750b201849ec892a1e318129
|
|
This allows us to send GSMTAP for PTCCH only if requested by user/vty
Change-Id: Id720f4bebdce7f6152fbddddbe05036638c5866e
|
|
When looking at GSMTAP output so far, one is easily overwhelmed by way
too much information being presented. A lot of is consists of DUMMY
frames, which are probably of lowest interest, ever.
A concept similar to the "gsmtap-sapi" of OsmoBTS is introduced, by
which the user can configure which particular categories (uplink or
downlink control or data, gprs or egprs, ...) he actually wants to
see in his logs.
Change-Id: I297183690e98a7234dfc1608c18847d8981306e4
|
|
Fix error introduced in 1275a3f91a744e011b0dba82b09124d249c7abb5 by
using signed 32 bit integer which is enough for Frame Number in
GSM. Also, mark parameter constraints more explicitly:
- add assert for expected FN values
- don't perform computation for non-relative FN
The error was:
bts.cpp: In member function ‘uint32_t BTS::rfn_to_fn(uint32_t)’:
bts.cpp:554:25: error: call of overloaded ‘abs(uint32_t)’ is ambiguous
if (abs(rfn - m_cur_rfn) > RFN_THRESHOLD) {
^
In file included from /usr/include/c++/6/cstdlib:75:0,
from /usr/include/c++/6/stdlib.h:36,
from /usr/include/osmocom/core/linuxrbtree.h:97,
from /usr/include/osmocom/core/timer.h:35,
from ./bts.h:29,
from bts.cpp:21:
/usr/include/stdlib.h:735:12: note: candidate: int abs(int)
extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
^~~
In file included from /usr/include/c++/6/stdlib.h:36:0,
from /usr/include/osmocom/core/linuxrbtree.h:97,
from /usr/include/osmocom/core/timer.h:35,
from ./bts.h:29,
from bts.cpp:21:
/usr/include/c++/6/cstdlib:185:3: note: candidate: __int128 std::abs(__int128)
abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
^~~
/usr/include/c++/6/cstdlib:180:3: note: candidate: long long int std::abs(long long int)
abs(long long __x) { return __builtin_llabs (__x); }
^~~
/usr/include/c++/6/cstdlib:172:3: note: candidate: long int std::abs(long int)
abs(long __i) { return __builtin_labs(__i); }
Change-Id: Ib6d895a97aa35414f245ea4406c6e78f1b4fb5b8
|
|
The implementation of the method rcv_rach() in class BTS, restores
the absolute frame number of the incoming RACH-Request by using
the relative frame number (RFn = Fn mod 42432) from the rach
request and the already known internal absolute frame number
m_cur_fn, which is continusly updated by the CCU interface.
In some rare cases, a RACH request might be received by the BTS,
a very short time before the frame number wraps in its 42432.
Depending on the PCU location, RACH request might be received
by the BSC, which forwards it to the PCU. It is then likely
that, while the RACH request is being forwarded to the PCU, the
PCU internal absolute frame number wraps before the RACH
can be processed. The relative frame number from the rach
request would then be interpreted as if it were received after
the wrapping of the internal frame number modulos.
This commit adds logic to detect and resolve this race condition.
Also a unit test is added to check some cornercases.
Change-Id: I74f00c11e5739d49f370ce6c357149e81d9aa759
|
|
Array indexing mismatch is corrected for SPB counters.
(bts_ctr_description with the bts counter declaration).
Change-Id: I9b17ca0f838a37d9405cebf2319e722a302f5ed9
|
|
Adds spb counters at BTS level(show bts statistics).
Adds RLC/MAC downlink control msg at ms level(show ms imsi <imsi_val>).
Adds the number of coding schemes counter for UL at TBF level.
Change-Id: Icbe4ba95e34bea89ee36f532d099db68204b7c38
|
|
Adds counters for Immediate Assignment Reject, Packet Access Reject,
Channel Request Description and Final Block resend.
Change-Id: I23e326d4ea489aa4967e452fe02773b44ab146f7
|
|
Adds counters for MCS blocks, 11 bit Rach counters and others.
Change-Id: I605b0d66eb217decd35cbb8f87abfa577760245a
|
|
Separate qbit-TA to TA conversion into separate function and use it for
computing and updating Timing Advance.
Note: the code was tested with TA=0 only to make sure it does not
introduce regressions.
Change-Id: I96fdbb20b09fb85fdd9fb6dcf3c25f6bee7f80e4
Fixes: OS#1531
|
|
A function is_single_block is added to get request type of RACH.
EGPRS 11 bit RACH is handled.
Change-Id: I61d74a32f7764644ed86f7fdf97fa3c2f61503f7
|
|
Interface structure between osmo-bts and osmo-pcu is updated with
the parameters to differentiate the type of RACH and further
support 11 bit RACH. The function prototype and definitions are
changed accordingly. Interface version number is increased.
Change-Id: I265c2d92d36d6cbcbeee60cdd8407dafe1da06a4
|
|
Modify the header files with necessary data structure to handle
Split block for EGPRS DL TBF.
The EGPRS resegmentation feature allows PCU to retransmit
RLC blocks of HeaderType1, HeaderType2 by segmenting
them to 2 HeaderType3 blocks(Example MCS5 will be
retransmitted as 2 MCS2 blocks). Table 10.4.8b.2 of 44.060
explains the possible values of SPB in HeadrType3 for DL
direction. The PCU decides to retransmit the
blocks by resegmenting it based on Table 8.1.1.1 of 44.060.
The retransmission MCS is calculated based on current MCS of
the Block and demanded MCS by PCU. Section 10.3a.3.3 of 44.060
shows the HeadrType3 with SPB field present in it
Change-Id: I57673e53a9da2affa7e8aaa6551ac4b271c3d525
|
|
Function is added to parse the EGPRS header type 1 in uplink tbf path.
along with configuration parameter updation to reflect max mcs in UL
Change-Id: I13c250e2e07377982ac3f29745f3cffd4088552a
Reviewed-on: https://gerrit.osmocom.org/270
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Tested-by: Jenkins Builder
|
|
rlc.dl_bytes bytes before sending rlc
rlc.dl_payload_bytes count data w/o LI
rlc.ul_bytes bytes when received rlc (only valid)
rlc.ul_payload_bytes count data fragments w/o LI
llc.dl_bytes complete encapsulated LLC PDUs
llc.ul_bytes complete received LLC PDUs
Change-Id: I9a98a5a375d39b3f4990360056c4d6145e755f4d
Reviewed-on: https://gerrit.osmocom.org/145
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Reviewed-by: Holger Freyther <holger@freyther.de>
Tested-by: Jenkins Builder
|
|
Counts control messages (UL/DL assignment, UL ACKs or page requests)
Change-Id: Ib41031d430beddfb48d54470e632436f2c99c360
Reviewed-on: https://gerrit.osmocom.org/99
Reviewed-by: Holger Freyther <holger@freyther.de>
Tested-by: Jenkins Builder
|
|
rlc_sent_dummy count the amount of dummy package which are
sent in case no data packet is in the queue.
Change-Id: Ia60eab853d9145980f30d63e4ce4b520b8c51381
Reviewed-on: https://gerrit.osmocom.org/85
Tested-by: Jenkins Builder
Reviewed-by: Holger Freyther <holger@freyther.de>
|
|
This option allows user to use custom IP address instead of default "localhost".
Correspondingly gsmtap init moved from sysmoBTS-specific code up to "bts" struct
level. This way it can be easier reused by other implementations. The
lack of regressions was verified by checking following command on
sysmoBTS: "./osmo-pcu -c osmo-pcu.cfg -r 1 -i 192.168.10.1" where
192.168.10.1 is the host which was running wireshark and netcat:
"nc -u -l 192.168.10.1 -p 4729" to accept gsmtap flow.
|
|
Increment CTR_TBF_DL_ABORTED/CTR_TBF_UL_ABORTED if a TBF gets freed
that is still in state GPRS_RLCMAC_FLOW.
Sponsored-by: On-Waves ehf
|
|
Currently the window size is fixed to 64 even for EGPRS.
Support dynamic window sizes depending on the number of PDCH. The
WS can be set to b + f * N_PDCH. If the result is not valid according
to TS 44.060, Table 9.1.9.2.1, the value will be corrected to use the
next lower valid value (or 64).
The following VTY commands are added (config-pcu node):
window-size <0-1024> set base (b) value and leave f unchanged
window-size <0-1024> <0-256> set base (b) and factor (f)
Sponsored-by: On-Waves ehf
|
|
Currently gprs_rlc_ul_window and gprs_rlc_dl_window are completely
separate classes, containing several identical members and methods.
This commit add a shared parent class containing WS and SNS handling.
Sponsored-by: On-Waves ehf
|
|
Currently the plain 'egprs' command enables EGPRS but doesn't prevent
phones from being served in GPRS mode if they do not support EGPRS.
This involves complex frame allocation implementations in dynamic
mode, especially if 8PSK is being used. This is due to the inability
of non-EGPRS phone to decode 8PSK USF and ES/P altogether. Since
polling has a higher priority than USF, collisions will have to be
prevented by the PCU by never using an GPRS USF if it refers to a FN
that is already being used for polling.
This commit just disables mixed usage by ignoring GPRS-only request
if EGPRS is enabled.
The following VTY command (config-pcu node) is changed:
egprs -> egprs only
Sponsored-by: On-Waves ehf
|
|
Currently this message is ignored.
Support decoding and handling of this message. Use a bitvec for the
decoder that just represents a BSN sequence without any encoding
details (first bit -> first BSN). Return the corresponding BSN range
(snsmod(bsn_begin + bits_in_bitvec) = bsn_end), so snsmod(bsn_end-1)
is the last BSN if there is at least 1. If bsn_begin == bsn_end, no
BSNs has been added.
Note that this bitvec is not yet used for RBB handling. It just calls
the old rcvd_dl_ack with a faked (all bits are 1) RBB map.
Sponsored-by: On-Waves ehf
|
|
Provide the initial MCS values for EGPRS data blocks. They are set
to 1 (MCS-1) for each direction and there is no support to change
these configuration values yet (the automatic adaption still works,
so there is probably no need to set these values).
Sponsored-by: On-Waves ehf
|
|
This sets the maximum MCS encoding used for EGPRS RLC data blocks
in either direction.
The following VTY command are added to node config-pcu:
- mcs max <1-9> set maximum for both, uplink and downlink
- mcs max <1-9> <1-9> set maximum for downlink and uplink (in that
order)
- no mcs max do not limit
Note that using a value of 4 or below for each direction implies
that a GMSK-only TBF may be assumed, which for instance would allow
the use of the GPRS MS class instead of the possibly more restrictive
EGPRS MS class.
Sponsored-by: On-Waves ehf
|
|
LListHead does basically the same like llist_pods, but more C++ish
and with type safety.
This commit turns the former list field of gprs_rlcmac_tbf into a
private field, provides accessors, moves the related code from
pcu_vty.c to pcu_vty_functions.cpp, and removes the llist_pods
type and related code.
Sponsored-by: On-Waves ehf
|
|
This commit removes the code that is no longer used due to the commit
"Use a single PDCH rcv_data_block method for GPRS and EGPRS".
Sponsored-by: On-Waves ehf
|
|
Currently GPRS is handled by the old code path while EGPRS already
uses the unified functions. The rcv_block_egprs is basically not
specific to EGPRS and just needs minor modifications to handle GPRS.
This commit turns gprs_rlcmac_pdch::rcv_block_egprs into a unified
rcv_data_block method and uses it for GPRS, too.
Note that the logging messages of the new parser are different.
Sponsored-by: On-Waves ehf
|
|
This commit renames rcv_data_block_acknowledged to
rcv_data_block_acknowledged_gprs to separate it from EGPRS data block
decoding.
Sponsored-by: On-Waves ehf
|
|
This stub function gets called when an EGPRS data package arrives.
Sponsored-by: On-Waves ehf
|
|
Currently the block size is mapped by a switch statement to strip
extra bits that are not used for RLC blocks. That information is
already available via the GprsCodingScheme class.
This commit moves the CS/MCS detection to the rcv_block message and
passes the cs object via rcv_block_gprs, where the length gets
adjusted, to gprs_rlcmac_pdch::rcv_data_block_acknowledged. There the
switch statement is removed.
Note that the TbfTest.err changes due to an additional log message.
Sponsored-by: On-Waves ehf
|
|
Add an egprs_ms_class argument to the allocation functions and
set/pass it where necessary.
Sponsored-by: On-Waves ehf
|
|
Add a global config flag to enable the use EDGE/EGPRS.
The following VTY commands are added to node config-pcu:
- egprs Enables EGPRS
- no egprs Disable EGPRS
Note that enabling EGPRS is experimental and will most likely break
packet transmission until a minimal required set of EGPRS
functionality is implemented.
Sponsored-by: On-Waves ehf
|
|
Add a global stat_item group for measurement values and a
corresponding macro to get and set the values.
Add a stat_item STAT_MS_PRESET to monitor the number of
MS objects in the storage.
Sponsored-by: On-Waves ehf
|
|
When a timeout has occured several times, the procedures handled by
poll_timeout are aborted. This happens when the number of repetitions
exceed N3105. Currently only the timeouts themselves are counted.
This commits adds counters that are incremented if a procedure has
really failed.
New counter:
- rlc.ass.failed: Count failing UL and DL assigments via PACCH
- rlc.ack.failed: Count failing DL Ack/Nack requests
Sponsored-by: On-Waves ehf
|
|
Currently all of these messages are discarded if they are assumend to
be caused by noise. But even in these cases, the FN and TN values
which are added by the DSP are valid. So these can be used to update
the current_frame value.
The osmo-bts sets the fBFILevel of a physical channel to -200dB if it
is used for PDTCH or PACCH which is the case for all PDCH. This way
a data_ind or ra_ind message is already send at least once per block
period (4 frames) per PDCH. These messages are passed to either
handle_ph_data_ind or handle_ph_ra_ind even if they contain garbage
data.
The ra_ind messages are sometimes sent a few frames earlier than
data_ind messages using the same frame.
This commit adds calls to update the current_frame value based on all
of these messages before they are discarded. The FN taken from ra_ind
are passed with an increased max_delay (5) to compensate for early
ra_ind messages.
Sponsored-by: On-Waves ehf
|
|
Currently a log entry is written if FN_data_ind - FN_time_ind <= -13.
This commit adds a counter 'rlc.late-block' that is incremented in
these cases.
Sponsored-by: On-Waves ehf
|
|
The FN of the data_ind taken from the DSP are monotonic, so latency
does not affect the detection of poll timeouts if these FN are used.
If the FN is larger than a poll_fn value, it can safely be assumed
that the poll response will not arrive later on.
Currently a max_delay of 60 frames is used, which has the drawback
that additional ~250ms will pass until a lost ACK is detected.
Using the data_ind's FN alone breaks the poll timeout detection if
there are no other MS sending data blocks.
This commit adds BTS::set_current_block_frame_number that is called
with the FN taken from data_ind messages. The max_delay is set to 0
which removes the additional delay, when this FN is used to detect
poll timeouts. So the average additional delay decreases with the
number of data_ind per time. The current_frame is updated unless it
seems to have been updated already (assumed if 0 < cur_fn - block_fn
< 500). Thus the time_ind has still priority to update the
current_frame value.
Sponsored-by: On-Waves ehf
|
|
This commit fixes several issues:
- Set MS class in request
- Set IMSI in establish_ul_tbf_two_phase
- Fake assigment acknowledgement in establish_ul_tbf_two_phase
- Fix TFI bit offset to 1 (was 2)
Sponsored-by: On-Waves ehf
|
|
Currently packets are only dropped if they have reached their maximum
life time. This leads to LLC queues being constantly filled under
load, increasing the latency up to the maximum life time. This kind
of bufferbloat hinders TCP's congestion avoidance algorithms. To keep
the queues short, the CoDel active queue management algorithm can be
used.
This commit changes to llc_dequeue method to apply the CoDel
algorithm to selectively drop LLC frames before they passed to the
TBF layer to be encoded in BSNs. This feature is currently disabled
by default.
The CoDel state is managed per MS since the LLC queues are also kept
in the MS objects.
Note that there is still some buffering in the TBF objects, in the
worst case (CS4) 3.5kByte + LLC-MTU octets are stored there. The
resulting additional packet delay is not (yet) taken into account for
CoDel.
Also note that configuration changes are applied to new MS objects
only.
The following VTY commands are added to the 'pcu' node:
- queue codel activates CoDel, the interval is selected by
the implementation
- queue codel interval <1-1000>
activates CoDel with a fixed interval given
in centiseconds (10ms-10s)
- no queue codel deactivates CoDel
Which interval value to use is still an open issue. For high speed
links (e.g. Ethernet), CoDel suggests 100ms. For slower links, the
expected RTT is recommended. The current implementation uses a
default value of 2000ms.
Measurements:
Note that the following measurements depend on several other factors,
most notably the interaction with the SGSN's flow control. They are
just examples to give an idea how CoDel might influence some
parameters.
The measurements have been done with a single E71, first with a
running ping only (Idle), then with an additional TCP download
of a 360k file (Busy). The CoDel interval was set to 1s.
- Idle :
ping ~400ms, avg queue delay 0ms, dropped 0
- Busy, No CoDel:
ping ~6s, avg queue delay 4-6s,
dropped 0, scheduled 948, duration 54s
- Busy, CoDel:
ping 500-1500ms, avg queue delay ~600ms,
dropped 77, scheduled 1040, duration 60s
More measurements with two MS downloading in parallel (two
independant measurements per case).
- Busy, No CoDel:
dropped 0, scheduled 1883, duration 121s
dropped 19, scheduled 2003, duration 133s
- Busy, CoDel:
dropped 22, scheduled 1926, duration 116s
dropped 22, scheduled 1955, duration 108s
Sponsored-by: On-Waves ehf
|
|
Currently there is no persistent state being used in
alloc_algorithm_dynamic. So algorithm B is even used in persistent
high usage scenarios. If there are many active TBFs, multislot
assigments are not fair, because MS of a "higher" multislot class get
higher troughputs. On the other hand, as long as all PDCH are busy no
bandwidth will be wasted even if all MS use algorithm A.
This commit modifies alloc_algorithm_dynamic to disable algorithm B
when that call fails. It then keeps it disabled until there is a
single PDCH which is idle (it is considered idle, if there is at most
one active DL TBF assigned to it).
Sponsored-by: On-Waves ehf
|