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
Francisco Paisana
b1670c005b
remove shadowed variables for reestablishment during handover
2020-08-24 17:48:50 +01:00
Francisco Paisana
8d10aa906e
move defer_task to switch case in the rrc
2020-08-17 22:49:40 +01:00
Xavier Arteaga
4e1e8cea1a
SRSUE: MAC HARQ entities vector is fixed
2020-07-28 09:31:34 +02:00
Francisco Paisana
4fb8011a6d
updated phy controller to use task scheduler
2020-07-14 13:33:50 +01:00
Francisco Paisana
9c5471b094
more ergonomic event callback
2020-07-14 13:33:50 +01:00
Francisco Paisana
58a9610efa
use of stack event loop to propagate cell search and selection results
2020-07-14 13:33:50 +01:00
Francisco Paisana
d48a45976e
moved cell selection/search complete event signalling out of phy_controller
2020-07-14 13:33:50 +01:00
Francisco Paisana
48138b5281
removal of phy cell selection procedure as it now it is replaced by phy controller
2020-07-14 13:33:50 +01:00
Francisco Paisana
489969722e
implemented phy controller FSM to perform cell selection & search. The controller also tracks the phy sync state
2020-07-14 13:33:50 +01:00
Andre Puschmann
a7911f0dab
pdcp,rlc: refactor SDU queueing policy
...
this patch refactors the SDU queuing and dropping policy of the RLC and PDCP layer.
the previous design had issues when packets have been generated at a higher
rate above the PDCP than they could be consumed below the RLC.
When the RLC SDU queues were full, we allowed two policies, one to block on the write
and the other to drop the SDU. Both options are not ideal because they either
lead to a blocking stack thread or to lost PDCP PDUs.
To avoid this, this patch makes the following changes:
* PDCP monitors RLC's SDU queue and drops packets on its north-bound SAP if queues are full
* a new method sdu_queue_is_full() has been added to the RLC interface for PDCP
* remove blocking write from pdcp and rlc write_sdu() interface
* all writes into queues need to be non-blocking
* if Tx queues are overflowing, SDUs are dropped above PDCP, not RLC
* log warning if RLC still needs to drop SDUs
* this case should be avoided with the monitoring mechanism
2020-07-13 17:05:28 +02:00
Francisco Paisana
5e06430455
removal of stack handler interface
2020-07-13 11:19:25 +01:00
Francisco Paisana
7c364070ee
creation of task scheduler interface for classes/functions running outside the main control thread
2020-07-13 11:19:25 +01:00
Francisco Paisana
039977aeb5
renamed interfaces
2020-07-13 11:19:25 +01:00
Francisco Paisana
1a9c04bf2f
use of task scheduler handle in pdcp
2020-07-13 11:19:25 +01:00
Francisco Paisana
4f5e65781f
created task scheduler class to deal with timers, thread pool, multiqueue, internal tasks
2020-07-13 11:19:25 +01:00
Francisco Paisana
8c920837d6
fix issue when adding neighbour cell that matches serving cell
2020-07-08 00:19:18 +01:00
Francisco Paisana
d746115130
moved serving cell to meas_cell_list
2020-07-08 00:19:18 +01:00
Francisco Paisana
928459408e
fix cell meas sorting issue
2020-07-08 00:19:18 +01:00
Francisco Paisana
d2dd30c8cb
rrc_meas_test failing
2020-07-08 00:19:18 +01:00
Francisco Paisana
9a1f69113f
created class for managing neighbor cells of rrc
2020-07-08 00:19:18 +01:00
Francisco Paisana
069dc1f751
moved cell struct of srsue::rrc to separate file
2020-07-08 00:19:18 +01:00
Andre Puschmann
bd0c13aad0
ue_stack: bump priority of stack thread
...
the stack thread should really run with the next highest priority after
sync + phy workers to make sure it gets enough CPU
2020-07-05 16:56:06 +02:00
Francisco Paisana
d12b037e0d
make cell reselection periodic and with period of 20msec
2020-07-03 18:35:53 +01:00
Francisco Paisana
c6f422d23e
improved cell selection test in srsue::rrc
2020-07-03 14:00:14 +01:00
Francisco Paisana
3e016b8095
select serving cell during cell selection if it is stronger than neighbors
2020-07-03 10:26:49 +01:00
Ismael Gomez
e378a45db0
Reorganized priorities to avoid GW starve the CPU
2020-07-02 11:52:14 +02:00
Andre Puschmann
a5c0f96fa7
srsue: limit sync queue length to 1 for ZMQ radio
...
apply same change that we've done on the eNB also on the UE
to avoid the PHY processing TTIs faster than the stack.
Without that, we see lots of those in the logs:
...
08:39:17.580325 [STCK] [W] Detected slow task processing (sync_queue_len=7).
...
2020-06-30 10:36:01 +02:00
Andre Puschmann
e981d5ee70
rrc,ue: refactor wait conditions before transition to RRC idle
...
before entering RRC idle, after receiving a RRC connection release for example,
we need to wait until the RLC for SRB1 or SRB2 have been flushed, i.e.
the RLC has acknowledged the reception of the message.
Previously we have only waited for SRB1 but the message can also be received on SRB2
and in this case both bearers need to be checked.
The method is now streamlined to check both SRBs and is also used when
checking the msg transmission of an detach request.
2020-06-29 21:19:42 +02:00
Francisco Paisana
fddcbc9879
fix vnf-ue stack interface
2020-06-24 23:28:53 +01:00
Daniel Willmann
31f1516d74
Use callback to establish connection before sending PDUs in TestmodeB
2020-06-23 12:12:58 +02:00
Francisco Paisana
f0874b780b
add radio_base/null classes
2020-06-18 23:37:26 +01:00
Ismael Gomez
54b331c504
Adds best neighbour to CSV and stdout metrics ( #1440 )
2020-06-17 12:11:06 +02:00
Xavier Arteaga
de230826b9
Added string helper for removing spaces and parsing list
...
Fix
Fix string parser
2020-06-16 11:00:51 +02:00
Francisco Paisana
81848deae2
extended handover procedure to accommodate all the handover (phy cell select + ra)
2020-06-02 19:11:26 +01:00
Francisco Paisana
556fcb69e7
fix handover my defering to next tti the reestablishment of bearers
2020-06-02 19:11:26 +01:00
Francisco Paisana
37ce475398
fix+refactor of the ue rrc handover preparation procedure to avoid deadlocking
2020-06-02 19:11:26 +01:00
Francisco Paisana
8f4f37e89b
remove more unused rrc variables
2020-06-01 19:59:50 +01:00
Francisco Paisana
29fd147d41
remove unused rrc variables
2020-06-01 19:59:50 +01:00
Francisco Paisana
b2aae8763b
made mac_nr and rrc_nr final to avoid using virtual dtors
2020-06-01 19:59:50 +01:00
Francisco Paisana
452c043370
created a global map of lcids to srbs/drbs for NR
2020-05-29 14:11:23 +01:00
Francisco Paisana
4cf756434f
add srsue::rrc_nr srsue::ue_stack_nr
2020-05-29 14:11:23 +01:00
Francisco Paisana
6a164e032d
added srsue::rrc_nr
2020-05-29 14:11:23 +01:00
Francisco Paisana
edba7f57e4
corrected mac_nr_pdu includes
2020-05-26 10:02:08 +01:00
Francisco Paisana
0b701022a3
added ue nr mac
2020-05-26 10:02:08 +01:00
Ismael Gomez
b5ccbf1891
Simplify relationship between BSR, SR and RA procedures. Fix issue #1346
2020-05-21 15:36:44 +01:00
faluco
9efa24bfa9
More warning fixes.
2020-05-07 10:10:24 +02:00
faluco
7ff251f112
- Fixed warnings caught by Clang 9.0.0
2020-05-07 10:10:24 +02:00
Pedro Alvarez
2ea78c8feb
Added configuration options for stack logging.
2020-05-05 14:34:47 +01:00
Francisco Paisana
de4d58d8fe
fix coverity scan issues in master
2020-04-29 11:17:00 +02:00
Francisco Paisana
af9ca9f9e5
remove unecessary moves
2020-04-27 22:19:08 +01:00
yagoda
8e0b106c22
fixing some warnings from LGTM
2020-04-27 20:59:40 +02:00
Xavier Arteaga
89dcd6339f
More LGTM fixes
2020-04-22 18:01:43 +02:00
Xavier Arteaga
77d5dedddc
Fix LGTM warnings and recommendations
2020-04-22 18:01:43 +02:00
Francisco Paisana
6ddedd5972
moved pdu to common mac folder
2020-04-22 10:06:08 +01:00
Francisco Paisana
c09f76ed6c
unified stack task defer method
2020-04-10 22:30:59 +01:00
Andre Puschmann
d35c9e2b89
nas: add support ot UE test loop mode B
...
extend GW-NAS interface to signal test mode activation.
The method is a noop in the normal GW but is implemented in
the TTCN3 DUT according to TS 36.509 for Mode B
2020-04-10 21:18:43 +02:00
Andre Puschmann
66a799661e
gw,tft: move traffic flow template matching into own class
...
this prepares the reuse of the matching functions for the TTCN3 DUT.
create own matcher class that the GW uses.
2020-04-10 21:18:43 +02:00
Francisco Paisana
a2ade9edd1
break down rrc_interface_types.h into multiple files. moved pdcp_config.h to same folder
2020-04-09 10:10:04 +01:00
Daniel Willmann
925225dbeb
Implement Close UE Test Loop/Complete messages
...
This commit implements support for the CLOSE_UE_TEST_LOOP message.
Currently the mode is not saved and looping the data is not implemented.
Only the *_COMPLETE message is sent back as a response.
2020-04-04 22:51:43 +02:00
Andre Puschmann
acc2948b45
nas: fix security handling
...
First of all, with this the NAS conformance tests pass with ciphering and
integrity turned on. Before only integrity was working.
Mainly the NAS was applying the integrity protection and/or ciphering
incorrectly because it wasn't taking the secuirty status of the PDUs
into account. Some where already correct, some not. The patch
streamlines the handling for all outgoing messages.
2020-04-03 22:22:04 +02:00
Xavier Arteaga
25312e81b4
SRSUE: cell select RRC MEAS CFO is carried to PHY Cell object
2020-04-02 13:52:23 +02:00
Xavier Arteaga
051e8fcc52
SRSUE: Apply default PHY config to SCell as well
2020-04-02 13:52:23 +02:00
Xavier Arteaga
6d355ab61e
SRSUE: Fix HO initial CFO
2020-04-02 13:52:23 +02:00
Francisco Paisana
30ae2226c1
common interface for stack multiqueue tasks, background tasks and timers
2020-03-31 13:42:06 +01:00
Andre Puschmann
62e4bd9469
log_ptr: fix issue if accessing log_ptr that was reset already
...
during deinit of the UE/eNB it could happen that the log_ptr
was already set to null but the stack thread was still accessing
it through log_h->info()
i've moved the old macro into a new header and used as as much
as possible. there are still places in the code where similar
macros are used but we would need to change the variable name
to replace them
2020-03-31 12:32:52 +02:00
Andre Puschmann
dbb8b6a360
nas: add helper for entering new state in FSM
...
the helper will log the event
2020-03-30 11:23:40 +02:00
Andre Puschmann
d8680cc9a8
nas: add helper to pack attach request and send to RRC
2020-03-30 11:23:40 +02:00
Andre Puschmann
cf28276a3a
nas: add helper function to reset NAS security context
2020-03-30 11:23:40 +02:00
Andre Puschmann
94c6034339
nas: rename start_attach_request to start_attach_proc
...
this is to better differentiate from "send_attach_request" that
only packs and send the actual attach request message. The
entire attach procedure may include PLMN search, etc.
2020-03-30 11:23:40 +02:00
Andre Puschmann
15c47fab56
nas: adding t3402 to restart attach after initial attach attempt counter expired
2020-03-27 18:15:37 +01:00
Andre Puschmann
7ef56cb637
nas: add an attach attempt counter as described in 24.301
2020-03-27 18:15:37 +01:00
Francisco Paisana
599588ff51
removed uneeded locks in the rlc, moved ue stack get_metrics to stack thread, solved the idle procedure double-locking
2020-03-25 19:18:00 +00:00
Ismael Gomez
95c6916987
Improve robustness in RF Overflow ( #1124 )
...
* Use task id to track old background tasks in RA procedure
* Improve robustness against RF overflow in PHY
* Increase SNR out-of-sync threshold
* Do not change frequency if it's the same
* Increase sync priority
* Increase time to start receiving to reduce input buffer occupation
* Use scoped lock in sf_worker
2020-03-25 16:56:32 +01:00
Francisco Paisana
8e837e173d
printf has already a way to pad spaces. If we use it, we can avoid accidentally adding extra logs because we did srslte::logmap::get("MAC") instead of srslte::logmap::get("MAC ")
2020-03-24 22:36:27 +00:00
Francisco Paisana
aeed623734
removed pdu processing from the ue rrc cmd queue. Instead, now the rrc processes the incoming pdus right away. This is essential to fix the security cmd issue in the ue
2020-03-24 12:28:12 +00:00
Andre Puschmann
b9a2217355
fix uninit vars reported by Coverity
2020-03-24 09:47:07 +01:00
Andre Puschmann
3f10224729
refactor airplane mode simulation and move to NAS
...
- move handling to NAS
- use switch off to enable airplane mode (don't wait for EPC response)
- add tiny FSM to control airplane mode activation/deactivation
- only start on/off counter after state has been entered
2020-03-23 13:36:25 +01:00
Francisco Paisana
e91a7ea513
removed stack-mac interface dedicated methods. We use now the task dispatch methods instead
2020-03-22 11:50:58 +00:00
Francisco Paisana
de03c96c3b
mac::process_pdus now uses the stack task dispatch interface
2020-03-22 11:50:58 +00:00
Francisco Paisana
7f6bde59fc
move write_pdu_pcch and write_pdu_bcch_bch to stack thread
2020-03-22 11:50:58 +00:00
Francisco Paisana
de3c28e52d
added task dispatch capabilities to stack interface
2020-03-22 11:50:58 +00:00
Francisco Paisana
46a1be3e76
updated mac-rlc interface to use unique_byte_buffer
2020-03-22 11:50:58 +00:00
Francisco Paisana
82cb6baef0
now the whole ue and enb mac uses the logmap
2020-03-20 11:32:03 +00:00
Francisco Paisana
45bc123967
remove manual tti counters from the rrc
2020-03-19 21:52:53 +00:00
Francisco Paisana
138347b6b5
nas using stack timers
2020-03-19 21:52:53 +00:00
Francisco Paisana
770f04b92a
the rrc now only works with the stack latest tti, instead of mac's tti
2020-03-19 16:47:55 +00:00
Francisco Paisana
e3e5b5be11
removed tti from some mac subcomponent interfaces
2020-03-19 16:47:55 +00:00
Francisco Paisana
d3f49d0e3c
changed interface sync-stack to allow tti jumps > 1
2020-03-19 16:47:55 +00:00
Francisco Paisana
e73cbb09b0
created tprof statistic for sliding windows
2020-03-19 10:59:37 +00:00
Ismael Gomez
cf4f4508ce
Normalize throughput in CSV/stdout metrics with respect to number of TTIs
2020-03-16 22:58:09 +01:00
Xavier Arteaga
e832769ae6
Updated copyright
2020-03-16 11:26:06 +01:00
Andre Puschmann
70ffe79b43
add support for periodic airplane mode simulation in srsUE
2020-03-13 17:35:03 +01:00
Pedro Alvarez
96c82b3fc6
Moved PDCP configs to pdcp_config.h. Added `as_security_cfg_t` structure to hold access stratum keys.
...
Refactored PDCP, RRC and USIM accordingly.
2020-03-11 09:00:38 +00:00
Andre Puschmann
5b8b718482
simplify NAS security handling and fix missing call in act test mode complete
...
add extra method to apply NAS security config, if configured,
that can be used by each NAS message sender
2020-03-06 18:07:21 +01:00
Andre Puschmann
664170fec6
pcap: add CC index when writing PCAP
2020-03-05 20:46:14 +01:00
Andre Puschmann
df31a5c4cc
store CC idx in DL/UL HARQ entity
2020-03-05 20:46:14 +01:00
Francisco Paisana
fed06138b9
moved rach_detected to stack thread. Created a more friendly interface to enqueue tasks in stack
2020-03-03 21:03:21 +00:00
Andre Puschmann
8e4f2a4d59
add UE parameter to enable TTI stats calculations
2020-03-03 16:22:04 +01:00