Commit Graph

2471 Commits

Author SHA1 Message Date
Daniel Willmann 5879792a41 WIP FLUSH_LL
Change-Id: Iea2d6ec81d2627f6e41d6c360210f52f7e21d07c
2020-11-19 17:39:27 +01:00
Daniel Willmann 20eb49266f Osmocom_Gb_Types: Fix indentation
Change-Id: I4ca156b53dfe9daa190d52a7de46be56cf74099a
2020-11-19 16:39:39 +01:00
Daniel Willmann 1771886371 gbproxy: Add test for BSSGP resume procedure
Change-Id: I7e724b97ebfde4ed5824515065fbedca8bcf4c64
Related: SYS#5210
2020-11-19 15:58:43 +01:00
Daniel Willmann eb45bc30a8 gbproxy: Add test for the suspend procedure
Change-Id: Ib64c1711f7983940aa41e1b570c90015fe236e5b
Related: SYS#5210
2020-11-19 15:48:05 +01:00
Daniel Willmann 2be2d64ccf gbproxy: Use a different IMSI suffix per TC
Change-Id: I9a234cd6e61cfed8c9502708314c478f9a561d58
2020-11-19 15:43:52 +01:00
Daniel Willmann fd61167b0b gbproxy: Add test for Radio Status procedure
This message is only passed through by gbproxy

Change-Id: I277ba3dace936400a78670925c7c8bdf401f90f6
Related: SYS#5210
2020-11-19 14:30:14 +01:00
Daniel Willmann ef27ba97a8 Add templates for BSSGP Radio Status procedure
Change-Id: I6d49eb4907c4568d88da5d6fd7962e388a3607fb
Related: SYS#5210
2020-11-19 14:30:14 +01:00
Daniel Willmann 443fc57fc7 gbproxy: Reset nsvc to SGSN before each test
Change-Id: Ibf9c75b4066b1aad5fbbe2f35087a3f9f1a39743
Related: SYS#5002
Depends: I83b9cd7381c25da0e8aa847038a2d422c8dd63cf (libosmocore)
2020-11-19 14:29:59 +01:00
Harald Welte a71a410cb3 deps/Makefile: Require v0.1 of AF_PACKET TestPort
Change-Id: I435d0c09e051e0a3082e8c87807b72ce92117007
2020-11-18 15:21:32 +01:00
Pau Espin e8db673d22 pcu: Implement ACKing EGPRS Dl TBF blocks
Change-Id: I9f1b621a8365e69d2e1a33d59cb8c7a59639ad94
2020-11-18 11:51:14 +00:00
Harald Welte 0c45da1f2d gbproxy: /bin/sh cannot do "FILES+=", use /bin/bash
This fixes an ugly copile failure depending on which shell
provides /bin/sh on the given system:

