710 Commits (fb04fdbe69d2e3303d3f467a55ceac3d4fcdfbdc)

Author SHA1 Message Date
Francisco 78d1b8083a fix GTPU tunneling. Avoid forwarding packets to PDCP while the PDCP bearer is not yet created 4 years ago
Andre Puschmann 8e13f04684 mac_pcap: refactor MAC PCAP and include NR RAT into same object
after adding the thread-safe PCAP writer functionality to the EUTRA
MAC object it became clear that we don't wont to replicate the
same for the NR object.

This patch therefore refactors the class that now supports both EUTRA and
NR rats. The old mac_nr_pcap.[h/cc] has been deleted. All test-cases
and usages now use the new object that needs to pass the RAT type in
the ctor.

this patch addresses the last open point of #2160
4 years ago
faluco b30845fae4 Remove unused variable in enb vnf_phy_nr. 4 years ago
faluco 79eca0980d - Ported fsm.h to srslog.
- Adapted and removed old loggers in tests and code that used fsm.h
4 years ago
faluco d37a07a47f Replaced loggers in buffer_pool.h 4 years ago
faluco 96c07a69c0 Report the RLF event to the JSON event file in the enb. 4 years ago
Francisco ec14a6e50b verify correctness of input to gtpu::write_pdu 4 years ago
Francisco 411946c752 Improvements on GTPU message logging
- Avoid multiple lines per each SDU Rx or Tx
- log info relative to source and destination of each SDU
- log info relative to whether the Rx SDU has been forwarded into a tunnel
- log info relative to whether the Rx SDUs are being buffered.
4 years ago
Xavier Arteaga 2421f2cd99 Multiple PHY fixes and NR-PHY configuration refactor 4 years ago
Francisco 2bde28252c send UE capability indication through S1AP 4 years ago
Francisco d64ce7df77 implementation of S1 E-RAB Release Indication and Error Indication messages 4 years ago
faluco ac62e3c398 Fix the priority of logging levels in places where we before logging we check if a certain log level is enabled. 4 years ago
herlesupreeth 47fff7226a Send NAS PDU in E-RAB Release Command and issue RRCConnectionReconfiguration to UE
This commit addresses the following points

