Age | Commit message (Collapse) | Author | Files | Lines |
|
For more details, see 3GPP TS 44.060, table 11.2.5a.2.
Change-Id: Iba0466b29afd26cff317ed4fb6749f8a3079f16a
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
Related: OS#1548
|
|
MultislotClass is 5 bit long, so an uint8_t is enough.
In most places we are already storing multislot class as uint8_t.
Change-Id: I1dcaff9d69379453a0b794e5f36b820f5f78531f
|
|
In osmo-pcu datatructures, the variables holding multislot classes
simply contain an integer referring to the multislot class number,
instead of coding from 3GPP TS 44.060 Table 11.2.5.3 and Table
11.2.5a.3.
So coding Multislot class 3 is stored as 0x03 in osmo-pcu variables,
while in 3GPP TS 44.060 coding it's coded as 0x02 (N-1).
This allows us using value 0x00 to designate a "yet unknown (EGPRS) Multislot
class".
Hence, we need to add 1 to the decoded value to match our data
structures.
Change-Id: Id3b121272bb7e84c0542ae9b4ce09598c6054edd
|
|
This function is actually returning an EGPRS multislot class, so let's
update naming. The variable using the return value was already being
passed as egprs_ms_class to tbf_alloc_ul_tbf().
Change-Id: Idb51836c8c9dd4e865bf2cb0b0c24155662f2ae8
|
|
Change-Id: Id0663a81f439f2d0b893b0d34f85a6db1927ef8e
|
|
It's not really needed to have those together in some function calls,
and makes it more difficult to follow the code. Furthermore, new callers
not having content already aligned (len+value) will be using these
functions in forthcoming commits.
Change-Id: Ifb9d3997bfb74b35366c3d1bc51ce458f19abf16
|
|
Change-Id: I482d60a46b9d253dfe0b16140eac9fea6420b30c
Related: OS#1545
|
|
Change-Id: Id79e95aafdde4a71977c64385fce48b729a51ca9
Related: OS#1545
|
|
Change-Id: Ib686a49e8c630808c30bede5810cd65fc045954a
|
|
It's a good start towards clearing current mess between parent and the 2
children classes.
Change-Id: Ibc22ea2e02609af7ee058b8bc15df2115d4c6f60
|
|
Change-Id: I5e4f0d2f90e643600b7752525d6c2830856c9d3b
|
|
This commit would also remove the option from config_write_pcu() since
it's automatically filled in by osmo_tdef, but there was actually a bug
because that param was never printed when saving the config...
Change-Id: Id8e70b0f44ef2f7e20ecdb3fd8ca93ae2a05b9a3
|
|
Change-Id: I0c767c526398d98ca47ef98fdaccfc23af11fb0d
|
|
Change-Id: I477e5b702c8b956136d93fc1cee01991233e381f
|
|
Receive an Application Information Request from the BTS via PCU
interface. Construct a Packet Application Information message from it
(3GPP TS 44.060 11.2.47) and send it to all MS with active TBF.
The TTCN-3 test infrastructure to test this feature is not quite ready
yet, so I've added C unit tests instead.
Related: OS#4048
Change-Id: Ie35959f833f46bde5f2126314b6f96763f863b36
|
|
Fixing errrors spotted:
bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::T'
};
^
bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::default_val'
bts.cpp:78:1: error: uninitialized const member 'osmo_tdef::unit'
bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::T'
};
^
bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::default_val'
bts.cpp:84:1: error: uninitialized const member 'osmo_tdef::unit'
Change-Id: I2dfecf22516f52cc19e0a0442e70dbc4dbc61336
|
|
This will allow for configuration of some of the timers by the user,
and allow him to inspect current values being used.
It will be also useful for TTCN3 tests which may want to test some of
the timers without having to wait for lots of time.
Timers are splitted into 2 groups: BTS controlled ones and PCU controlled
ones. The BTS controlled ones are read-only by the user (hence no
"timer" VTY command is provided to change them).
TbfTest.err output changes due to timers being set up correctly as a
consequence of changes. Other application such as pcu_emu.cpp and
pcu_main.cpp had to previosuly set the initial values by hand (and did
so), but apparently TbfTest.c was missing that part, which is now fixed
for free.
Depends: libosmocore.git Id56a1226d724a374f04231df85fe5b49ffd2c43c
Change-Id: I5cfb9ef01706124be262d4536617b9edb4601dd5
|
|
Since [1], OsmoPCU already starts to retransmit downlink blocks before
the MS has had a chance to receive them and/or send the related
acknowledgement in uplink. Make this optional with the new VTY option
"no dl-tbf-preemptive-retransmission".
[1] e25b5b91f60f20f61096bc6199a05b58ee6c6328 ("tbf: Only create dummy frames if necessary")
Related: OS#2408
Change-Id: Id08aed513d4033aa0d4324c6ce07cbb2852f2f92
|
|
Ubsan complains about shifts into the sign bit due to automatic int
promotion, so cast explicitly.
Change-Id: I6387c7313832f6c7c920e1016b74562b66d6b68e
Related: OS#4029
|
|
Change-Id: I381618eb55cc513cfa9c2e384c27cead0935c8bf
|
|
Found by Asan
Relates: OS#4029
Change-Id: I21640e40e689016d6fb80a8db4257b22e85b303b
|
|
Add method to explicitly cleanup BTS singleton similar to GprsMsStorage
class and use it from main(). The destructor becomes trivial wrapper
around cleanup() method.
This prevents annoying SIGABRT on exit of OsmoPCU caused by
rate_ctr_group_free() being called after talloc_free() which removes the
context in which counter group is allocated.
Change-Id: I796d56a7de3f3a1f9d59708995c8e3e9b05a2747
|
|
* remove unused variable
* use bool for boolean types
* add clarification comments
Change-Id: I363445063e2d873d9194b2a5924b9e59b8b7ea53
|
|
There is a duality of initialization: early_init() in bts.cpp wants to init
logging even before static instances get initialized. Make sure that
tall_pcu_ctx is initialized during early_init() as well. There is a build
context that does not seem to include bts.cpp (osmo-pcu-remote), so to be sure,
init tall_pcu_ctx as NULL and both in early_init() as well as pcu_main.cpp,
init both tall_pcu_ctx and logging if it is still NULL.
Change-Id: I2199b62d0270bd35dec2283e8f5b364b7c63915b
|
|
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
|
|
Previously paging was prepared inside BTS function and than handed over
to PDCH function. Move the actual preparation into PDCH to better
decouple PDCH from BTS.
Related: OS#1539
Change-Id: I389fb16b6e54040770c21f88edbcb8e045636928
|
|
Replace unreadable if-else ladder in is_single_block() with regular
switch-case. This enables implementation of 11-bit RACH support in
follow-up patches.
Related: OS#1548
Change-Id: I9180478152f9341f11bb3dffe61671da683f24d8
|
|
* add function to set/unset given assignment type
* log assignment type flag changes
* update tests output with additional logs
This enables us to carefully track the TBF assignment type transitions.
Change-Id: I3fe9d52472be8b7f257e8326b2f84e8e7d7bd1f4
Related: OS#1759
|
|
If TS allocation fails due to unavailable TFI, print TRX which was
suggested to allocator. This simplifies allocator debugging but requires
cosmetic modifications to test output.
Change-Id: Icaf97d71d71985d52dc0bda448c26b19fe5645e7
Related: OS#2282
|
|
* 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
|
|
Using the semantic patch below, adjust allocation-related calls to match
updated allocator signatures.
// spatch --c++ --dir src -I src --sp-file callfix.spatch --in-place --recursive-includes
// spatch --c++ --dir tests -I src --sp-file callfix.spatch --in-place --recursive-includes
@@ expression A, B, C, D, E; @@
tbf_alloc_ul_tbf(A, B, C, D, E,
(
- 1
+ true
|
- 0
+ false
)
)
@@ expression A, B, C, D, E; @@
tbf_alloc_dl_tbf(A, B, C, D, E,
(
- 1
+ true
|
- 0
+ false
)
)
Change-Id: I43c76cb49093b40eb854d324e898e821270053dc
Related: OS#2282
|
|
* add functions/macros for setting TBF's poll state
* add function for checking TBF's poll state
Change-Id: I6db1c4e7bd0a49aeb5e391afe371c36b96c6a702
Related: OS#1539
|
|
* add functions/macros for setting TBF's UL/DL state
* add functions for checking TBF's UL/DL state
* move pre-free check into separate function
N. B: this should not be confused with TBF-UL or TBF-DL state.
Change-Id: Idcbf5775d17b1247f2ed01788f9b0788ce66e871
Related: OS#1539
|
|
We use the same approach for osmo_fsm: when state transition happens,
it's not very useful to always log the transition function itself, it's
much more useful to see where the actual transition comes from.
Change-Id: I348ba89bdda2b44c7019e9c893c764ee08c80bec
Related: OS#1759
|
|
The UL and DL TBF use different classes implementing window
management. Hence it's better to use it explicitly instead of using the
common window management superclass inside common TBF superclass. While
at it, also remove the direct access to window class - use accessor
functions instead.
Related: OS#1759
Change-Id: I0b55aa8947db65f7206adcf53ea32b74a831d9e6
|
|
* 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
|
|
* introduce generic function to check whether particular flag was set
for'a TBF and clear it if necessary. Use this instead of
clear_poll_timeout_flag()
* add function to explicitly set assignment and appropriate state flags
Overall this makes the code easier to read and debug.
Related: OS#1759
Change-Id: Ic4560280c72f91700f2e19c6c7f6658dc29625c2
|
|
When troubleshooting TBF timers we're not only interested in timer
duration but also in the code which triggered it. Let's use LOGPSRC to
log it: wrap t_start() in a macro for convenience.
Change-Id: If5f883ae52c469e5158bad24da9904fdc455582f
Related: OS#2407
|
|
Use generic timer handling infrastracture to handle assignment/reject
internal timer. Rename timer array accordingly. Use defines with
explicit second/microsecond values to make it more readable.
Change-Id: I63fb7e6f0695383a83472c836a381a055f64690b
|
|
Fix warnings detected by compiler and coverity scan.
Change-Id: If463c7f8769e18d3df74837f0cb0f545cca9b23e
Fixes: CID181479
|
|
Properly reset the counter when receiving valid RLCMAC block and update
it when no data is received as per 3GPP TS 44.060 §8.1.1.1
Change-Id: I2f79c6153dc4073c9d293b2824979e6381576682
Fixes: OS#2407
|
|
Previously TBF got single timer so the pending timer was automatically
cancelled when new one was scheduled. Let's make it more robust by
implementing independent T31 xx timers from 3GPP TS 44.060 §13.2 with
corresponding start/stop functions and counters.
The semantics of the timers is preserved as before: pending timers are
restarted unconditionally. It might be neecessary to change this later on
after spec review.
N. B. T0: used for assign/reject timeouts, have to be properly
attributed and documented first.
Change-Id: I0305873ca47534f53441247217881da59625e1f7
Related: OS#2407
|
|
When troubleshooting complex issues with TBF lifecycle, it's much easier
to follow the logs which are consistently formatted. Add LOGTBF*() macro
similar to struct-specific log routines we use in other Osmocom project
and use it to log TBF-related messages in a unified way. Tweak test
output accordingly.
Related: OS#2407
Change-Id: I388249afefc32d2f6e5cb5e5abc6daf4dbd284ea
|
|
Recent change lin libosmocore disallow registering rate_ctr with the
same name and indexing multiple times. To accommodate to this check if
rate counters arealready allocated (by static allocator of BTS singleton
for example) and register rate counter with different index.
This fixes the tests for now but eventually we'll remove the BTS singleton
which will allow us to remove this hack.
Change-Id: I7c552ce653b44ec3a31049641728926adc07361d
Related: OS#2757
|
|
* log timer values
* log start/stop cause
* update test output as necessary
This simplifies debugging issues with TBF timers.
Related: OS#2407
Change-Id: Ib8e537416af9bec5d447356286f44e9e8bbf1b7a
|
|
The '.' is an illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be used
by strings comprising the variable name.
Change-Id: I5ef60152a31dea25cb839c47edc93d5337ec3a3e
|
|
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
|
|
The BTS constructor uses functions of libosmocore that could in turn
want to log something. This requires the logging to be initialized
before.
The only way to achieve this is to add an __attribute__((constructor))
function *before* the BTS constructor is being run.
This solution might not be elegant, but I guess it's the only way to
initialize a C library before calling C++ constructors of global static
instance of a class.
In case anyone comes up with a better / cleaner approach, we can always
change later.
This change requires libosmocore >= 0.10.1, as only that permits
multiple calls to osmo_init_logging() which may now occur.
Change-Id: I28dc4f0db229518348c92413959fed5ae85d753d
|