Age | Commit message (Collapse) | Author | Files | Lines |
|
Under some circumstances, it could happen that a DL TBF is created as a
GPRS TBF due to not yet having enough information of the MS, and only
after the TBF is created the PCU gains that information and upgrades the
MS mode to "EGPRS". Hence, there's the possibility to run into a
situation where a GPRS TBF is attached to a EGPRS MS.
It may also happen sometimes that despite the TBF and the MS be EGPRS,
there's need to further limit the DL MCS to use, eg. MCS1-4 (GMSK).
As a result, when asking for the current DL (M)CS to use, we must tell
the MS which kind of limitations we want to apply. The later reasoning
was already implemented when GPRS+EGPRS multiplexing was added, but the
former was not being checked. Hence, by further spreading through the
call stack the "req_kind_mode" we match both cases.
Related: OS#4973
Change-Id: Ic0276ce045660713129f0c72f1158a3321c5977f
|
|
This patch doesn't really tests whether osmo-pcu can work on a multi-bts
environment, but it prepares the data structures to be able to do so at
any later point in time.
Change-Id: I6b10913f46c19d438c4e250a436a7446694b725a
|
|
Before, we used tho have a BTs object split into 2 parts, a C
gprs_rlcmac_bts struct and a C++ BTS struct, and "bts_data" naming was
used to distinguish them in variable names. Nowadays the struct is
finally combined into one, so there's no point in using this "bts_data"
terminology, we use always "bts".
Change-Id: I9852bf439292d1abc70711bea65698b21bde0ee8
|
|
Previous work on BTS class started to get stuff out of the C++ struct
into a C struct (BTS -> struct gprs_glcmac_bts) so that some parts of
it were accessible from C code. Doing so, however, ended up being messy
too, since all code needs to be switching from one object to another,
which actually refer to the same logical component.
Let's instead rejoin the structures and make sure the struct is
accessible and usable from both C and C++ code by rewriting all methods
to be C compatible and converting 3 allocated suboject as pointers.
This way BTS can internally still use those C++ objects while providing
a clean APi to both C and C++ code.
Change-Id: I7d12c896c5ded659ca9d3bff4cf3a3fc857db9dd
|
|
Under some platforms (RPI4, ARM) container older ASan, it will log false
positive log errors which will make unit test fail because then output
changes:
"""
pcu_l1_if.cpp:847:2: runtime error: member access within misaligned address 0xb3f0b78c for type 'struct GprsMs', which requires 8 byte alignment
"""
The pointer is indeed misaligned, but it's not actually a bug, because
the pointer is never derreferenced. That happens during
llist_for_each_entry operation where it does cast the pointer but it
only checks if the list has actually reached the end.
To workaround the issue, simply defer casting it by using llist_for_each
instead, where the pointer is assigned only in the case it really points
to a GprsMS struct.
Change-Id: I149fb42706501eb33f9c6fe48f76a03ddee5954a
|
|
Let's use usual osmocom rate_ctr instead of having one variable +
setter/getter functions, so we can easily add new counters and also
because it makes code more clear (no need to look at what the "update"
function is doing).
Using rate counter also provides info about how recently the MS has been
interacting with the network.
Related: OS#4907
Change-Id: I744507fde4291955c1dbbb9739b18a12a80145b1
|
|
As we integrate osmo-pcu more and more with libosmocore features, it
becomes really hard to use them since libosmocore relies heavily on C
specific compilation features, which are not available in old C++
compilers (such as designated initializers for complex types in FSMs).
GprsMs is right now a quite simple object since initial design of
osmo-pcu made it optional and most of the logic was placed and stored
duplicated in TBF objects. However, that's changing as we introduce more
features, with the GprsMS class getting more weight. Hence, let's move
it now to be a C struct in order to be able to easily use libosmocore
features there, such as FSMs.
Some helper classes which GprsMs uses are also mostly move to C since
they are mostly structs with methods, so there's no point in having
duplicated APIs for C++ and C for such simple cases.
For some more complex classes, like (ul_,dl_)tbf, C API bindings are
added where needed so that GprsMs can use functionalitites from that
class. Most of those APIs can be kept afterwards and drop the C++ ones
since they provide no benefit in general.
Change-Id: I0b50e3367aaad9dcada76da97b438e452c8b230c
|
|
Change-Id: I5932f21c58e76552f7187a175b8e281c5846536c
|
|
Return an interface to the window base class so that the tbf base class
can access the common window methods, such as set_ws(). It will be used
in next commit to get rid of duplicated function enable_egprs in both
dl_tbf and ul_tbf subclasses.
The user of the function can then decide to access more specific
functionaltiites of the window class by static casting it to the
specific direction (which is known by the caller since it operates on a
ul_tbf or a dl_tbf).
Change-Id: Ia2e1decf91be1184668e28297c2126affb9c7ae4
|
|
This allows to see which channels have been enabled according to PCU.
Change-Id: If72e67ba80aab4e0c68408e6996d74d2ff70c322
|
|
Change-Id: I105cf184a478cf178d69e16cd35fa36c51133a18
|
|
We have same kind of object splitted into two layers, in coding_scheme
and gprs_coding_scheme. Let's merge them together and get rid of the
class, which is not really useful because it's only a set of functions
operating on one enum value.
This change also fixes gcc 10.1.0 error about memseting a complex type
in rlc.h init().
Change-Id: Ie9ce2144ba9e8dbba9704d4e0000a2929e3e41df
|
|
For a long time the VTY command to show all active TBFs was broken.
The TBF filtering (by allocation origin) logic allows one to show
TBFs allocated on CCCH, PACCH, or on both of them. In the latter
case we have been checking whether a TBF was allocated on both
logical channels at the same time.
Let's fix this by passing a flag-mask instead of boolean arguments.
To be able to use GPRS_RLCMAC_FLAG_* definitions from "tbf.h", let's
exclude them from "#ifdef __cplusplus ... #endif" block.
Change-Id: I1c9f401368af880a97d32905c4cce0da481ffc21
|
|
Change-Id: I72aa1a1de22602a3ad2a4d19604ae0935c88c750
|
|
It's a good start towards clearing current mess between parent and the 2
children classes.
Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
|
|
Add vty commands to show only TBFs allocated via PACCH or CCCH.
Change-Id: I80f8df4fe663a0346f4289a4220b761e39726312
Related: OS#1759
|
|
Move Mode (EDGE/GPRS) definition and related functions outside of
GprsCodingScheme class. This allows us to use standard libosmocore
value_string functions.
Change-Id: I3baaac7f1ca3f5b88917a23c1679d63847455f47
|
|
Change-Id: I212ebb892ab162821633974d5a6c7e315d308370
|
|
The PDCH class and corresponding functions are rather self-contained and
independent from BTS implementation. Let's move them into separate file
to make bts.cpp more manageable. As additional benefit it allow us to
somewhat untangle all the different cross-dependent includes.
Change-Id: Ie05e25361e6741a81b024679f9675c98d4923683
Related: OS#1539
|
|
Many files include unnecessary headers and don't include headers which
are actually used. Because of that combined with the fact that OsmoPCU
is a mixture of C and C++, it makes it hard to modularize code. Fix
this (using iwyu [1] tool):
* add missing headers
* remove unused headers
[1] https://include-what-you-use.org/
Related: OS#1539
Change-Id: I8c9f488a43b099c72b2d30d3245e7ba50872fc00
|
|
Change-Id: I01f3773ca6a9b6d4e28ca2f59c944c6d48918dd1
|
|
Change-Id: Ic4e40d9c141ab7ee3f7c4dceec007dbe16359f93
Related: OS#1759
|
|
Change-Id: I401fe88f5bd1665becd6fe6d4204b3877d548ccc
|
|
Obtain corresponding window object of UL/DL TBF by using proper accessor
function instead of direct access to private member.
Change-Id: I89bcd2c2b0b6f120d40d20fd43c1e516de3e3950
|
|
* move window size encoding and writing into separate functions
* introduce necessary TBF wrappers to avoid direct m_window access
This is part of preparation work to move to separate UL/DL windows.
Related: OS#1759
Change-Id: I60184d5049bc7d7b119df5a9eb82d1c4b788c840
|
|
It's handy for troubleshooting to get quick overview of per-MS TBF
allocations and MS [EGPRS] classes.
Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96
|
|
Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2
|
|
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 DL throughput in show ms imsi <imsi_value>.
Adds the number of coding schemes counter and rlc nacked counter at TBf level.
Change-Id: Ia95b0404989b00db0e7ba416bc40d09ef41fde1c
|
|
This commit adds the TRX_ID in the output of VTY command "show tbf all".
Change-Id: Ia5412dddb899e20963f884e02bdf796b6ea7ee6c
|
|
with gcc-5.3 on x86_64 I get the following compliler warnings:
warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has
type ‘size_t {aka long unsigned int}
This patch resolves them
|
|
The PACCH is specific to an MS and may change when a TBF is
established or removed (see TS 44.060, 8.1.1.2.2). For multislot
class type 2 phones, more than one timeslot may be used to transmit
RLC/MAC control messages.
Add a method that returns a set of TS which can be used for the
PACCH.
Sponsored-by: On-Waves ehf
|
|
Currently the checks for and the actual polling is done in several
places by copy & paste of several lines of code. This hinders changes
of they polling is handled internally and also is likely source of
programming mistakes.
Separate this into a check_polling function, that checks whether
polling is possible and returns the FN and the RRBP to be used in
that case. Otherwise the cause is logged (LOGL_DEBUG) and a negative
error value is returned. There are no other side effect beside the
logging.
If the call is successful, the set_polling method can be used to
actually register the polling.
Extend the encoder functions' parameters lists by an rrbp parameter.
Sponsored-by: On-Waves ehf
|
|
Put an '!' after the PDCH number in the output of the 'show tbf'
command, if is_control_ts() yields true.
Sponsored-by: On-Waves ehf
|
|
Add V(Q), V(R), V(A), V(S) to the output of the "show tbf" command.
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 only the GPRS MS class and the DL CS (even for UL TBFs)
are shown.
Add the EGPRS MS class and use the TBF's real CS.
Sponsored-by: On-Waves ehf
|
|
Add the current mode to the output of the 'show ms imsi' and
'show ms tlli' commands.
Sponsored-by: On-Waves ehf
|
|
Currently the TBF and MS object use a plain integer value
(current_cs) to manage the coding scheme. This makes it difficult to
support the MCS schemes. GprsCodingScheme supports a partial ordering
of these values (CS and MCS) and provides safe increment and
decrement methods.
Use the GprsCodingScheme type instead of integer for cs fields and
variables. Add a 'mode' to GprsMs which can be set to either GPRS,
EGPRS, or EGPRS_GMSK which also set the initial values of
current_cs_ul/dl. Select the mode based on max_mcs_ul and max_mcs_dl.
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 function is similar to the show_ms function already present in
the target file. Since the TBF lists will be turned into LListHead
based lists, they will get an iteration function in
pcu_vty_functions.cpp, too.
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 the per IMSI/TLLI view only shows the number of packets and
the 'all' view does not show any LLC related information at all. A
constant LLC queue length is often an indication for a stalled TCP
connection where the RLC layer has stopped to send downlink data
messages.
This commit adds the number of packets to the 'all' view and the
number of octets to the IMSI/TLLI views.
Sponsored-by: On-Waves ehf
|
|
This commit extends the 'show ms imsi|tlli' command to show the old
TBFs, too.
Sponsored-by: On-Waves ehf
|
|
Currently the NACK/unconfirmed ratio is already passed to the
corresponding MS object, but the value is not being stored there.
This commit adds a member and a getter method and include the values
into the output of the 'show ms' command.
Sponsored-by: On-Waves ehf
|
|
This commit extends the pcu_l1_meas structure by MS side measurement
values which are transmitted by PACKET DOWNLINK ACK/NACK and
PACKET RESOURCE REQUEST messages. The encoded values are remapped to
dB respectively % values. The values are stored in the corresponding
MS object (if there is one).
Note that the values are store as (rounded) integers, so some
different encodings are mapped to the same decoded value.
Sponsored-by: On-Waves ehf
|
|
This commits adds the GprsMs::update_l1_meas() and GprsMs::l1_meas()
methods to store and access the measurement values. The internal
state is updated depending on which values are actually set.
In addition, these values are shown in the output of the 'show ms
imsi|tlli' command.
Sponsored-by: On-Waves ehf
|
|
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
|
|
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
|
|
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
|