- If a NAS-PDU IE is contained in the E-RAB RELEASE COMMAND message, the eNB shall pass it to the UE.
- Issue RRCConnectionReconfiguration for the DRB to be removed
- Cleaning of DRB in RLC and GTP-U
- Fix for Malformed E-RAB Setup Response upon reaching max. DRBs
4 years ago
Andre Puschmann da9e3363f1 mac_pdu_nr: rename MAC PDU class for NR to adhere naming conventions
* mainly to have _nr as trailing name for filename and class
* also add "sch" to class and filename (RAR PDU will have extra class)
4 years ago
Francisco 2befbd1825 setup of forwarding tunnels during enb s1 handover 4 years ago
Francisco 56ec2c286e add gtpu test for tunneling 4 years ago
Francisco 13649e4e19 Implement new GTPU functionality:
- multiple tunnels per E-RAB
- data forwarding between connected GTPU tunnels
- forwarding GTPU End Marker between connected tunnels
- TeNB GTPU handles in-sequence delivery when multiple tunnels for the same ERAB exist.
4 years ago
faluco 711438f756
Port enb specific classes to use srslog (#2155)
* - Started porting the enb PHY layer to use srslog loggers.
- Updated srslog to manage the none level.

* Finished porting enb phy layer including the NR part.

* Ported MAC, GTPU, PDCP, RLC and S1AP enb classes to use srslog.

* Use new stack logger.

* Ported the enb RRC clases to use srslog.

* Remove unused log macros.

* Replace loggers in sched, sched_carrier, sched_helpers.

* Replaced loggers in sched grid.

* Replaced loggers in sched harq.

* Replaced loggers in sched ue.

* Replaced loggers in sched ue ctrl.

* Replace loggers in sched ue ctrl TPC.

* Replaced loggers in sched subclasses.

* Replaced loggers in rrc_meascfg_test

* Configure loggers in rrc_mobility_test.

* Fix compilation errors left out after the rebase.

* - Implement a custom log sink that will serve as a test spy to intercept and count the number of error and warning log entries.
- Adapt the erab_test_setup and rrc_mobility tests to use this new class and make them pass again.

* - Remove trailing new lines introduced in the rebase.
- Ported the sched_ue_cell class to srslog.

* Remove unused log member.

* Ported mac tests to srslog.

* - Removed remaining trailing newlines from log entries.

* Fix compiler errors detected in CI.

* Fix another static variable without definition passed to log lines.

* Fixed a bug in srslog::flush that would never end when the backend queue is full.

* Fetch the RRC logger instead of injecting it in the constructor.
4 years ago
yagoda 1420c23863 adding RAR buffers for multiple carriers, previously RARs into different carriers in the same TTI would overwrite each other 4 years ago
Xavier Arteaga 2baccc8b13 Set NR-PDSCH default table to 256QAM 4 years ago
Francisco 26086252ba fix resetting of harqs in the scheduler during intra-enb handover 4 years ago
Ismael Gomez fed4e0ad82
Protect access to ul buffers (#2227)
* Protect access to ul buffers

* Fix interval calculation when removing old buffers
4 years ago
Francisco a24091edf8 fix handover regression. The new pcell was not being correctly reactivated 4 years ago
Francisco 4ed87babff extend sched_ue_cell interface 4 years ago
Francisco 3d7a83cb6e delete cc_sched_ue class 4 years ago
Francisco Paisana c1ff03bd1a moved uci feedback and state variables from cc_sched_ue to sched_ue_cell class 4 years ago
Francisco Paisana dadee757a1 moved harq entity and tpc to sched_ue_cell 4 years ago
Francisco Paisana 3892194d98 sched refactor, use enb_cc_idx rather than ue_cc_idx primarily to avoid uneeded conversions 4 years ago
Ismael Gomez 47dbd6ed70
Merge pull request #2214 from softwareradiosystems/pr_mac_buffers
Limit the number of UL buffers in MAC and deallocate old ones
4 years ago
Ismael Gomez 44e411be2b Track UL buffers per TTI instead of per PID and remove old ones periodically 4 years ago
Ismael Gomez a6423442c2
Refactor NR RA files and fix header includes all over library (#2162)
* Refactor NR resource allocation classes. Use DCI instead of grant for dummy PDSCH UE/eNB test

* Minor refactors in NR workers and ue_dl

* Fix include issues

* fix compilation issues
4 years ago
Ismael Gomez d5f0634975
Add PUCCH SNR measurement (#2175)
* Add PUCCH SNR measurement

* Fix PUCCH SNR estimation

* Reverted PUCCH noise estimation

* use fpclassify instead of iszero

Co-authored-by: Xavier Arteaga <xavier@softwareradiosystems.com>
4 years ago
Ismael Gomez c1c5fa426c Fix issue with new way of managing ul buffers not working with CA 4 years ago
Ismael Gomez e413086576 Limit the number of UL buffers in MAC and deallocate old ones 4 years ago
Francisco Paisana 5391001c46 remove unused variable 4 years ago
Francisco Paisana d4242f2db7 precompute nof_re_table[sf][prb][slot][cfi] for faster nof_re computation and for more accurate lower bound nof_re computation 4 years ago
Francisco Paisana d0a17b0a40 created sched_ue_cell class that is indexed based on enb_cc_idx 4 years ago
Francisco Paisana 8b306c81e2 refactor tbs/mcs computation in sched 4 years ago
Francisco Paisana 32c47d4fac change sched warning when it fails to fit srb0 data in grant to info 4 years ago
Francisco Paisana 1dd211c91c fix log initialization in sched_helpers.cc 4 years ago
Francisco Paisana afef5188a6 move sched_harq to subfolder 4 years ago
Francisco Paisana 233e604cfe cleanup sched_ue, moving some unrelated functions to sched_helpers 4 years ago
Francisco Paisana 9c7c190074 when the rrc fails to allocate the ue cell resources, it should erase the ue from all stack layers 4 years ago
Francisco Paisana 0d9ff3ecc7 fixed RBG<->PRB conversion. Changed PHICH logging to be single line 4 years ago
Francisco Paisana 0761a8f08b Add RLF-Report handling functions to srsENB 4 years ago
Francisco Paisana 434bdfca68 decoupled srsenb rrc ue mac controller from the rrc::ue class 4 years ago
Francisco Paisana f8b7351e1b implementation of object memory pool via class-specific operator new/delete 4 years ago
Francisco Paisana 8912a8ce6c added extra comments to memory pool code. generalized object pool to mutexed and non-mutexed cases 4 years ago
Francisco Paisana a73cbcdc9d added mem_pool for growing object pools. Applied the mem pool to the rrc::ue creation 4 years ago
Francisco Paisana bc8e65c82f bug fix in the PF scheduler. The correct history was not being stored for newtxs 4 years ago
Andre Puschmann 02b0f251aa prach_worker: move variable to function body
the variable was only used inside the run_tti() function
and isn't needed elsewhere. refactor therefore.
4 years ago
Francisco Paisana 02d4dde1f5 issue 2170 fix: add extra check that UL harq is empty before allocating it 4 years ago
Francisco Paisana ea8ad153c4 add configurable fairness parameter to pf scheduler 4 years ago
Francisco Paisana 2abe486e18 separate control loops for PUCCH and PUSCH TPC 4 years ago
Andre Puschmann 732a108982 mac: convert rar_pdu_msg[] from vector into array and protect access
attempt to address ASAN detected issue:

RACH:  tti=821, cc=3, preamble=11, offset=0, temp_crnti=0x47
ASAN:DEADLYSIGNAL
=================================================================
m==25385==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000024 (pc 0x564b19a26c93 bp 0x7fa0e5f1a8c0 sp 0x7fa0e5f1a798 T8)
==25385==The signal is caused by a WRITE memory access.
==25385==Hint: address points to the zero page.

------DL--------------------------------UL------------------------------------
rnti cqi  ri mcs brate   ok  nok  (%)  snr  phr mcs brate   ok  nok  (%)   bsr
  46 0.10   0 0.0     0    0    0   0%    0  0.0   0     0    0    0   0%   0.0
  47 0.10   0 0.0     0    0    0   0%    0  0.0   0     0    0    0   0%   0.0
    #0 0x564b19a26c92 in srslte::rar_subh::set_ta_cmd(unsigned int) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/lib/src/mac/pdu.cc:1136
    #1 0x564b19577f7e in srsenb::mac::assemble_rar(srsenb::sched_interface::dl_sched_rar_grant_t*, unsigned int, int, unsigned int, unsigned int) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/stack/mac/mac.cc:837
    #2 0x564b19591765 in srsenb::mac::get_dl_sched(unsigned int, std::vector<srsenb::mac_interface_phy_lte::dl_sched_t, std::allocator<srsenb::mac_interface_phy_lte::dl_sched_t> >&) /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/stack/mac/mac.cc:653
    #3 0x564b19497ee2 in srsenb::lte::sf_worker::work_imp() /mnt/data/jenkins/workspace/srslte_ogt_manual_zmq/srsLTE/srsenb/src/phy/lte/sf_worker.cc:208
    #4 0x564b199f8db4 in
4 years ago
Xavier Arteaga b3200d9ef5 Renaming common UL/DL DMRS related types and initial NR PUSCH implementation 4 years ago
Ismael Gomez 6348ddefd5 Add option to run prach_worker in the caller thread instead of by a background worker. This is useful when running simulations with ZMQ, to avoid the prach worker to take too much time and miss the RAR deadline 4 years ago
Francisco Paisana 9de318c7e6 avoid allocating DL harqs when respective acks are still pending, when there is a reordering of ttis in the phy 4 years ago
faluco 92b11c1adb Backport misc changes from the fapi repo. 4 years ago
Pedro Alvarez 0c20b7a455 Added support for S1AP modify bearer request support. This includes:
- Handle received E-RAB S1AP at s1ap.cc.
 - Added methods to rrc.cc, rrc_ue.cc and rrc_bearer_cfg.cc to handle erab modify request.
 - Made RLC add_bearer() function capable of re-creating the RLC entity.
 - Send RRC reconfiguration to the UE and reply to the EPC with S1AP
   modify bearer response.

This commit also adds support to srsEPC to send S1AP modify bearer request for
testing purposes.
4 years ago
Francisco Paisana 099dad8cb1 disable PHR handling in the UL sched by default 4 years ago
Ismael Gomez f9a02299f9 Use MAC PDU pointer instead of tti_rx and rnti as a key to associate buffers. Decouple crc_info() and push_pdu() functions. This allows for different timing architectures in the PHY 4 years ago
Ismael Gomez 0498439d41
Backport some changes from FAPI branch (#2124)
* Reorder DCI FORMAT enum

* Fix endianness issue

* Fix return codes in phy_ue_db

* Log members should be destructed after the layers.

* Add JSON metrics and Events. Add Alarm log channel. Simplify MAC metrics struct.

* Restore metrics_stdout change
4 years ago
Francisco Paisana 1304746bce use of fmt lib in asn1 utils 4 years ago
Francisco Paisana 82eb31f70f add rlc metrics to enb 4 years ago
faluco 343587b32d Update NR classes after metrics interface changes. 4 years ago
faluco f20b75a05f Re-structure enb metrics a bit. Create a generic mac metric struct and per ue mac metrics struct. 4 years ago
faluco 5529943172 Add a per sector rach preable counter for the metrics. 4 years ago
Francisco 43e0a3209d fill enb rrc metrics with drb info 4 years ago
faluco dcd1157d39 - Prototype the extension of enb metrics. 4 years ago
Ismael Gomez 5d85307a98 Fix 256QAM reconfiguration 4 years ago
Ismael Gomez a9673e3c53 Use number of configured cells before reconfiguration for DCI calculation 4 years ago
Ismael Gomez e654062a7a Do not stash all PHY configuration in eNB during reconfiguration. Stash only number of CC used by DCI 4 years ago
Pedro Alvarez 7eebd71627 Added S1AP E-RAB release command/response handling to srsENB.
Added the ability to srsEPC to send the E-RAB release command.
4 years ago
Francisco cba0cc457f sched rand test refactor: creation of abstract sched simulator class for testing 4 years ago
David Rupprecht 848496bb0f Moved get_earfcn to srslte get_carrier_freq func 4 years ago
Francisco b4861bc59a move sched params and sched helper methods to sched_helpers.h/cc files. Removed place in the scheduler where the mcs is increased forcefully to avoid segmentation 4 years ago
Francisco 99f94d9a1a Bug fixes of srseNB scheduler TPC
- fix encoding of TPC command
- use of exponential average with irregular sampling for the ULSNR average estimate.
  Turns out using a time-windowed average for the SNR was a bad idea.
  If the UL grants are very sporadic, the SNR time window will never have samples
  when a TPC is encoded
- update of TPC sched test
- other fixes in accumulators lib
4 years ago
Francisco 22229adf08 fix: normal phr is only sent for PCell 4 years ago
Francisco 69748e9313 fix compilation issue regarding definition of size_t in header and declaration of static member null_value in sliding average class 4 years ago
Francisco d42dc50c44 Write TPC sched unit test and fix sched logical channel test 4 years ago
Francisco 479602ed1d add option to specify target ul sinr for UL power control to the enb rr.conf parser 4 years ago
Francisco 5865df39d1 created class that implements the scheduler transmit power control and PHR handling 4 years ago
Xavier Arteaga f9643843a0 SRSENB/UE Fixed NR workers 4 years ago
Xavier Arteaga b501f2eeaf SRSENB/UE: Added NR workers 4 years ago
Xavier Arteaga a908fb6c5b Fix NR srsue/srsenb. Initial PHY NR in SRSENB. 4 years ago
Xavier Arteaga 85afdf8ce3 SRSENB: moved phy workers to lte worker pool 4 years ago
Francisco 86ab1864f7 The struct tti_point is now used ubiquitously in the scheduler 4 years ago
Pedro Alvarez 235f373af7 Started to add ability to send error indication when G-PDU from invalid TEID is received. 4 years ago
Francisco 8fb3ea6922 Added the ability to choose scheduling policy from enb.conf
- The two options provided at the moment are time-domain RR and PF
4 years ago
Francisco b71e8075f4 Refactoring of scheduling algorithms
- Use single interface for both DL and UL
- Wrote helper functions for tasks that are common to different algorithms
- created subfolder for all scheduling algorithms
4 years ago
Francisco d7fae0b7a3 Implementation of time-domain PF scheduler
- PF scheduling becomes the new default
4 years ago
Andre Puschmann 07d2bc4fe8 change license header to agnostic version with hint to root LICENSE file 4 years ago
Francisco f07e52129c increase mcs ul upper bound to 24 when ue is cat4 and enb supports 64qam. Simplified max_mcs computation 4 years ago
Francisco 3d80ff4831 fix activation of PDCCH for adaptive retxs. 4 years ago
Francisco fc81a5c6ba harq ack state can now only be NACK or ACK. The ul_harq pending phich flag is now reset after phich scheduling. Thus, the existence of a crc_info(...) signal from the PHY is not required. 4 years ago
Francisco 7a74bf28d1 forward declare s1ap types in enb interfaces 4 years ago
Francisco 95cc6238a5 compilation time reduction - avoid including enb_stack_lte.h in main.cc and include enb_stack_base instead 4 years ago
Francisco 66712023bb remove unneeded includes of full rrc asn1 lib 4 years ago
Francisco 3067e81e67 fix check of pending UL bytes 4 years ago