|Age||Commit message (Collapse)||Author||Files||Lines|
This is a very minimalistic (incomplete) implementation of SI2quater
Rest Octets as per 3GPP TS 44.018, table 10.5.2.33b.1. Should be
enough to decode some of the E-UTRAN specific parameters though.
Some BITn fields might need to be replaced with more specific
enumerated or integer types. Beware , the bit ordering rules
are different for integer and bitstring (sub-)types if a field
ends up on boundary of the two octets!
At the time of writing Ief0d9b096feeee7d37b5f2429dd3e80de0161806 I wasn't aware
of the 'inout' keyword, which allows to pass the counter list by reference.
Rather modify the counter lists in-place. Instead of requiring
list := f_counter_name_vals_add(list, ...)
rather implement by directly modifying list:
First user will be new MSC pooling tests in ttcn3-bsc-test, see
Some tests may expect that behavior so let the test decide what to do
Since change  has been merged, we see multiple regressions in
ttcn3-bsc-test (all LCLS test cases) and ttcn3-bsc-test-sccplite
(sporadic failures). In all failed cases, the reason is similar:
RSL for unknown Dchan
BSC_Tests.ttcn:4501 BSC_Tests control part
BSC_Tests.ttcn:2176 TC_assignment_codec_fr testcase
The mentioned change enables TCP_NODELAY option for all IPA based
connections, including both OML and RSL. This option disables
Nagle's algorithm , so we get less delays on IPA based links.
It took me a lot of time to investigate, and finally, I figured
out what is actually causing those regressions. The TCP_NODELAY
itself is not a problem, of course. As it turned out, the
problem is here, in our TTCN-3 test case framework.
Each test case involves several components (actors) running in parallel.
One of them is RSL_Emulation_CT, which is responsible for handling and
routing of RSL messages between the connected components.
A test case may register dedicated channel handlers by calling
f_rslem_register(), so DCHAN/RLL/IPACCESS messages will be matched
by RslChannelNr/TrxNr and routed to the corresponding one.
If no handler is found for a given RSL message, the RSL_Emulation_CT
would abort the test case execution. And that's where the problem is.
Given that all components are running in parallel, it may happen
that a received RSL message would be processed by the RSL emulation
component faster than the test case would call f_rslem_register().
The test case would be aborted due to "RSL for unknown Dchan".
Speaking in context of the failing BSC test cases, a test case
calls f_rslem_register() on receipt of an Assignment Command as
it contains all the assignment parameters. After that we expect
to receive an RSL ip.access CRCX for that channel.
The problem is that both Assignment Command and ip.access CRCX
messages are sent by the BSC simultaneously, so the later may
be handled faster than the first one. Race condition!
Let's work this around by maintaining a waiting queue, where the
messages, for which no handler was found, will be kept until the
corresponding dedicated channel is registered.
This is an optional feature that needs to be enabled explicitly
by calling f_rslem_dchan_queue_enable(), and then explicitly
disabled by calling f_rslem_dchan_queue_disable().
If at the moment of calling f_rslem_dchan_queue_disable() the
waiting queue is not empty, e.g. because the IUT sent us more
messages than we expected, test execution will be terminated.
The actial fix for the LCLS test cases will be submitted next.
The MSC pooling feature is implemented in osmo-bsc
A VTY command ('mscpool roundrobin next') that allows deterministic testing is
added in I2155d906505a26744966f442ffb1e87a6a9b494c.
osmo-bsc.cfg changes needed for these tests to succeed are in docker-playground
The new tests will fail until the above have been merged.
Add BSSAP_N_UNITDATA_req to RAN_Conn_PT, so that we are able to send a Paging
from a test function that runs on MSC_ConnHdlr.
This will be needed by upcoming MSC pool tests, see
For tr_RSL_PAGING_CMD, also check comp_ref against null.
Upon receiving a tr_RSL_PAGING_CMD, the code tries to dispatch the Paging
Command to all valid clients. However, the ConnectionTable[*].comp_ref is
*always* present, and actually null for unconnected clients.
So, before this patch, a Paging Command from osmo-bsc gets sent to a null
client, which disconnects the RSL emulation and aborts the test.
There is currently no test using this, but the upcoming MSC pool tests will:
Unlike the RSL_IE_MS_Power, where power_level is 5 bit long, in
the RSL_IE_BS_Power it's 4 bit long. Fix this.
So far used only in MSC_Tests.ttcn, but soon to be used also in BSC_Tests.ttcn.
f_gen_imei() calls f_enc_IMEI_L3() with a 14 digits argument, but the IMEI_L3
template used is hardcoded to 15 digits. So the oddevenIndicator must always
indicate odd, not depend on the digits argument.
f_gen_imei() should probably also compose a Luhn checksum, leaving that to
Found by using the new osmo_mobile_identity API in osmo-msc, which is stricter
about odd/even and filler digits than our previous implementations.
See osmo-msc Idfc8e576e10756aeaacf5569f6178068313eb7ea .
Unfortunately, the latest release of osmo-bts still has a bug,
that has been fixed  in the recent master. Because of that,
most of the test cases in ttcn3-bts-test-latest currently fail.
The problem is that all transceivers use IPAC_PROTO_RSL_TRX0,
regardless of what the BSC tells them to use. Let's work this
around by patching IPA stream ID in ASP_RSL_Unitdata messages
coming from the IPA emulation.
- Get rid of f_L1CTL_DM_EST_REQ, it's not really needed.
- Derive ts_L1CTL_DM_EST_REQ_H0 from ts_L1CTL_DM_EST_REQ.
- Turn all its params into (value) templates.
- Turn it into a (value) template itself.
- Pass GsmArfcn directly to ts_L1CTL_DM_EST_REQ_H0.
Let's test the code path where UL TBF is requested through DL ACK/NACK
here, since we already test the usual UL TBF through CCCH approach in
rlc_mode is changed to ACKED since that's the mode we are using so far
Since change , the IPA emulation component allows us to handle
multiple IPA connections, thus multiple RSL connections. The idea
is to attach a TCP/IP connection identifier to each message.
On top of that, this change implements mapping between TCP/IP
connection identifiers and RSL stream identifiers, so we can
finally talk to any of connected transceivers (up to 4 for now),
not only the last connected one (as it was before). The actual
mapping is done during the IPA identification procedure.
Instead of forwarding ASP_IPA_EVENT_UP to a test case, the RSL
emulation component now sends a new event - RSLEM_EV_TRX_UP,
with transceiver number (actually, IPA stream-id) attached.
This would allow the RSL Emulation component to maintain several
transceiver connections in server mode. In order to send an RSL
message to a specific transceiver, its TCP/IP connection ID needs
to be included in the ASP_RSL_Unitdata message.
This change basically does two simple things:
a) adds TCP connection identifier to ASP_IPA_Event,
b) splits g_ipa_conn_id into g_self_conn_id and g_last_conn_id.
Change a) would let the upper layers of code (based on the IPA
emulation component) know which TCP/IP connection a given event
Change b) solves the problem, happening in server mode when a new
client connects, and TCP/IP connection identifier of another
previously connected client gets overwritten.
With this change applied, g_self_conn_id holds TCP/IP connection
identifier of the client or server itself (depending on g_mode),
while g_last_conn_id is only used in server mode and holds
connection identifier of the last connected client.
As a side effect of change , the RSL emulation component has
stopped to handle RSL messages from transceivers other than
TRX#0. Let's fix this by using template '?' for stream ID.
See 3GPP TS 44.018, section 10.5.2.17 "IAR Rest Octets".
Some stuff like EGPRS Ack/Nack description is still not implemented, but
it's enouh for now to be able to match against this kind of ACK blocks.
This way we can easily add new parameters to ASP_IPA_Event.
The old name was a bit confusing, because this enumerated type
also contains ASP_IPA_EVENT_ID_ACK, among with UP/DOWN events.
Some types already available in GSM_RR_Types.ttcn will also be required
by messages sent over PDCH and which belong to RLCMAC_CSN1_Types. Since
GSM_RR_Types.ttcn already requires RLCMAC_CSN1_Types.ttcn, let's move
them there so they can be used in both places.
Old code was not setting Single Block Packet Access type, and 2phase
access was not properly triggered.
Once it's triggered, message flow changes quite a lot from the 1phase
access, specially because the 2nd Ul Assignment arrives through PDCH
instead of CCCH, which means a different record is received and hence
code for 1phase cannot be easily re-used.
For similar reasons, f_tx_rlcmac_ul_n_blocks() is modified to receive
the only required tfi param instead of a full dl_block.
Some functions are also extended to support SingleBlock Allocation
instead of usual DynamicAllocation.
GSUP proxy routing, as it is implemented in an upcoming osmo-hlr patch,
requires that osmo-hlr returns a received Source Name IE back as Destination
Name IE. Add tests for these, for various situations.
These tests pass since GSUP request handling with request->response association
was introduced to osmo-hlr in I179ebb0385b5b355f4740e14d43be97bf93622e3.
Implement this by adding a source_name to the g_pars, which should be sent out
in ts_GSUP_* to osmo-hlr, and expected back as destination_name in returned
Add source_name and destination_name to various templates, with default :=
Add f_gen_ts_ies() and f_gen_tr_ies() to compose expected IEs more generically.
This function was written in a way that it tries to do as
many different (but related) things as possible:
a) send an RTS.req to the IUT, expect a DATA.ind in return,
b) decode RLC/MAC message contained in the received DATA.ind,
c) make sure that it's either GPRS or EGPRS data block,
d) calculate the last TDMA frame number of RRBP using
f_rrbp_ack_fn() regardless of its validity,
e) make sure that the block contains a given LLC payload.
Everything is ok except point d). The problem is that this is
only the case for the first block of RRBP, and not applicable
to the rest having 'rrbp_valid' flag unset. Furthermore, this
function did not match GPRS DL blocks with 'rrbp_valid' flag
unset, for some odd reason.
Let's move RRBP calculation into a separate function called
f_dl_block_ack_fn() and return TDMA frame number of the
received DATA.ind message instead.
Among with that, there are more little changes:
- simplify matching of (E)GPRS DL data blocks,
- use 'in' qualifier in parameter list where possible,
- turn parameter 'data' into a template (present).
Signed-off-by: Vadim Yanitskiy <firstname.lastname@example.org>
Let's make this template more flexible, so it can be used to match
any GPRS DL data blocks, not only those with rrbp_valid == true.
Note that behavior of f_rx_rlcmac_dl_block_exp_data() is
intentionally left unchanged, and will be fixed later.
Signed-off-by: Vadim Yanitskiy <email@example.com>