Commit Graph

2588 Commits

Author SHA1 Message Date
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
Harald Welte 69b3a4839f move f_gen_{imsi,imei,msisdn} from L3_Templates to Osmocom_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: I7880633a46afc607f16f8aa6ea1a277f7958c95b
2020-11-12 21:51:40 +01:00
Harald Welte de6f3ee592 FR/FRNET: Dynamically create number of BVC at runtime
We don't want the number of NSE and the number of BVC to be a
compile-time choice, but rather something dynamic at rutime.  This
allows configuration files to define those details.

Change-Id: I55b44481b5322deaf78619c1689462d716ddfcec
2020-11-12 20:02:07 +00:00
Harald Welte c450552c59 NS_Emulation: Introduce Load Sharing Function
The Load Sharing Function distributes traffic among all unblocked NS-VC
within a NS-VCG.  The sharing is done based on a LSP (Link Selector
Parameter) which is passed with the NS-UNITDATA.req primitive from BSSGP
to NS.  Details are implementation specific, but NS must ensure that all
traffic of one LSP is always sent through the same NS-VC, as long as
that NS-VC is alive/unblocked.

We use the LSP as follows:
* Signaling BVC always only uses lsp 0
* PTP BVC messages unrelated to user straffic use a per-BVC static LSP,
  which is the BVCI
* User traffic can set whatever LSP it wants
* NS keeps an array of NSVCs currently unblocked and uses the LSP modulo
  the array size as an index into it

Change-Id: I8b960ec4d729f50cadca353bb52685311cd45eed
Related: SYS#5084
2020-11-12 20:02:07 +00:00
Harald Welte dc0a090ae1 NS+BSSGP: Only send BVC-RESET when _first_ NSVC of NSVCG becomes unblocked
In case of a NS-VCG with multiple NS-VC, we must BVC-RESET only when the
first NS-VC becomes unblocked, i.e. as soon as we have any connection
to the peer at all.  Whether we have further additional links doesn't
matter, at least not in the sense that all state should be reset.

Change-Id: I69b2e9bd919fc981f189b6671b4234c3642e2449
2020-11-12 20:02:07 +00:00
Harald Welte 445fc61dc7 BSSGP_Emulation: Match on proper NSEI from NS layer
Change-Id: I682574bc54b4432357adef2b4662b1f74495578c
2020-11-12 20:02:07 +00:00
Harald Welte 90f1974fb0 NS_Emulation: Support multiple NS-VC within one NSE (NS-VCG)
This is something we need to simulate more complex scenarios,
particularly in the context of frame relay.

Change-Id: If1220852785853f8a5d8de183d5053ddd6ccb958
2020-11-12 20:02:07 +00:00
Pau Espin f8fe2d2ef3 RLCMAC_CSN1: Fix missing padding zero bits in UlAckNackEgprs
Se 3GPP TS 44.060 Table 11.2.28.1

Change-Id: Iee04f39b43dc42efb9c2d96c46ff8e496664594a
2020-11-11 20:09:08 +00:00
Pau Espin 80c1baa71e RLCMAC: Fix stall_ind param not used
Change-Id: Ie1b6c66467028da8f93ccc42e5048daca3b68192
2020-11-11 20:08:47 +00:00
Harald Welte d077075b5e FRNET: Add 'control' section
FR_Tests already had a control section, but FRNET_Tests didn't have one,
let's change that.

Change-Id: If08fa3572050fcd794be054afd4ebc44cd6580f6
2020-11-11 19:04:36 +01:00
Pau Espin a05b2bc8a3 RLCMAC_EncDec: Fix Encoding of TLLI in UlEgprsDataBlock
Change-Id: If13f36db9c86c10d7c5a6a307c430ee090b7dd06
2020-11-10 12:55:33 +00:00
Pau Espin 081b168060 RLCMAC_EncDec: Implement encoding for RlcmacUlEgprsDataHeader HeaderType 1 and 2
Change-Id: I4e0b0e0960634fd2e5f09073a1ef093200dbe707
2020-11-10 12:55:33 +00:00
Pau Espin 563bcd6cb5 RLCMAC_EncDec: Fix encoding of TI and E bits in UlEgprsDataBlock
Change-Id: I442a12a16fe0d0664c677eec10bb81e2544235aa
2020-11-10 12:55:33 +00:00
Pau Espin 5d07ae6d3c pcu: Introduce test TC_cs_max_dl and TC_dl_cs1_to_cs4
Change-Id: If847d091f3f4e6a7c77fbadc7280423637c50b35
2020-11-10 12:55:33 +00:00
Vadim Yanitskiy 6b29571091 library/L3_Common: use f_rnd_octstring() from Osmocom_Types
Change-Id: Iad46c3ab25244389a2a536065653c7ed231d1234
2020-11-10 12:16:21 +00:00
Neels Hofmeyr 76d1d1a815 bts: TC_sacch_chan_act_ho_*: test that SACCH appears after HO RACH
Change-Id: I33bb56c5f51dcc79adc1fe39926cf152aac1e213
2020-11-09 10:52:52 +00:00
Neels Hofmeyr dd59741dbe bts: fix TC_sacch_chan_act_ho_*: missing send SACCH FILL
The test sets random bits for SI5 and expects to see those in dl SACCH. That
can only possibly work when that SI5 was actually sent to the BTS.

Change-Id: I0d3a96f5ae932734e986637ca2cb23805eba6829
2020-11-09 10:52:52 +00:00
Neels Hofmeyr d34681bc6b bts: fix TC_sacch_chan_act_ho_*: missing Handover Reference IE
The tests still fail, but at least not as prematurely as before.