AF_PACKET_PortType.so: undefined reference to `typeinfo for AF__PACKET__PortType::AF__PACKET__PT_PROVIDER'
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::AF__PACKET__PT_PROVIDER(char const*)'
AF_PACKET_PortType.so: undefined  [0m [91mreference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::set_parameter(char const*, char const [0m [91m*)'
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::outgoing_send(AF__PACKET__PortTypes::AF__PACKET__Unitdata const&)' [0m [91m
AF_PACKET_PortType.so: undefined reference to `AF__PACKET__PortType::AF__PACKET__PT_PROVIDER::user_map(char [0m [91m const*, Map_Params& [0m [91m)' [0m [91m
AF_PACKET_PortType.so:  [0m [91mundefined reference to [0m [91m `AF__PACKET__PortType:: [0m [91mAF__PACKET__PT_PROVIDER::user_unmap(char const*, Map_Params&)'
AF_PACKET_PortType.so: undefined reference to ` [0m [91mAF__PACKET__PortType::AF__PACKET__PT_PROVIDER:: [0m [91m~AF__PACKET__PT_PROVIDER()' [0m [91m
AF_PACKET_PortType.so [0m [91m: undefined reference  [0m [91mto ` [0m [91mAF__PACKET__PortType::AF__PACKET__PT_PROVIDER::Handle_Fd_Event(int, bool, bool, bool) [0m [91m'
AF_PACKET_PortType.so:  [0m [91mundefined  [0m [91mreference to [0m [91m `AF__PACKET__PortType: [0m [91m:AF__PACKET__PT_PROVIDER::user_start()'

Change-Id: I71352f5fa538c3ba599b11c2bb1fec2952ddbf80
2020-11-18 12:36:42 +01:00
Pau Espin 6d3a8fc4f7 pcu: Set acceptable logging verbosity for ConsoleMask
With prior situation it's impossible to follow stdout due to the huge
amount of noise.

Change-Id: I1f49eb26af0d6144f7632320097f2c78d47f3a22
2020-11-17 21:48:55 +00:00
Harald Welte d280127e0e gbproxy: Wait longer for BVC unblocking at start-up
When using NS_Provider_FR, the FR links need some more seconds to come
up than the NS_Provider_IP.

Change-Id: Idf80cf6119b67393fe5cbc0c93f5715daddcae0a
2020-11-17 20:14:15 +01:00
Harald Welte 3dd21b3307 gbproxy: Allow dynamic connect/disconnect of ConnHdlr at runtime
We want to move a virtual subscriber between BVC with one NSE,
but also to other NSE/PCU at runtime.  The number of BVC and NSE
may be large in a given test config, and we really don't need
hundreds of test ports per component;  Instead, reconnect the
test ports to whichever BVC we want at runtime.

Change-Id: I56b088b582f2d070547ee24f2d7a175d84fb5861
2020-11-17 20:13:20 +01:00
Harald Welte 5cb8016707 gbproxy: call f_client_register() only on connected ports
Change-Id: I845d566172918e1948db0579fa846e0972e532c3
2020-11-17 20:13:18 +01:00
Harald Welte 67dc8c2bd3 gbproxy: Remove NUM_BVC_PER_NSE constant and constant-sized array
Let's use a 'record of' with indefinite length in order to be able to
dynamically adjust the number of BSSGP_BVC_CT references based on how
many BVCs we have configured.

Change-Id: Id4aa20ff0b553cb8a1f5a67faa1e7b237fb254b8
2020-11-17 18:35:53 +01:00
Harald Welte 16357a970a gbproxy: Remove array of three cell IDs
The hard-coded array of three cell identifiers in the ConnHdlr
configuration doesn't really reflect situations with a different
number of PCUs than three, and a different count of BVCs than one
per NSE.

Let's pass the entire PCU configuration as parameter into every
ConnHdlr.  This way, the ConnHdlr can learn whatever cell identities
there mgiht be in whatever number of BVCs of each NSE.

Change-Id: I0bb22be612b8aa256c9ee115ee44ea849c4225e1
2020-11-17 18:35:53 +01:00
Harald Welte ea1ba59134 gbproxy: Fix SGSN side initialization for more than one SGSN
Change-Id: I4c64bf02a805a959626f6915d9dd72aa7622b24a
2020-11-17 18:35:53 +01:00
Harald Welte 2f282527c2 gbproxy: Include support for NS over Frame Relay
Change-Id: I5ba84b9eebf7c330f7ff55f5e99c6fd5972c7123
2020-11-17 17:42:23 +01:00
Harald Welte e15299ab20 NS_Emulation: Fail if an unsupported NS provider is chosen
This took me quite some time: Tried to use NS_PROVIDER_FR, but the
code was compiled without support for it.  It just failed silently
without printing any error or ever sending any message on the FR link.

Change-Id: I96475127a2079830b3456a8e288adf4c6c908887
2020-11-17 17:42:23 +01:00
Daniel Willmann ace3ece7be gbproxy: Add test for RA Capability Update procedure
Change-Id: I023b3d24a31d117f05c7327b08e9f8f930720944
Related: SYS#5210
2020-11-16 20:32:20 +01:00
Harald Welte d6de98418c FR/FRNET: Introduce simplistic simulation of UEs
Let's start a number of per-UE/TLLI component on each BVC, and generate
some uplink traffic with random-payload 512-byte LLC frames.  The
FRNET(SGSN) side simply ignores all of those by means of a
CreateCallback.

Change-Id: I1b25b4a650d831bb07e9623b76e6c3dcdd71ac88
2020-11-16 20:32:20 +01:00
Harald Welte 22ef5d92d9 gbproxy: Generalize pcu2sgsn / sgsn2pcu transmission
This reduces code duplication between ConnHdlr test functions

Change-Id: Ic13fa745178ffddf8e35fc5203ad8d824e8f338c
2020-11-16 20:32:20 +01:00
Harald Welte 6dc2ac471b gbproxy: Test for RA Capability procedure
Change-Id: If7e5a5cab1e445e0b4ef0466990e352143c31245
2020-11-16 20:32:20 +01:00
Harald Welte 78d8db98b7 gbproxy: Add test for DL-UNITDATA
Change-Id: I96d57cef29dd5e724e66767cc23320a5468a3ea3
2020-11-16 20:32:19 +01:00
Harald Welte 9268601b27 gbproxy: Add test for Uplink-Unitdata
Change-Id: I912ba5a83c852e6ad9524e06a8e76e9f16a517d8
2020-11-16 19:16:27 +00:00
Harald Welte fbae83ffba gbproxy: Use BSSGP MGMT port to determine when all BVC are unblocked
Change-Id: I9c94aa4b4891e8a79bca62f4fd713e4ad50f9424
2020-11-16 19:14:49 +00:00
Harald Welte 1e834f3230 gbproxy: Register IMSI + TLLI with BSSGP_Emulation
If we don't do that, the BSSGP code will not know what to route to us
and what not.

Change-Id: Ife8b8918f0eb69c6dc502d67d2566e78975c9f91
2020-11-16 19:14:24 +00:00
Harald Welte b419d0e614 gbproxy: Less redundant component naming
before this patch:
	GbProxy_Test-SGSN0-NS(SGSN)0-NSVCI101
after:
	GbProxy_Test-NS(SGSN[0])-NSVCI101

Change-Id: I8fc6b7526707206c147aa3c269c0204495e9f15a
2020-11-16 19:13:26 +00:00
Harald Welte 6d63f74bf5 gbproxy: Set configuration in a more dynamic way
Let's generalize the data types a bit, and move the gb (bssgp) config
into a module parameter.  That parameter then is used for both the PCUs
as well as (concatenated) for the SGSN side.

This allows the configuration file to have more control over the number
of BVC within each NSE.

Change-Id: I43a3a8e133cf0f0e377b64d1b385e88285246957
2020-11-16 19:13:26 +00:00
Harald Welte 2436fb5bcc BSSGP: parametrize tr_BSSGP_DL_UD
Change-Id: Ib4a1d64da634813b49474c13ae080d729bbabcf1
2020-11-16 19:13:26 +00:00
Harald Welte 199f386e89 BSSGP_Emulation: Introduce MGMT port to per-BVC component
This port can (optionally) be connected to, and it will receive
state change notifications as well as permit the user to block/unblock
and reset the specific PTP BVC.

Change-Id: I1f0289c8805168e3daace4a7d76764b45cead3d0
2020-11-16 19:13:26 +00:00
Harald Welte 4d112c926c BSSGP_Emulation: Allow a "CreateCb" to handle unknown inbound TLLI
The existing BSSGP Code assumed that the TLLIs were always known "a
priori" by the test case.  With the newly-introduced create_cb,
the user can provide a function to handle any incoming messages for an
unknown TLLL.  The default handler behaves like before: fail +
terminate.

Change-Id: Ice0e145f5a6518ff79547dd851042b7965f38e00
2020-11-16 19:13:26 +00:00
Pau Espin e582f20aa3 pcu: Call f_shutdown if BSN doesn't match
Change-Id: I208f5100f9891874a8a61510edc8c5d215570b14
2020-11-16 10:48:25 +01:00
Pau Espin aa0d7ccf6a pcu: Fix f_dl_block_ack_fn for Dl EGPRS data block
Change-Id: I012b18ef084df0faa4cce79c4778e793af39b199
2020-11-16 10:48:25 +01:00
Pau Espin afdd28d73b RLCMAC: Implement type+template for EGPRS Dl Pkt ACK/NACK
Change-Id: I0d6555f8644e39da6124be2e861d57fda3b3d8a1
2020-11-16 10:48:25 +01:00
Pau Espin 68a7a49354 RLCMAC_EncDec: Implement decoding of Egprs Dl Data block HeaderType 2 and 1
Change-Id: I3b8199711e08bc128821e02c626ded1bc6aa30d7
2020-11-16 10:48:25 +01:00
Pau Espin cca530fbf4 RLCMAC_EncDEc: Fix decode of DlEgprsDataBlock without LI
Change-Id: Iec7e1a2d876abfdc911a65113cc6c9e888257c61
2020-11-16 10:48:25 +01:00
Pau Espin e4fa45b603 pcu: Introduce test TC_mcs_initial_dl
Change-Id: Ida01fb066f202033507f0c6a99212a1ff9d95423
2020-11-16 10:48:25 +01:00
Pau Espin db15fa7c06 pcu: Introduce test TC_mcs_max_ul
Change-Id: I4cc77988832a2ae431ac3c5b85de940c2419bf09
2020-11-16 10:48:25 +01:00
Pau Espin 2354d6a97d pcu: Introduce test TC_mcs_initial_ul
Change-Id: I0ee2fce7045628caf8145468b29688a9f230e7cd
2020-11-16 10:48:25 +01:00
Pau Espin cb00c52b07 pcu: Specify (M)CS to use when sending UL rlcmac data blocks
Apply padding and spare bits in the encoder according to CS/MCS format.

Change-Id: I918acac81f550077daeda3374b3de9b426ff3572
2020-11-16 09:14:28 +00:00
Harald Welte 7a4fe8541e gbproxy: Fix config file typo
In If1220852785853f8a5d8de183d5053ddd6ccb958 I introudced a config
file typo in the GBProxy_Tests.cfg. Let's fix that

Change-Id: I78b6307d16abd37e77e66e511f91a8dda902b58d
2020-11-15 22:39:30 +01:00
Vadim Yanitskiy be33f6b158 library/L1CTL_Types: add missing template restrictions
The template restrictions are quite useful, becaue they give hints
to the TTCN-3 compiler, so it can spot more bugs.  For example,
the lack of thereof would not prevent one from passing 'omit' to
a template, that assigns a value to a non-optional field, so that
might lead to a DTE at run-time in some cases.

Since adding 'template (restriction) ' to each template parameter
obviously makes templates look more cumbersome, let's move the
part with template name and arguments onto a separate line, just
like it's sometimes done for function definitions in C.

Change-Id: I7e6846381e0b3fb611059fcfbafb19bd6c15cfd8
2020-11-14 21:38:15 +00:00
Vadim Yanitskiy d4e95e8cfc BTS_Tests_SMSCB: use proper templates for RSL channel number
Change-Id: Ib2a8cd4b76f308b318772d1572b6169baff13012
2020-11-14 21:38:15 +00:00
Vadim Yanitskiy 2b991b6469 BTS_Tests: turn 'l1ctl_ma_def' into 'c_arfcn_list'
It will be easier to use this list / array in non-L1CTL specific
records and templates, e.g. in (RR) Immediate Assignment.

Change-Id: I392299eea9a82168f893a72d06872c280b6fbdce
2020-11-14 21:38:15 +00:00
Vadim Yanitskiy ab5769cd74 BTS_Tests: introduce and use as_l1_sacch_l1h()
The new altstep reduces code duplication and simplifies access
to the L1 SACCH Header.  It uses dec_SacchL1Header() to decode
the header, and would apply the received TA / MS Power level
values by default (see 'do_apply' parameter).

Change-Id: Ie593d9b06aea694fb0903a6d26ee387d8da4c82d
Related: SYS#4918
2020-11-14 21:38:15 +00:00
Vadim Yanitskiy 09294d9052 bts: update some expectations in expected-results.xml
Change-Id: I32fecb538a7724b35340fbfbe6b3878ca363bf8f
2020-11-14 21:38:15 +00:00
Harald Welte 088df5769d FR/FRNET: Reduce console log verbosity
When doing load simulatin, the amount of console printing becomes a
serious throttle factor.  We don't need to see the decode of every
message.

Change-Id: Ic988d1e1d60c9d03d5b70e9b38f109b47569b89e
2020-11-12 20:56:50 +00:00
Harald Welte 8f66af1665 move f_gprs_tlli_{type,random} to Osmocom_Gb_Types
Those functions don't depend on any L3 specific data structurs, and
it is not a good idea to burden every user with having to impot all
of a 2G/3G Layer3 just to generate some hexstring identifiers.

Change-Id: I6fc41ed94e97e0ec44dc4ea56d110bdd9ac77a72
2020-11-12 21:51:40 +01:00