Age | Commit message (Collapse) | Author | Files | Lines |
|
Currently only header type 3 (MCS-1 to MCS-4) is supported.
Add header structs to rlc.h and extend
Encoding::rlc_write_dl_data_header accordingly.
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
|
|
Ticket: OW#????
Sponsored-by: On-Waves ehf
|
|
Ticket: OW#????
Sponsored-by: On-Waves ehf
|
|
Currently the (GPRS) RLC block encoding is done by setting the
header fields directly in gprs_rlcmac_dl_tbf::create_new_bsn.
This is much more complex with EGPRS, since the data fields are
not byte aligned, the header formats depend on the header type,
and the mapping of bits to bytes is LSB first.
This commit adds Encoding::rlc_write_dl_data_header which writes
the header according to the given gprs_rlc_data_header structure.
Encoding::rlc_copy_from_aligned_buffer is also added to copy
byte sequences into the message.
Note that the actual encoding of data units is not yet present.
Sponsored-by: On-Waves ehf
|
|
Add the functions gprs_rlc_data_info_init_dl/ul which initialise a
gprs_rlc_data_info structure depending on the coding scheme. The
fields num_data_blocks, data_offs_bits, cs, and the data_blocks are
valid after this call. The other fields are set to 0.
The data blocks are initialised to the correct data_len, e == 1
(no extension header field), cv == 15 (not a final block). The other
data block fields are set to 0.
The gprs_rlc_data_block_info can also be initialised separately
by using the gprs_rlc_data_block_info_init function.
Sponsored-by: On-Waves ehf
|
|
This commit extends gprs_rlc_data_info and gprs_rlc_data_block_info
by the fields required for downlink RLC data messages.
Sponsored-by: On-Waves ehf
|
|
These struct names are more specific than necessary. They are used
for GPRS (uplink) already. In downlink direction, only a few fields
will be added to the header struct. Add addition,
gprs_rlc_ul_header_egprs does not map directly to an encoded
header, like many other 'header' structs do.
Change the names to fit both modes and both directions:
gprs_rlc_ul_header_egprs -> gprs_rlc_data_info
gprs_rlc_ul_data_block_info -> gprs_rlc_data_block_info
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
|
|
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
|
|
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 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
|
|
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
|
|
To cope with transmission failures due to bad radio conditions, a
different coding scheme with more redundance can be used.
This commit adds an implemenation that is based on the Ack/Nack
ratio per PACKET DOWNLINK ACK/NACK message received from the MS.
Basically the CS level is decreased, if the block error rate goes
above cs_adj_upper_limit (default 33%), and it is increased, if the
rate drops below cs_adj_lower_limit (default 10%). Only blocks that
have been encoded with the current CS are taken into account.
Note that this approach doesn't measure the MS->BTS conditions and
that the measurement values reported by the MS are not taken into
account.
Ticket: #1739
Sponsored-by: On-Waves ehf
|
|
There is no need for the union/struct anymore. Make the variable members
of the UL/DL class.
As a result gprs_rlc_dl_window gets a reset() method because
memset(&dir.dl, 0, sizeof(dir.dl)) doesn't work anymore in reuse_tbf().
Ticket: SYS#389
Sponsored by: On-Waves ehf
|
|
|
|
show_state() is only used for debugging output to make the v(b) array
human readable.
|
|
gprs_rlc_bsn_state is now used to hold the ACK state of sent/received
rlc packets.
|
|
Move functions resend_needed(), mark_for_resend(), update(),
move_window(), state(), count_unacked() out of v_b directly into the UL
window and provide a function get_state in v_b to access the v_b
elements.
|
|
We don't need to expose the mecanics of updating the variables to the
outside.
|
|
v_n is part of the UL window handling so move it inside the ul_window
|
|
|
|
Added two methods to gprs_rlc_ul_window
* ssn() returns the starting sequence number
* update_rbb() returns an array of chars representing the state of the
received block bitmap. Each element is either 'I'nvalid or
'R'eceived. The rbb is generated from v_n
rbb[63] relates to BSN ssn-1
...
rbb[0] relates to BSN ssn-64
|
|
The code has an internal optimization to only use window_size
space. This means that the caller needed to know that only half
of the size was used. Change the API to work on the BSN and do
the mapping internally. The compiler should have plenty of
opportunity to propagate the constant(s) but this has not been
verified.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The send and receive window is now managed by an external object.
There are some issues that can only be solved with C++11 but it
is progres and removes some of the spaghetti code. For GPRS the
sns and ws is hardcoded. Move that into the window code.
|
|
Whenwe receive a final ack we assume that all the unacked frames
have been acked now. Move the counting to V_B and now the caller
can remove the BSN and the "lost" variable which has always been
zero.
|
|
|
|
Move the code that moves the V_B to the first not acked frame. Return
how many indexes the V_B was moved and update the V_A in the caller.
|
|
Move the parsing of the bitbmap out of the TBF code into Decoding.
Move the updating of the V_B into the V_B class. Add some comments
about handling the mod_sns, mod_sns_half parameters by using template
code.
|
|
|
|
|
|
|
|
|
|
Move the method into the PDCH. Extract the finding of TLLI into a
new class called Decoding. Move the assemble and forward LLC frames
into the TBF as it is poking in the internals of the TBF.
|