Commit Graph

337 Commits

Author SHA1 Message Date
Vadim Yanitskiy 2b1ded220e srsue/extnas: derive abstract 'nas_base' class from 'nas'
This is the first step towards the goal of having an external NAS
interface.  The new 'nas_base' class becomes a parent of 'nas',
combining all interfaces and the basic (common) API.

The 'ue_stack_lte' now holds a unique_ptr of type 'srsue::nas_base',
so the underlying NAS implementation (built-in or external) can
be choosen at run-time depending on configuration.

The implementation specific configuration now needs to be passed
to the constructor instead, not to the init() method as was before.
2020-11-09 05:34:03 +07:00
Andre Puschmann debbab93e8 mac_test: cosmetic change 2020-10-28 12:05:53 +01:00
Andre Puschmann e89254ad1f mac_test: fix mac_ra_test according to BSR changes
the BSR routine had a bug in which it would generate a BSR even
before the reTx timer expires if new data becomes availble
for a LCID that already had data and a BSR was already sent.

The RA test here relies on a BSR in the generated MAC PDU to pass.

However, since after fixing the BSR bug the PDU the MUX unit
no longer generates a BSR, we need generate data for a LCID
which has higher priority than the one for which a BSR has
already been sent.
2020-10-28 12:05:53 +01:00
Andre Puschmann d6ef66b0dc mac_test: add periodic BSR test 2020-10-28 12:05:53 +01:00
Xavier Arteaga 03b88f6149 Added noise to neighbour cell search test 2020-10-20 11:53:28 +02:00
Andre Puschmann 3b1ae970b9 metrics_test: fix uninit variable 2020-10-18 15:56:16 +02:00
Andre Puschmann d51a060bfa nas_test: fix potential out of bounds access 2020-10-18 15:56:16 +02:00
Andre Puschmann 1bbbc9d717 rrc_phy_ctrl_test: fix uninit memory 2020-10-18 15:56:16 +02:00
Francisco Paisana 665b3996bb now the phy controller handles the scenario where the phy cell selection failed to be initialized 2020-10-16 15:54:42 +01:00
Andre Puschmann 7352bfa4bd mac_test: add unit test for retxBSR timer
this test varifies the correct operation of the retxBSR timer.
the first PDU includes a long BSR to indicate more LCGs have
data to transmit. The retxBSR timer is started and subsequent
PDUs should not send a regular BSR.

After the retxBSR timer expires, a UL PDU should again include
a BSR.
2020-10-15 11:52:13 +02:00
Andre Puschmann fab86382c1 mac,rrc: add interface to set SR config explicitly without touching any other MAC function
when releasing PUCCH/SRS (see 5.3.13 in 36.331) we need to reset the SR config as well.
In our case, SR is handled by MAC so we need to (re-)configure MAC, not all of
MAC though, just SR.
2020-10-13 17:38:45 +02:00
Francisco Paisana 585d7c923a refactor and simplification of cell selection procedure. Using now a SIB3 threshold to decide whether to select neighbor cell while in RRC_IDLE 2020-10-12 13:42:46 +01:00
Andre Puschmann 829dfc4e60 metrics_stdout: fix precision calculation for 100%
the precision for 100% was causing the default value of -1 which in turn
cause to print the full precision resulting in ugly stdout plots.

before:
--------Signal--------------DL-------------------------------------UL----------------------
cc pci  rsrp    pl    cfo   mcs   snr turbo  brate   bler   ta_us  mcs   buff  brate   bler
 0   0   -10    74    0.0   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   0.0   0.0   0.0   150k100.000000%   0.0   0.0    0.0    0.0     0%

after:
--------Signal--------------DL-------------------------------------UL----------------------
cc pci  rsrp    pl    cfo   mcs   snr turbo  brate   bler   ta_us  mcs   buff  brate   bler
 0   0   -10    74    0.0   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   0.0   0.0   0.0   150k   100%   0.0   0.0    0.0    0.0     0%
2020-10-05 22:42:04 +02:00
Francisco Paisana d910c910a4 rrc::meas_cell now uses stack timers instead of system timers. 2020-10-02 17:53:02 +01:00
Francisco Paisana 49ad1a4312 added unit test for meas cells 2020-10-02 17:53:02 +01:00
Andre Puschmann 04acc78c7d metrics_test: add neighbor cell test
cleanup test and add neighbor cells so the displaying is tested

