Age | Commit message (Collapse) | Author | Files | Lines |
|
* make function public
* add tests
Change-Id: I4174703808335c19341cd5b5f4422496d958967f
|
|
* 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 ack state
* add functions for checking TBF's UL ack state
N. B: this should not be confused with TBF-UL state.
Change-Id: I144483447d4b0b93e775da0e926ee45eb8ab39f3
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
|
|
Previously all TBF-related events were logged as part of DRLCMAC which
is too broad to make it practically useful due to excessive amount of
log messages generated. Introduce dedicated log categories for
TBF-related events. Adjust test output as necessary.
Change-Id: I64d660e5971263d5c63d2ba95d50625c16a594aa
|
|
Reset V_N and V_B in UL/DL window class constructors to make sure we
always start from known initial state.
Related: OS#1759
Change-Id: I8e14ffa913b49c5394229220de9165cdfaabdf19
Fixes: CID70468, CID70469.
|
|
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 headers for LC1.5 are specified explicitly. Add corresponding option
to specify sysmoBTS headers location and use it in jenkins build. While
at it, unify header fixup code with the one used in OsmoBTS.
Change-Id: I5248e8b389fd240b4d5a0bcf6c954d6115262462
|
|
Obtain corresponding window object of UL/DL TBF by using proper accessor
function instead of direct access to private member.
Change-Id: I89bcd2c2b0b6f120d40d20fd43c1e516de3e3950
|
|
Move actual calculation into shared function and use it to set window
size for TBF. TBT test output requires cosmetic adjuestements due to
extended debug output.
Change-Id: Ib9f4a277082da3c71007f5f3b4f2acac8b994540
Related: OS#1759
|
|
Improve readability by moving priority computation into separate
function.
Change-Id: Icdca0106a544036eaa94a25f0d4f84e4282f4568
|
|
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
|
|
Add function to set both V_R and V_Q values to 0 which is useful for TBF
test.
Related: OS#1759
Change-Id: I719abfbd5b88c694cbbd69d5c4dcb42baaca91b2
|
|
* 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
|
|
Let's make sure no external function can mess with the TBF state.
Change-Id: I217f4c4bac21dd584c8682928a080a1a6e9507e1
|
|
* use appropriate types for coding scheme parameters
* add comment regarding possible number of RLCMAC blocks
The code in create_dl_acked_block() has underlying assumption that
rlc.num_data_blocks can never be more than 2, which is true and is
enforced by appropriate asserts but is not obvious when looking at the
function code alone. It's equally hard for Coverity which leads to false
positives in scan.
Lets' make this assumption explicit by putting it into for(;;) condition
alongside with corresponding comment.
Fixes: CID143070
Change-Id: If599a6c8a6ef56d847604fcf41bb71decccd8a78
|
|
* 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
|
|
The final(_ack) parameter of rcvd_dl_ack() only used as boolean - mark
it as such.
Change-Id: Icc4d68f049a45d4b42c5594f50594ff0d44c1bac
|
|
It either returns 0 or LLC queue size() which has size_t return
type. This means it can never be negative - hence it's better to use
size_t as return type.
Change-Id: I2a6e849d349ab12854976bd0d68537a370a9c83d
Fixes: CID181478
|
|
Return right after logging error if attempting to start or stop unknown
timer.
Change-Id: Ie6ae564d41a5e03270685c6bafb3504278eb3551
Fixes: CID181512, CID181514
|
|
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
|
|
This utility functions is used by TBF allocation routines and only
tested indirectly through allocation test. Let's add proper exhaustive
test which checks all uint8_t values.
This also requires adding missing include to pcu_utils.h
Change-Id: If08a7f0d31f0e5ad8a5efa5885880aed19c329ab
|
|
It's useful for allocation tests.
Change-Id: I31d503af700ec3364042ff7e661710953cacf9f8
Related: OS#2282
|
|
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
|
|
Change-Id: I59da04edd1b8ff965bbfbe00ccae1f7c9b6e5301
|
|
The num_T_exp is write-only so it can be safely dropped.
Change-Id: I94d83ca8c9b2f0732b53fdf42b17ba93cd7f1c15
|
|
The dl_tbf_idle_msec is uint32_t so it cannot be < 0.
Change-Id: Ic88cb4698bcb9be52a5179529f81b8728bf4f93f
|
|
This is preparation patch for transition to separate UL/DL window
variables instead of current shared generic window. The setting of
window parameters is performed in functions specific to UL/DL TBFs but
the general EGPRS flag remains the same and is set via the same function
which is now marked as protected since it's only meant to be used by
UL/DL subclasses.
Related: OS#1759
Change-Id: I6056194b28a1eb9d69093d1dfdc65a11bc1fc579
|
|
It doesn't change any state so mark it as const.
Change-Id: I5d672bfd654198aebb187772de464c52b3209435
|
|
It's handy for troubleshooting to get quick overview of per-MS TBF
allocations and MS [EGPRS] classes.
Change-Id: Ie79c20f86da6db4565654b0f5856f4fddd83ef96
|
|
* 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
|
|
This log is useful to quickly debug scenarions in which pcu never
connects to bts. For instance, if bts is started as root and pcu is not,
pcu will fail to connect to the socket and will fail with "Permission
Denied".
Change-Id: I6fd5736b5916cbad72b96f064929bb667ff97ded
|
|
Currently TBF support only single Txxxx timer so scheduling another
timer will cancel out the one which is already running. Until the proper
fix is in place, let's at least log this situation as error.
Note: cosmetic adjustement to test output is required - we do not report
restart of the same timer twice because "restarting" assumes it anyway.
Change-Id: I462464a1e6df937b72cad65d19cd48e95dc4db45
Related: OS#2407
|
|
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
|
|
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
|
|
To facilitate testing and addition of support for new multislot classes,
hide multislot class struct internals:
* introduce mslot_class_get_*() functions
* use those functions instead of direct access to array of structs
* use ms_class as a parameter to find_multi_slot() instead of entire
object
Change-Id: Id796bcff1322b1e273a0e3236c66c23b9da8fac6
|
|
Change-Id: Ifd6e04a29e27b1862cf9e98dec7481d3e0efcd48
|
|
Change-Id: I26886224c2ad6d5a29e92203635b8bf7459730a2
|
|
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
|
|
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I6c9f928f4a4d7fd6bf37c64a64ee5d843ad5bb7a
|
|
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
|
|
Each PCU has a specifically assigned SGSN, which may send
packets to the PCU. Ensure that no one else except the
configured SGSN can send packets to the PCU.
Change-Id: Ic2009039fab7cf0fba916556239747ae5b410366
Depends: libosmocore Ifeb201d9006eec275a46708007ff342cdfc14e45
|
|
Add header similar to the one used in the standard, reformat to
facilitate further extention.
Change-Id: I786df6b154c0668d2cefa0ea84d7dea336b0da1d
Related: OS#2282
|
|
Log number of RLC blocks to copy and assert if trying to copy too many
blocks.
Change-Id: I01cbc26ec67400a44e9fff3f9a30d729320380f9
Fixes: CID143069
|