I believe this may be related to sporadic failures we hit on Jenkins:
test -z "atconfig" || rm -f atconfig
../../../tests/testsuite: line 987: ./atconfig: No such file or directory
make[2]: *** [Makefile:1464: clean-local] Error 1
This dependency is present in all other Osmocom projects.
Change-Id: Id9bf06392ad31e1ecc66a5bd13069a915183a76b
This is not critical, given that we set 'ElementsOf_RFL_NUMBER' to 0.
But still, let's ensure that all fields are initialized.
Change-Id: I4dd5202d1c4bd75baf0ab4f88ffefcc47272bd9c
Fixes: CID#272999
This makes sure all MS and TBF objects under a bts are freed when its
underlaying storage is freed (cleanup() is called).
Related: OS#5555
Change-Id: Idf3ad8b70c97313dec38a49d48cf36d6c9b404c7
The timeout is set to a high value to avoid freeing the MS during main
loop iteration. Let's set it back to 0 to have a common free path in
test infrastructure.
Change-Id: I6dc4765163fde1a46574b49f3185aea65391e0d0
This is mostly important to unit tests, where the gprs_pcu object is
recreated several times (it is not recreated in normal operation).
The BTS objects are already being freed through talloc dependency tree.
However, since they may trigger counter updates, access to the pcu list,
etc, let's better do it explicitly before erasing gprs_pcu object
fields.
Related: OS#5555
Change-Id: If2a8360e214d993a8a89993532ff1099b30bdbb1
A CoDel state per prio queue is needed, otherwise the sojourn time state
is not properly reset when a high prio packet is dequeued.
If we have a global codel state shared for all prio queues of an MS, then
basically high prio (GMM) packets will "never" be dropped because they are
handled/dequeued way quicker, so it's sojourn time will be below the
threshold most probably, stopping the "dropping" state for the rest of
lower prio packets.
The handling of different codel states is moved from MS object to the
llc_queue, also offloading already loaded dl_tbf.cpp in the process.
This will also allow in the future setting different CoDel parameters
for different priority queues if needed.
Tests need to be adapted since now the CoDel and PDU lifetime are
incorporated into the llc_queue_dequeue(). Also because dequeue now also
accesses related MS fields.
Related: OS#5508
Change-Id: I2bce2e82ab6389d8a70130a5c26a966a316b0fa4
The CoDel state is still applied globally, which could cause higher prio
messages (GMM) to clear dropping state (since those are left for a
smaller period of time inside the queue).
CoDel state will be moved per prio-queue in a follow-up patch.
Related: OS#5508
Related: SYS#5908
Change-Id: Ie8bd91eeac4fa7487d4f11b808dea95737041c7e
The ms_alloc function is expected to always have a proper bts object
passed, since an ms is always attached at a BTS.
Change-Id: I10b3c94dcb2fed4bff40b1ab7ea455175cf77ce4
This is a cosmetic change, since LLC_CODEL_DISABLE is defined as 0.
It clarifies though the meaning of the if condition.
Change-Id: I7c4bda5977a94c2aaf01ca368570f80fd6ebae00
Move all static functions related to gprs_llc object below it, so that
it's easy finding all related APIs being together.
Change-Id: If781e66c6e8a119cc22948c82167ceb90270ea6d
There's no real reason (other than historical) why code in llc should be
kept as c++ code. Let's rewrite it as C so that it can be included by
existing C code without having to add C->C++ shim, ifdefs all around,
etc.
This simplifies code and easies modification/improvement of the related
objects.
Change-Id: I250680ba581167d7398b2f734769c756cbb61c48
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.
Change-Id: I4a49dbeeec89b22624c968152118aecf8886dac6
The timers in T_defs_bts are actually set by BTS over PCUIF. That's not
the case for T3172, hence let's move it to T_defs_pcu so it can be
configured over VTY.
Change-Id: If24191b2305007aa5be5b551c913738a97597c77
That timer is really only useful to free the tbf asynchronously after
generating the Pkt Access Reject message, since we have nothing to do
with it after the message is sent, and the dummt TBF doesn't really hold
any reserved resource such as USF or TFI.
The timer is useful to still do the freeing asyncrhonously, since the
scheduler is interacting with the TBF during the code path, but there's
no real need to keep the object alive for 2 ms afterwards. Having a
default value of 0 ms is enough, since it fullfills the requirement
of freeing asnchronously.
The value of 2 ms was set initially when the reject support was added
here (e9a138e111), with no specific
explanation on the 2 ms value. It was just probably picked as a
convinience one, but 0 is actually more convinient.
Change-Id: I60e34e643f5c9d9afaf85530c54ab3232dc8f0be
That timer is only relevant for transmission of Packet Access Reject,
which happens only for Uplink assignment, and hence is only set in the
timer of tbf_ul_ass_fsm, never in tbf_dl_ass_fsm. This is probably a
copy-paste artifact when implementing both FSMs.
Change-Id: I95900e211eddb280c72fb712ba1da4d2230cb77b
We basically want to probe whether it's possible to allocate TBFs, or
whether we know it will fail due to all main resources being already in
use (TFI, USF).
Having bts_all_pdch_allocated() return false doesn't mean though that an
MS will be able to allocate a TBF for sure. That's because further
restrictions are applied based on MS: whether it was already attached to
a specific TRX, whether the ms_class allows for a certain multislot
combination, etc. However, it should provide a general idea on whether
for sure the PCU is unable to provide more allocations. More fine
grained state about failures can still be followed by looking at
tbf:alloc:failed:* rate counters.
Related: SYS#4878
Depends: Iabb17a08e6e1a86f168cdb008fba05ecd4776bdd (libosmocore)
Change-Id: Ie0f0c451558817bddc3fe1a0f0df531f14c9f1d3
The whole paging path and data structre is cleaned up.
New MS helpers ms_imsi_is_valid() and ms_paging_group() are introduced
to help in the process and keep implementation details inside GprsMs
class.
Related: OS#5303
Change-Id: I4c0838b26ede58e4b711410eee2a8e4f71e9414b
We have VTY support for it enabled in osmo-pcu since a while ago. Let's
mark it as depcreated now so that we can drop this cmdline arg in the
future.
Change-Id: Ic39c94984cb311aac0464d69f564af6d5447bd0f
If by the time the PktDlAss is to be scheduled by the scheduler the DL
TBF is gone, the FSM will abort the assignment and go back to state
NONE.
However, the transition was missing, ending up in the scheduler trying
to schedule the message unsuccessfuly lots of times per second, clogging
the logs and disrupting normal operation.
Related: OS#5293
Change-Id: I6f421e5ddc9894fee72de1102df35a76cf2f2647
This way it's the same log level as the one used in all other paths
using tbf_assign_control_ts() to assign tbf->control_ts =
tbf->first_common_ts, and this specific event is not lost from logs.
Change-Id: Ia32d835ee4c14d7d48391452b5e3d05ed88e0483
If the MS has a pending UL TBF but we just received a PktResReq on an
allocated SBA from it (same TLLI, hence same MS), then it means it
allocated the SBA through RACH req and hence it was on CCCH. That means
it was not active on any PDCH, hence for sure the previous UL TBF can be
dropped.
Related: OS#5293
Change-Id: I1f20dba56f46ea15cbb9b03bdc5b79d923491a3c
Otherwise, after the TS is disabled, a new TBF created for that MS may
end up in alloc_algorithm assigning the disabled TS, since it will be in
the mask of reserved PDCH TS for that MS.
Related: OS#5265
Change-Id: Ifc59ac37fa6b0ad9ecc8f76326928611e748b11c
The variable counts reserved slots, not available one. It can easily be
seen by checking function count_slots() documentation "Number of
reserved TS".
The previous naming was used probably to indicate "available to reserve"
TS, but the naming is misleading.
Change-Id: Ib58e87d5a067d20d0b331fe32dff61b95ecc3e3f