--------Signal--------------DL-------------------------------------UL----------------------
cc pci  rsrp    pl    cfo   mcs   snr turbo  brate   bler   ta_us  mcs   buff  brate   bler
 0   0   -10    74    0.0   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   0.0   0.0   0.0   150k    50%   0.0   0.0    0.0    0.0     0%
--------Signal-------------Neighbour--DL-------------------------------------UL----------------------
cc pci  rsrp    pl    cfo  pci  rsrp  mcs   snr turbo  brate   bler   ta_us  mcs   buff  brate   bler
 0   0   -10    74    0.0   8   -33   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   8   -33   0.0   0.0   0.0   150k    50%   0.0   0.0    0.0    0.0     0%
--------Signal--------------DL-------------------------------------UL----------------------
cc pci  rsrp    pl    cfo   mcs   snr turbo  brate   bler   ta_us  mcs   buff  brate   bler
 0   0   -10    74    0.0   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   0.0   0.0   0.0   150k    50%   0.0   0.0    0.0    0.0     0%
 0   0   -10    74    0.0   0.0   0.0   0.0   200k     0%   0.0   0.0    0.0    0.0     0%
 1   0   0.0   0.0    0.0   0.0   0.0   0.0   150k    50%   0.0   0.0    0.0    0.0     0%
