Commit Graph

2682 Commits

Author SHA1 Message Date
Xavier Arteaga 237de07ab3 UHD: disable AD936x based device reset 2020-07-31 13:11:10 +02:00
Xavier Arteaga ff8925b6ec UHD: use same timeout policy than previous release 2020-07-31 13:11:10 +02:00
Xavier Arteaga ac76a398fe UHD: Minor stability improvement 2020-07-31 13:11:10 +02:00
Xavier Arteaga d2abaaf719 UHD: add initial test for AD936x based devices during initialization 2020-07-31 13:11:10 +02:00
Xavier Arteaga f80c779d88 RFNOC: added DUC/DDC internal loopback option and test 2020-07-31 13:11:10 +02:00
Xavier Arteaga dcf05f7a53 UHD: Improved RFNOC 2020-07-31 13:11:10 +02:00
Xavier Arteaga 38d9545e99 UHD: API improvement 2020-07-31 13:11:10 +02:00
Xavier Arteaga 405e0c8195 UHD: Check if tree exist before requesting access 2020-07-31 13:11:10 +02:00
Xavier Arteaga 5d43fc903e UHD: fix SPP equal 0 2020-07-31 13:11:10 +02:00
Xavier Arteaga 774c0926a6 UHD: added device args for log level, spp and return if timeout 2020-07-31 13:11:10 +02:00
Xavier Arteaga 88a1ab12c5 UHD: Generic detects if it a AD9361, USB based device and resets if LIBUSB_TRANSFER_ERROR is detected 2020-07-31 13:11:10 +02:00
Xavier Arteaga 04a661d239 UHD: RFNOC class detects custom DDC and DUC 2020-07-31 13:11:10 +02:00
Xavier Arteaga 180fb42dc3 UHD: minor aesthetic corrections 2020-07-31 13:11:10 +02:00
Xavier Arteaga 0f24d510ac UHD: Fix RFNOC DDC frequency calculator 2020-07-31 13:11:10 +02:00
Xavier Arteaga ebf995c621 UHD: better RFNOC detection and configuration 2020-07-31 13:11:10 +02:00
Xavier Arteaga 0e360b3953 UHD: RFNOC Dynamic re-configuration 2020-07-31 13:11:10 +02:00
Xavier Arteaga d9cb51d261 UHD: Added custom DDC/DUC support
UHD: Aesthetic corrections