Change-Id: I3f58ed30f7f2e92d2d1694769a4214a6d257f8a9
2020-11-09 10:52:52 +00:00
Neels Hofmeyr 5f14421b6f bsc: add TC_ho_int_radio_link_failure
Change-Id: Ia94176a997dbdaf87d6b433cb24ffcfa06241d74
2020-11-09 10:52:52 +00:00
Pau Espin 9a2d61bb3c pcu: f_acknackdesc_ack_block: Fix BSN wrap-around
Change-Id: Ibe90e58e04ae5e24c36a0b3dda6742080107bd51
2020-11-06 14:20:37 +01:00
Pau Espin 7512259cce pcu: Introduce test TC_cs_initial_dl
Change-Id: I00bae15a007935cc4e027e63de4367d83e994bd7
2020-11-06 14:20:37 +01:00
Pau Espin 4fbeefd8cf pcu: Relax some CS/MCS expectancy checks
Previous commit implemented the CS/MCS verification, and hence now some
tests fail because they had too restrictive checks.

In theory the verifications could be done so restrictive by configuring
the PCU accordingly at the start of the test, but we are not
really interested in checking the exact CS/MCS in these tests, only
checking if GPRS/EGPRS is being used.

Change-Id: I79b81d473b7428b57a0ec501c5bd0d88e35c81e3
2020-11-06 14:20:37 +01:00
Pau Espin e5e64c1246 pcu: Implement check for expected (M)CS in received data block
Change-Id: Ibdc63f6b695c08e4ddf5894c22767d07acf21311
2020-11-06 14:20:37 +01:00
Pau Espin 5abfded61e RLCMAC_EncDec: Provide decoded (m)cs in (E)GPRS data blocks
Let's provide this information to higher layer since CS is mostly
discovered by original bitstring size which is available during
decoding.

Call the size2mcs converter in each function to avoid having to pass it
as a parameter and have it selfcontained, meaning one can simply call
decode(bitstring) from TTCN3 code and be done with it.

Change-Id: I80ed44e575cc0a11510832e5bbfc07173e7b75b8
2020-11-06 14:20:37 +01:00
Pau Espin 745a48bce3 pcu: prepare tests for new GPRS/EGPRS multiplex support
Once GPRS/EGPRS multiplexed support is ready, it will be controlled
through pcu info_ind.flags by enabling
MCS or not; the "egprs only" VTY comamnd will be dropped.
The usual setup would be to support both GPRS+EGPRS, so make that the default.
Most tests require to be passed the _noMCS variant to work in older
versions of PCU, since those versions use the "egprs only" concept which
will reject egprs_ms_class=0. Same tests enabling MCS in newer osmo-pcu
shouldn't be a problem.

Related: OS#4544
Change-Id: Ib95aae155b0712313a30f0c5404a8cb1f28b98f5
2020-11-06 14:20:37 +01:00
Pau Espin a9f27fa4f6 pcu: Introduce test TC_ul_multislot_tbf_ms_class_from_2phase
Similar to the DL TBF counterpart from last commit, this time verifying
UL multislot TBF is allocated.

Change-Id: I26a3cc0f2bd7bab176aa52df3e40aca7300de216
2020-11-06 14:20:10 +01:00
Pau Espin 8155bf4e7b pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_2phase
Change-Id: Ie0035bab79c286a968394d7b724d975f43d187ce
2020-11-06 14:19:19 +01:00
Pau Espin 0ea8b6f355 pcu: Introduce test TC_dl_multislot_tbf_ms_class_from_sgsn
Related: SYS#5131
Change-Id: I417953a4c89dec82500b3b66f08ed648d266d813
2020-11-06 14:17:21 +01:00
Pau Espin 2aead38cdc pcu: Add infra to handle multitrx and multits envs
ARFCNs are allocated sequentially, so that conversion between
arfcn<->trx_nr is easily done.

Some helper functions are introduced to be able to submit and expect
messages on a given TRX+TS, which is required for setups with several
TRX and PDCH-enabled TS different than the default. These new APIs
will be used in PCU_Tests.ttcn in subsequent patches.

Change-Id: I28430e6d8c77d2b7dc630d186d425a5d82587b82
2020-11-06 13:08:50 +00:00
Vadim Yanitskiy dbd4b245c0 PCU_Tests: verify CS paging of multiple subscribers
The change introduces three new test cases:

  - TC_paging_cs_multi_ms_imsi,
  - TC_paging_cs_multi_ms_tmsi,
  - TC_paging_cs_multi_ms_imsi_tmsi.

Each of these establishes 56 Uplink TBFs, and then enqueues 56 CS
PAGING requests from the SGSN side.  The main idea is to verify
encoding and compositing of the paging MIs in PACCH massages.

Change-Id: Ie8b4006f969598c9b0c452002d559f985d108a66
Related: OS#4838
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 8a02b92ce0 PCU_Tests: add 'f_multi_ms_' API for multi-MS test cases
Change-Id: Ie2cc717f9f50db16748fe4e4a0ad80d549981e61
Related: OS#4838
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy b6aae9980d GPRS_Components: remove even more unused module imports
Change-Id: I25b1f1e02c95db0f0aed3867f814f9476d3c0d0d
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 316b0c6d78 GPRS_Components: remove unused import of MobileL3_GMM_SM_Types
Change-Id: I502c2b9905e18915da179c1bdf57402f56bdf7bf
2020-11-02 19:24:45 +07:00
Vadim Yanitskiy 7d72a7627b GPRS_Components: remove unused NS / BSSGP module imports
Change-Id: Idf8a92b03015e6a44512e820d8a8bdba7ce556e9
2020-11-02 19:24:45 +07:00