2020-10-01 20:09:16 +02:00
Francisco Paisana cf89f4300a fix ttcn3 to signal back to stack that a phy config has been completed 2020-10-01 11:25:21 +01:00
Francisco Paisana 2416e274a7 fix rrc_meas_test. The phy now needs to signal back to the rrc that the phy config is complete 2020-10-01 11:25:21 +01:00
Andre Puschmann 936e3b7bef mac_test: add manual test for TC 7.1.4.6 2020-09-30 17:17:21 +02:00
faluco 51b27fc255
Import latest srslog version (#1796)
* - Import latest srslog version.
- Adjusted the nas_test to create logs correctly.
- Remove timestamp formatting now that is provided by srslog.
2020-09-30 15:52:42 +02:00
faluco dfeed52514 - Rename out_stream function to console. 2020-09-29 17:38:13 +02:00
faluco 62faef7c71 - Replaced all uses of the log::console method. 2020-09-29 17:38:13 +02:00
Andre Puschmann f32d9f8322 ttcn3: call stop in UE dtor
fixes stop issue of TTCN3 DUT
2020-09-28 22:04:23 +02:00
Pedro Alvarez b3bfe336a9 Make sure that remote address test has a ip mask 2020-09-28 16:08:28 +02:00
Sylvain Munaut 6ce5863f03 test/tft_test: Add a combined test for IPv6 packets 2020-09-28 16:08:28 +02:00
Sylvain Munaut 9ba8b62972 test/tft_test: Update filter test suite
The “IPv4 local address type” filter should be 9 bytes since it includes
not only the ip address, but also its subnet mask.

Quoting from 3GPP TS 24.008 10.5.6.12:
"""
 For "IPv4 remote address type", the packet filter component value field
 shall be encoded as a sequence of a four octet IPv4 address field and a
 four octet IPv4 address mask field. The IPv4 address field shall be
 transmitted first. For "IPv4 local address type", the packet filter
 component value field shall be encoded as defined for "IPv4 remote
 address type".
"""

Same for the ToS which also includes a 1 byte mask value
2020-09-28 16:08:28 +02:00
Ismael Gomez b94d24ed98
Take into account CRS from neigbhour cells when measuring interference (#1757)
* Take into account CRS from neigbhour cells when measuring interference

* fix std::isnormal compilation

* Fixed compilation of test

* Address comments

* Remove unused overrides
2020-09-23 21:46:03 +02:00
Andre Puschmann 1afc137032
[REBASE] Make PHY non-blocking and fefactor HO procedure (#1753)
* Make PHY non-blocking and fefactor HO procedure

* makes entire PHY non-blocking through command interface
* adds dedicated queue for cell_search/cell_select commands
* refactor HO procedure to run faster, in one stack cycle. Looks closer to the specs
* force ue to always apply SIB2 configuration during reestablishment
* Run update_measurements in all workers

Co-authored-by: Ismael Gomez <ismagom@gmail.com>
2020-09-22 21:47:16 +02:00
faluco f0d651ae8e - Fixed a leak in the MME class not releasing the static byte buffer pool.
- Now the pool gets destroyed on program exit using a unique_ptr.
- Removed manual cleanup() calls in all the code base to free the pool instance.
2020-09-22 18:00:50 +02:00
Ismael Gomez 5968157ea5
Protect better the access to shared variables in phy_common and metrics (#1750) 2020-09-22 14:32:08 +02:00
Andre Puschmann a36f9bddc2 ttcn3: use RNTI values in RACH provided by tester
this patch extends the SS to use the C-RNTI and Temp CRNTI values
provided by the tester for RAR and Msg3.
2020-09-22 14:03:39 +02:00
Andre Puschmann d90de639e5 ttcn3_syssim: continue when epoll returns -1
this allows to debug and step in the SS
2020-09-21 09:27:07 +02:00
Andre Puschmann 1b266257a1 ttcn3_phy: improve logging of cell measurements 2020-09-21 09:27:07 +02:00
Andre Puschmann 3088cdbb0f ttcn3: fix uncaught exception in SS
fix accessing child element in parsed Json without checking
its existence.
2020-09-14 21:20:59 +02:00
Andre Puschmann 3e824f6370 ttcn3: convert TTI action vector to queue
this makes sures queued events are executed FIFO
2020-09-14 21:20:59 +02:00
Andre Puschmann 624c8142ad ttcn3: refactor cell handling in SS
this rather large patch changes the way cells are handled in the SS.
It moves RLC and PDCP entities to the cell map of the SS, such that each cell
has its own entities. This allows to support HO operation, for example,
in which two cells need to send SRB messages.

It also extends most of the syssim interface to include the cell name
in all commands so they can be applied on the specified cell only.
2020-09-14 21:20:59 +02:00
Andre Puschmann 4650a620d9 ttcn3: refactor cell search and selection in TTCN3 PHY
- make sure only suitable cells are reported/selected
2020-09-14 21:20:59 +02:00
Andre Puschmann 973de8f78d ttcn3_dut: block OS signals before starting log backend
this prevents the backend thread from handling the signals. they
are only handled by epoll running in the main thread.

this fixes #1713
2020-09-14 21:20:00 +02:00
faluco c178e362b8 - Rewrite log management so that a log sink can be swapped for each testcase. 2020-09-10 17:14:51 +02:00
Ismael Gomez 4c1d3ef7e8
Fix implementation of Random Access problem (#1689)
* Fix implementation of Random Access problem

* Apply AS activated condition on RLF before calling Reestablishment
2020-09-04 13:13:42 +02:00
Ismael Gomez f49fbd6d02
Fix the order of HO/reest measurement actions (#1696) 2020-09-04 12:18:12 +02:00
Andre Puschmann 92d76a5eb6 mac_test: update tests involving BSR handling
* split existing BSR test into dedicated test for short, long, and trunc
  BSR tests

* update MAC tests that include packing UL BSR.
  (After checking TS 36.321 again it seems we have reported old UL buffer states)
2020-09-03 15:00:36 +02:00
Ismael Gomez 54eed11e1d Refactor decision for extended CSI/SRS 2020-09-03 10:45:06 +02:00
Francisco Paisana 92221eb780 update of rrc_interface_mac to remove signal from mac to rrc that RA failed in case of handover failure 2020-08-29 20:06:08 +01:00
Andre Puschmann 641a4a5e79 mac_test: fix compilation if PCAP write is enabled 2020-08-27 23:46:28 +02:00
Daniel Willmann 7d0ae71f17 ttcn3_sys_interface: Handle initial cell attenuation
When new Cells are added they can have an attenuation configured
directly. Honor that setting.
2020-08-27 19:18:47 +02:00
Ismael Gomez 72cc4e0ca5 Stop ContentionResolutionTimer on RA error. Updated test 2020-08-27 10:04:42 +02:00
Francisco Paisana 75b204bc52 fix phy ctrl call to cell selection observers 2020-08-24 22:10:32 +01:00
Francisco Paisana 834c0b3929 integrated new observer pattern into phy controller fsm 2020-08-24 22:10:32 +01:00
Francisco Paisana 48dd436d86 integrated observer pattern into rrc phy ctrl fsm 2020-08-24 22:10:32 +01:00