Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently the msg data is accessed and index 0 assuming the msg is
not empty. While this should be always the case, the msg can be
empty if there are software errors in the message creation functions.
This commit adds an assertion to catch this kind of bugs.
Sponsored-by: On-Waves ehf
|
|
Currently the GPRS parameters are used, which is ok for the WS but
not for the SNS.
This commit uses RLC_EGPRS_SNS and RLC_EGPRS_MIN_WS for the window
configuration.
Sponsored-by: On-Waves ehf
|
|
Currently the EGPRS mode is enabled in setup_tbf depending on the
values of egprs_ms_class and bts->egprs_enabled (both must be != 0).
This makes it difficult to set different values (like window
parameters) depending on the direction.
This commit moved the initialisation part to tbf_alloc_ul_tbf und
just leaves the setting of the ms_class to setup_tbf.
Sponsored-by: On-Waves ehf
|
|
Currently the values for WS and SNS are fixed to 64 (WS) and 128
(SNS) which are the only values that can be used with GPRS. On the
other hand, EGPRS requires an SNS of 2014 and a WS in the range of
64 to 1024.
This commit adds member variables and setters to both window
classes. By default, the GPRS values are being used.
Sponsored-by: On-Waves ehf
|
|
Currently the gprs_rlc_dl_window and gprs_rlc_ul_window do not have
constructors, but need to get initialized explicitly.
This commit adds constructors to both classes and removes explicit
external initialization code.
Sponsored-by: On-Waves ehf
|
|
Currently in some places uint8_t is being used to encode BSNs and
SSNs. This is inconsistent and (even worse) not enough for EPGRS
which uses an SNS of 2014.
This commit changes these to uint16_t.
Sponsored-by: On-Waves ehf
|
|
Currently there is only a mod_sns() method which is being used in
expression like bsn_expr & win.mod_sns(). This only works, because
it is known that mod_sns() is (sns() - 1) where sns() in turn is
always 2^n. This is error prone, hard to read, and relies on window
specifics that should be kept inside the respective module.
This commit adds a mod_sns(uint bsn) method to gprs_rlc_ul_window and
gprs_rlc_dl_window, that encapsulates and hides this optimized
computation.
Sponsored-by: On-Waves ehf
|
|
This commit adds EGPRS UL Ack/Nack encoding based on the CSN1 code.
Note that the bitmap encoding is still broken and not easy to fix
with the CSN1 framework, especially w.r.t. the length field.
Therefore this implementation will be abandoned and replaced by a
bitvec based one.
Sponsored-by: On-Waves ehf
|
|
Currently the same selector chain is used several times in the same
function.
This commit adds a pointer to Packet_Uplink_Ack_Nack and uses that
instead.
Sponsored-by: On-Waves ehf
|
|
Currently the Encoding::write_packet_uplink_ack function only
supports GPRS.
Split this function into a generic and a GPRS specific part.
Sponsored-by: On-Waves ehf
|
|
Log incoming RLC data messages and RLC data units to LOGL_DEBUG.
Sponsored-by: On-Waves ehf
|
|
ASAN has found improper deletion of objects. These only occur
on shutdown but makes it impossible to run the test cases with
full ASAN support.
This commit fixes some of them and deactivates the freeing of the_pcu.bctx
which may cause a corruption in BTS::~BTS() later on.
Note that the latter is only a work-aound and should be fixed
properly. It will leak bctx objects, but this is currently not
critical, since gprs_bssgp_destroy is only called once, immediately
before a call to exit().
Ticket: OW#1572
Sponsored-by: On-Waves ehf
|
|
Sponsored-by: On-Waves ehf
|
|
Use a signed integer instead of an unsigned one for num_chunks
which can set to a negative value on error.
Ensure that chunks is not dereferenced if it is NULL. In fact
that will not happen currently, since num_chunks is now always
<= 0 if chunks == NULL.
Fixes: Coverity CID 1347433, 1347434, 1347435
Sponsored-by: On-Waves ehf
|
|
Currently the control block scheduler does not seem to be fair in all
cases. At least it happend while testing the EGPRS code, that a
Uplink Ack/Nack message got never be sent, because a Downlink
assignment took over all the times.
This commit changes the round robin code to always increment the
priority offset by 1 instead of (i + 1). The former definitely
ensures that every message type gets the highest priority after some
steps. The latter might be more fair in some situations, but that and
its correctness are not proven.
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 replaces the stub by a method that decodes the block
first, and passes it to the TBF object associated with the TFI.
Sponsored-by: On-Waves ehf
|
|
The current rcv_data_block_acknowledged_gprs method is tightly
coupled to GPRS.
This commit adds variants of the involved methods that support
EGPRS and GPRS RLC encodings likewise.
Sponsored-by: On-Waves ehf
|
|
Currently gprs_rlcmac_tbf::extract_tlli takes care of decoding and
the TBF update. These are really different things and doing the
decoding in extract_tlli makes EGPRS support more complex.
This commit moves the TBF state related part into a new method
gprs_rlcmac_tbf::set_tlli_from_ul.
Sponsored-by: On-Waves ehf
|
|
Currently the coding scene is stored as number N, where there scheme
is CS-N.
This commit replaces this by a GprsCodingScheme type cs value. The
gprs_rlcmac_cs table is no longer needed and thus removed.
Sponsored-by: On-Waves ehf
|
|
These methods will be needed for EGPRS decoding.
The is_received method returns true iff a block with the given BSN
has already been received in the current window. A call to
invalidate_bsn marks the block as not received.
Sponsored-by: On-Waves ehf
|
|
Currently gprs_rlc_ul_window::receive_bsn calls raise_v_q and returns
the number of RLC data blocks that can be taken from the queue. This
does not fit the EGPRS feature to put 2 independant data blocks in a
single RLC block.
This commit removes raise_v_q from receive_bsn, hence it must be
called explicitely to get the number of processable data blocks.
Sponsored-by: On-Waves ehf
|
|
This commit adds new RLC block decoder functions that support both
GPRS and EGPRS. The code path is selected based on the value of the
GprsCodingScheme cs object.
- rlc_parse_ul_data_header
parses the header of an RLC data block including the E and FBI/TI
flags (currently supported CS-1 - CS-4, MCS-1 - MCS-4).
- rlc_copy_to_aligned_buffer
copies an RLC data unit to a byte aligned buffer and returns
the unit's length.
- rlc_get_data_aligned
is a convenience wrapper around rlc_copy_to_aligned_buffer
that avoids copying if the data unit is already byte aligned.
Sponsored-by: On-Waves ehf
|
|
This commit adds the methods maxDataBlockBytes and numDataBlocks
which provide information about the data areas within RLC messages.
In these areas, the extension bytes, TLLI, and the LLC data are
stored.
Sponsored-by: On-Waves ehf
|
|
Currently the declarations of rlc_ul_header, rlc_dl_header, and
rlc_li_field silently assume that a gcc for a little endian platform
is being used.
This commit adds '#if OSMO_IS_LITTLE_ENDIAN' the ensure the correct
byte ordering.
Sponsored-by: On-Waves ehf
|
|
The header type depends on the coding scheme, for GPRS there is a
single data header type per direction, for EGPRS there are 3 per
direction. In addition, control block header types are used with CS-1
only, so there is one of the per direction altogether for GRPS and
EGPRS.
This commit adds the header type enum and two methods headerTypeData
and headerTypeControl.
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
|
|
Currently the coding scheme is checked and compared at different
places which makes in cumbersome to extend it for EGPRS.
This class encapsules the coding scheme and provides required meta
information like sizes as well as helper methods.
Sponsored-by: On-Waves ehf
|
|
The multislot (MS) class and the EGPRS MS class can also be passed
via BSSGP in an MS Radio Access Capability element which can
optionally be contained in a DL-UNITDATA PDU. While this case is fully
supported for GPRS, the EGPRS MS class in BSSGP messages is ignored.
This commit extends gprs_rlcmac_dl_tbf::handle to pass the EGPRS MS
class, too.
Note, that the EGPRS class is not yet taken from the CSN.1 RA
capability and is always set to 0. Note also, that append_data
still uses ms_class only.
Sponsored-by: On-Waves ehf
|
|
Enable the TBF to use EGPRS if the bts->egprs_enabled config variable
has been set via the VTY "egprs" command and if the MS has signaled a
EGPRS multislot class.
Tell the MS to use EGPRS if the condition above holds.
Note that this will cause the MS to use EGPRS RLC block formats for
further messages which are not yet understood by the PCU.
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 the following methods to gprs_rlcmac_tbf:
- is_egprs_enabled
- enable_egprs
- disable_egprs
Also show the value of the flag in name() by displaying "EGPRS" if
it is set.
Sponsored-by: On-Waves ehf
|
|
Currently the Encoding::write_packet_uplink_assignment method only
supports the GPRS variant of the message.
This commit adds the missing EGPRS variant to the encoder.
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
|
|
The EGPRS MS class ist contained in the MS_RA_capability information.
Its presence indicates, that the MS is able (and willing) to use
EGPRS.
This commit implements basic support for retrieving, storing, and
showing it in the VTY. The information is stored in the MS object.
Sponsored-by: On-Waves ehf
|
|
Currently these are enabled in the default config file. Since CoDel
is enabled by default in main() but should not be used without at
least dl-tbf-idle-time, the current default config may lead to
packet loss and performance problems.
This commit enables both features to provide a good (GPRS) performance
experience even without a configuration.
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
|
|
Sponsored-by: On-Waves ehf
|
|
Sponsored-by: On-Waves ehf
|
|
This OpenBTS socket interface was originally added to enable GPRS
capabilitie with a forked version of OpenBTS, at a time when the public
OpenBTS release didn't yet have any GPRS support.
Meanwhile, the later OpenBTS releases included their own version of
GPRS, without any external PCU/SGSN/GGSN, so this interface is no longer
needed.
This also means that the OsmoBTS socket interface is now the default at
compilation time. There is no other interface.
|
|
|
|
Otherwise it can be very confusing, as Max had to figure out today...
|
|
This also renames the --enable-sysmbts option to --enable-osmobts
This socket interface was nevery sysmoBTS specific, but it is a generic
socket interface to any OsmoBTS supported layer1/hardware. So it was a
mis-nomer so far.
|
|
|
|
We wanted to support gcc-4.2 and this didn't allow us to use
the C99 initializers inside C++ code. Attempt to initialize
the class_id correctly.
|
|
The leak rate sent to the SGSN does not reflect the current CS level,
lost frames, and control message overhead. So the SGSN cannot do
proper queue control under non-optimal conditions.
This commit computes the leak rate for the last flow control interval
by computing the maximum theoretical leak rate and basically
substracting control blocks, nacked blocks, and reduced block sizes
due to CS downgrade. By using this approach, the value will by more
stable on low load, where the value will tend to be near the value
derived from the configuration. On full load the transmitted value is
completely derived from the measurements.
Note that the MS default values are no adapted to the adapted BVC
leak rate, since a single MS which has a lower link quality would
otherwise be reducing the rate of another MS with good radio
conditions, which would not make much sense if they did not share any
PDCH.
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
|