UHD: minor aesthetic changes
2020-07-31 13:11:10 +02:00
Xavier Arteaga e4a794fdbd UHD: Initial RFNOC implementation
UHD: Fix RFNOC for multiple carriers
2020-07-31 13:11:10 +02:00
faluco cfd3f51931
Import of srslog into srsepc and srsenb. (#1574)
* - Import of srslog into srsepc and srsenb.
* - Removed logger_file and logger_stdout files.
2020-07-30 19:17:23 +02:00
Xavier Arteaga 21e9a3958f Minor changes 2020-07-28 09:31:34 +02:00
Xavier Arteaga 2271aec6b2 Radio: remove trace 2020-07-28 09:31:34 +02:00
Xavier Arteaga a5fefbfdd3 Radio: fix possible overflow 2020-07-28 09:31:34 +02:00
Xavier Arteaga 51c6e8d1a6 Radio: channel map includes device mapping, unmapped Rx uses dummy buffers 2020-07-28 09:31:34 +02:00
Xavier Arteaga 74fde5597f PDSCH_UE: added synchronization error to console 2020-07-28 09:31:34 +02:00
Xavier Arteaga edda1f730a srsLTE: Placeholder Band correction 2020-07-28 09:31:34 +02:00
Xavier Arteaga d8eaa99132 Radio: do not use more radios than necessary 2020-07-28 09:31:34 +02:00
Xavier Arteaga 5258f27490 Fix start-of_burst for PRACH Test USRP 2020-07-28 09:31:34 +02:00
Ismael Gomez dda91b14f7 Remove duplicate add_rnti() function since already done in set_config 2020-07-27 17:58:06 +02:00
Xavier Arteaga fda1d040e7 SRSENB: implement PUSCH threshold for UCI bits 2020-07-27 16:44:15 +02:00
faluco efdff8ba4c
Import srslog into srsue (#1556)
- Import the srslog project into srslte.
- Ported srsue app to use the new logging framework.
- Implemented a wrapper that dispatches log entries to srslog.
- Renamed an existing log test to be more specific to avoid name clashes.
2020-07-22 16:04:18 +02:00
Andre Puschmann d441486f76 fading: fix heap buffer overflow in fading sim
at the when applying the fading channel we copied the state back
to our buffer. Since we are offsetting the read buffer
by X samples, we need to make sure that we don't read after then
(len-X) samples of the temporary memory buffer
2020-07-21 21:42:22 +02:00
Andre Puschmann 1199a79851 fix Scell sync for large cells
the PSS detection needs more temporary buffer than a full subframe.
we therefore need to allocate and initialize the sync object with
larger maximum size to support Scell search of large cells, e.g.
20 MHz

this fixes issue #1538
2020-07-21 18:35:53 +02:00
Ismael Gomez f380f46a10 Revert "Remove unnecessary zero memory (#1564)"
This reverts commit f662aeaff3.
2020-07-21 16:24:06 +02:00
Andre Puschmann 9550bd3ef8 rlc: revisit interface for MAC and RRC
* add locked and unlocked version of has_data() since one is
  called from stack and one from PHY threads

* add comments in each interface section as to why locking
  is required or not

* remove RLC rwlock when not required

* move calls only used by RRC to RRC section
2020-07-21 11:56:43 +02:00
Andre Puschmann 7f98cb9b62 pdcp: log discard timer duration in init()
to log the configured discard timer length
2020-07-21 11:56:43 +02:00
Andre Puschmann a578ff1975 pdcp: fix typo 2020-07-21 11:56:43 +02:00
Francisco Paisana 58c4bcf288 reduce mcs for UL grants carrying UCI 2020-07-21 10:51:11 +01:00
Ismael Gomez f662aeaff3
Remove unnecessary zero memory (#1564)
* RF drivers to allow nullptr buffers in send/recv

* Remove zeromem from radio

* remove unused buffers
2020-07-20 19:11:56 +02:00
Andre Puschmann dc67d28709 nas: do not generate NAS encryption key if also is set to NULL
its more a cosmetic change to clean the logs. this makes
sure that a zero key is logged when NULL encryption is selected.
2020-07-20 10:58:10 +02:00
Ismael Gomez 1eaf7efab0 Fix UL adaptive retx rv index 2020-07-15 18:24:23 +02:00
Xavier Arteaga 5cf2089a8c srsLTE: increased SRS test TA us threshold 2020-07-15 07:34:14 +02:00
Xavier Arteaga 794f969e1a srsLTE: fix TA calculation 2020-07-15 07:34:14 +02:00
Xavier Arteaga 729986f259 srsLTE: Added PUCCH format 3 valid correlation 2020-07-15 07:34:14 +02:00
Xavier Arteaga 0192130742 SRSUE/SRSENB: UCI bits are carrier by the lowest serving cell index
SRSENB: Fix UCI in lowest serving cell index PUSCH transmission
2020-07-15 07:34:14 +02:00
Andre Puschmann c8b4ba885b rename rlc_tx_queue to byte_buffer_queue
this data structure will be used by the PDCP layer as well.
2020-07-14 18:18:32 +02:00
Francisco Paisana 36fc88d2e2 fsm log macros, and utility methods to convert event callbacks to move tasks 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 d48a45976e moved cell selection/search complete event signalling out of 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 6fb01d61a7 rlc: change remaining occurances of "SN: " to "SN="
streamline all RLC AM and UM for better log analysis
2020-07-14 09:47:53 +02:00
Xavier Arteaga 137d250d66 srsLTE: fix ZMQ decimation pointer 2020-07-13 19:15:25 +02: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
Andre Puschmann 7a66a00e15 block_queue: add method to check if given queue is full 2020-07-13 17:05:28 +02:00
Xavier Arteaga f39abe0094 SRSENB: fix MAC pending PHY config 2020-07-13 15:27:46 +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 e9f34c7613 using task scheduler in enb stack 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
Pedro Alvarez 89b6e0f714 Send paging message to all cells. 2020-07-10 10:14:08 +01:00
Francisco Paisana fe8f8be62d apply separate cqi configurations to scells 2020-07-09 18:56:01 +02:00
Andre Puschmann d5f0ad9f35 pdcp: fix typo 2020-07-09 16:13:16 +02:00
Andre Puschmann 2749c870e3 rlc_am: refactor control test
* move both tests into own functions and call those in main()
* use common test header and macros
2020-07-08 10:09:06 +02:00
Andre Puschmann 035c369a43 mac_pdu: fix check of remaining length when adding new subheader to MAC PDU
when adding a new subheader to a MAC PDU we should only add the subheader
if at least 2 bytes are left in the PDU. Even a 1 Byte MAC Control Element requires
another byte to pack the subheader.

This fixes #1424 in which a 3 B MAC opportunity is provided in the UL. After
adding the Short BSR, we tried to add another MAC subheader. Adding the subheader
succeeded even though no space is left to add a single byte. With this patch,
adding the subheader fails and the generates MAC PDU is correct.
2020-07-08 10:08:26 +02:00
Andre Puschmann 58e255cb63 pdu_test: add unit test to verify correct packing of 3B PDU with Short BSR 2020-07-08 10:08:26 +02:00
Andre Puschmann 5589816690 pdu_test: fix PCAP output
API now requires to pass CC index
2020-07-08 10:08:26 +02:00
Andre Puschmann f6d3467884 ringbuffer: fix timeout calculation for timed read
with ZMQ RF, we've seen the radio returning -1 and traced
the issue down to the ringbuffer.
in fact, pthread_cond_timedwait() returned 22 (EINVAL) indicating
a wrong timeout value. The issue was likely an overflow
in the timespec parameter. This patch checks for the return
value of pthread_cond_timedwait() and also calculates the
nanosecond wrap around for the timespec
2020-07-07 23:04:05 +02:00
Andre Puschmann aed38a6028 rf_zmq: increase default ZMQ timeout to 2s
amarisoft flags an RF error and exits after not receiving samples
for the radio. Running with ZMQ in the RFCI, the UE sometimes needs more
time to start up due to slow processing and no fftw wisdom file and
then Amarisoft eNB times out. This gives the whole process a little
bit more time. Should we still find it too short we may increase
it further.
2020-07-07 23:04:05 +02:00
Andre Puschmann b3e92883d4 rlc_um: reduce log level when provided space is not enough to build PDU
this is not a warning case as it can always happen. reduce level to info therefore.
2020-07-07 18:01:39 +02:00
Andre Puschmann 95f5093432 rlc_am: hold lock while handling new PDUs
This lock was removed in 1cbf7eac because it was considered unneeded.
However, as can be seen in issue #1503, we need to protect the access
to rx_window, for example.

Issue #1503 shows a stack trace where a PHY worker generates a status PDU.
While holding the mutex to access rx_window, the stack thread on the
other hand, happily accesses the rx_window member without acquiring
the lock. This commit protects all handle_*() functions in write_pdu().

This reverts commit 1cbf7eac04.
2020-07-07 10:41:14 +02:00
Francisco Paisana e550bf726d updated fsm to allow enter methods to receive event that caused them 2020-07-06 14:25:03 +01:00
Andre Puschmann 6f5da19312 pdcp: similar to tx, also reduce log for Rx
instead of logging PDU received from below, and SDU that is forwarded
to above, only log the PDU in rx in info mode.

The next layer will do the same and log the PDU received (which is the SDU coming from here)
so there is now loss of information in the logs.
2020-07-05 16:56:06 +02:00
Andre Puschmann 6654453e22 pdcp: reduce amount of log messages during tx
drop logging encrypted PDU seperately. Instead, only log formatted
PDCP PDU before passing to lower layers
2020-07-05 16:56:06 +02:00
Xavier Arteaga 6f03ce7e11 srsLTE: minor radio fix 2020-07-03 10:48:20 +02:00
Xavier Arteaga 67543a73bb Radio: fix erroneous offset 2020-07-03 10:48:20 +02:00
Xavier Arteaga 8966db31d8 srsLTE: Radio benchmark plots all ports 2020-07-03 10:48:20 +02:00
Andre Puschmann ff96336f91 rlc_um: fix reestablishment for sending UM entity
we've reset the rx state variables during reestablishment but not
the tx state variable.
2020-07-02 17:52:55 +02:00
Francisco Paisana 84f34bc736 changed to a label filtering approach for ctest 2020-07-02 15:56:59 +01:00
Francisco Paisana ebb8f18000 set some extra tests with the prefix "long_" 2020-07-02 15:56:59 +01:00
Francisco Paisana c6323478d2 remove unecessary sleeps in mac test, and add long_ prefix in long tests 2020-07-02 15:56:59 +01:00
Andre Puschmann eb56efe9f5 rlc_am_lte: turn error message into warning and print state variables
the issue doesn't cause any unrecoverable situation so its not
appropiate to use the error level
2020-06-30 14:25:56 +02:00
Francisco Paisana cb7f620254 created separate class to manage bearers buffers/status reports in the scheduler 2020-06-29 17:31:07 +01:00
Andre Puschmann a3d7d4517c rlc_um: add dedicated unit test for the PDU packing bug
Here is the test output with the fix disabled:

13:47:42.679774 [RLC_UM_1] [D] MAC opportunity - 14 bytes
13:47:42.679784 [RLC_UM_1] [D] pdu_space=14, head_len=2
13:47:42.679790 [RLC_UM_1] [D]  adding new SDU segment - 10 bytes of 10 remaining
13:47:42.679834 [RLC_UM_1] [D]  Complete SDU scheduled for tx. Stack latency: 0 us
13:47:42.679909 [RLC_UM_1] [D] pdu_space=4, head_len=2
13:47:42.679922 [RLC_UM_1] [D]  adding new SDU segment - 0 bytes of 10 remaining
13:47:42.679928 [RLC_UM_1] [I]  Tx PDU SN=0 (14 B)
13:47:42.679974 [RLC_UM_1] [D]  vt_us = 1

The test checks the correct packing and of the two PDUs at the end.
2020-06-26 17:58:36 +02:00
Andre Puschmann df50dd7d3c rlc: extend RLC metrics
extend RLC metrics to count Rx/Tx PDUs/SDUs bytes/#
2020-06-26 17:58:36 +02:00
Andre Puschmann 48db31c5cf rlc_stress_test: fix random PDU dropping
the rand() was sometimes giving NaN so this case needs to be handled
and the PDU not dropped to have real zero drop-rate
2020-06-26 17:58:36 +02:00
Andre Puschmann 82f811ed52 rlc_am: change return value when writing SDU
return false when SDU couldn't be added to SDU tx queue so
to count dropped SDUs in base
2020-06-26 17:58:36 +02:00
Andre Puschmann 3cef20607e rlc_am: fix bug in returning zero len bytes 2020-06-26 17:58:36 +02:00
Andre Puschmann 86025cf390 rlc_um: fix PDU packing when newly added SDU segment was too large
during the PDU packing it could happen that a new SDU segment
was added but the resulting larger header was so big that not even
a single byte of the new PDU could be added. because this
corner case wasn't handled correctly an invalid PDU was transmitted.

the solution is to revert the addition of the new SDU.
2020-06-26 17:58:36 +02:00
Andre Puschmann fc3cd24177 rlc_um: fix counting of lost PDUs
* change try_push() return value to indicate whether the addition
  of the SDU to the tx queue was successful or not
* count lost PDUs
2020-06-26 17:58:36 +02:00
Andre Puschmann 96726a03e0 rlc_stress_test: fix PCAP support
expose actual RLC configuration to PCAP object
2020-06-26 17:58:36 +02:00
Andre Puschmann 1c7bfde404 rlc_stress_test: fix compilation with PCAP enabled 2020-06-26 17:58:36 +02:00
Ismael Gomez 493b7ea2da Remove SNR threshold based link failure detection 2020-06-25 22:57:31 +02:00
Ismael Gomez 874e614970 Increase PUCCH detection threshold to avoid false alarms 2020-06-25 22:57:31 +02:00
Francisco Paisana 2de702f50e disable carrier aggregation when ue release is below 10 or category is below 5 2020-06-25 21:13:11 +01:00
Francisco Paisana 9855749e9a remove comments 2020-06-24 23:28:53 +01:00
Francisco Paisana eee195c828 remote commented lines and added comments 2020-06-24 23:28:53 +01:00
Francisco Paisana 8ea059d578 fix pnf messages and shutdown 2020-06-24 23:28:53 +01:00
Francisco Paisana e555e50a90 fix pnf packing for MIB messages 2020-06-24 23:28:53 +01:00
Francisco Paisana e3e9bbcd62 fix PNF PDU size cutting 2020-06-24 23:28:53 +01:00