1320 Commits (master)

Author SHA1 Message Date
Alejandro Leal Conejos 547ebf11f7 Fixes coverity 372880 3 years ago
Codebot 2cda208936 Merge branch 'next' into agpl_next 3 years ago
Francisco 67a39fbb81 nr,sched: push BSRs into the scheduler when nr_phy_test is run with PUSCH enabled 3 years ago
Fabian Eckermann 32a1646536
nr,gnb,rrc: Derive RRC parameters from config.
* Derive RRC parameters from config.
* nr,gnb,rrc: hard code prach config index to 8 to avoid expiring RA proc window.
3 years ago
Xavier Arteaga 2f5a1ad2e3
SRSENB: MAC controller recover MAC bearer state after PDSCH KO burst (#3225)
* SRSENB: MAC controller recover MAC bearer state after PDSCH KO burst

* mac,lte: simplify scheduler phy config enable configuration

Co-authored-by: Francisco Paisana <francisco.paisana@softwareradiosystems.com>
3 years ago
Francisco e4247517d0 nr,sched: update sched_nr_test to support the new DL sched no-copy api 3 years ago
Andre Puschmann cf4b6d0bea sched_nr_interface: make PHY results a reference to avoid copying 3 years ago
Xavier Arteaga b54d4ad8e2 Avoid copying gNb common configuration in slot basis 3 years ago
Francisco 0663594aa1 nr,gnb,sched: add extra checks to sched to ensure the max nof grants is not exceeded 3 years ago
Carlo Galiotto 0c35045543 rrc,nr: remove default value from input arg + ...
change input arg name

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto ebaab9b1d0 rrc,nr: add private fnc to overload public method...
... and propagate input to calling function

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 4f6905363f rrc,nr: add MSG3 activity timer to rrc_nr
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Francisco 327687cbc2 nr,sched: auto clear HARQs that exceeded maxretx, after the feedback has been processed 3 years ago
Pedro Alvarez fbcffb84bd Check if RLC is suspended before transmiting PDCP SDU.
This was done to avoid integrity issues, when the UE's RRC erroneously sent
measurement reports while the re-establishment was already in progress.

As errously sending PDCP PDUs on DRBs can cause issues as well, this was
disabled too.
3 years ago
Carlo Galiotto e3267c9dfd gtpu: remove unused local variable
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 284207dad6 WIP: fixing collision in the the users_map
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Ismael Gomez 09cec9ca5c srsenb,phy: do not get reference to ul_grants, do a copy instead to protect concurrent access 3 years ago
Ismael Gomez c479a1e51e srsenb: Handle error in decode_pusch to avoid logging PUSCH with 0 rnti 3 years ago
Francisco 3295449619 nr,gnb,sched: fix crash in debug mode due to incorrect is_lcid_valid check 3 years ago
Codebot 9d7836817c Merge branch 'next' into agpl_next
# Conflicts:
#	lib/include/srsran/common/signal_handler.h
3 years ago
Francisco f0a48d47b3 enb,sched: log lcid configurations in scheduler in a single log line 3 years ago
Francisco f2818d0504 enb,sched: improve sched ue buffer manager to show rnti in logs 3 years ago
Francisco 4a58c10f30 lte,enb,rlc: compute and forward to scheduler the number of bytes pending for retx and status pdu in RLC AM bearer 3 years ago
faluco b8171e493e Fix crash in mac_nr when accesing the ue_db and not checking if the rnti is valid, while there fix a potential data race.
Fix data race inside sched_nr when modifying per ue metrics.
3 years ago
Carlo Galiotto a4932564d7 stdout: remove extra value from eNB stats + ...
address PR review
- change "TO DO" into "TODO"
- remove forgotten "printf" for debug

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 4e3564a8a2 mac,stdout: add PUSCH and PUCCH SINR to stdout
This commit implements the PUCCH and PUSCH metrics in the MAC,
to be displayed in the eNB console.

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Fabian Eckermann 2aa59a55d5 Read max turbo decoder iterations from conf. 3 years ago
Xavier Arteaga 9ecea014bd Added PUSCH DMRS minimum SNR 3 years ago
Francisco b3e974db9b nr,gnb,rrc: avoid warning when eutra requests sgnb release and destroys the UE before acknowledgement 3 years ago
Francisco 0b51848dda nr,gnb,rrc: use multiqueue to forward x2 tasks to NR stack 3 years ago
Andre Puschmann 146f12f0c0 enb,mac_nr: fix MAC PDU packing by tyring to pack multiple SDUs when possible
the patch adds support to fully use the available space in a MAC PDU by adding
multiple SDUs.
3 years ago
Francisco 51806982f7 nr,gnb,rrc: correctly release NR RNTI user after Reestablishment 3 years ago
Francisco d5acf73c46 nr,gnb,sched: fix logging of tbs. check if sched args are supported at sched startup. change the tti logging to be equal to tti_rx 3 years ago
Francisco abe2c8cba4 nr,gnb,rrc: Allow NR EN-DC to be re-activated in case of Reestablishment with cause other than ReconfFailure 3 years ago
Francisco 5b2afb1739 rrc,nr,gnb: ensure same PDCCH config is sent to PHY, scheduler cell config, and sched ue cfg 3 years ago
Francisco 7a16be9692 rrc,nr: ensure coresets and search spaces are passed to scheduler cell_cfg and ue_cfg 3 years ago
Fabian Eckermann 9cbd2727f5 Disable measGapConfig in first reconfig. Remove all measurement reports for nr in the 2nd reconfig. 3 years ago
Carlo Galiotto dc3dad6e20 rrc,nr: implements PR review comments
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto fb75cbaadc rrc: disable MAC bearers when RNTI gets updated
When the RRC handles the C-RNTI CE to update the RNTI, all the bearers
associated with the new RNTI (that will no longer be used) need to be disabled.
This commit implements this.

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Francisco 9df6c6b936 sched,nr: ensure the ue_cfg_t passed to the scheduler in NR FDD mode has the correct harq delay 3 years ago
Andre Puschmann 255ddb1329 enb,gnb: add basic support for sgnb release procedure
the procedure is currently started when the EUTRA UE object
is deleted (after RRC release) in order to clean-up the
ENDC resources on the gNB.
3 years ago
Francisco 64ffd81cf9 nr,sched: fix recomputation of ue_bwp_cfg when sched receives new ue_cfg objects 3 years ago
faluco aa0c936f50 Fix race condition when destroying the gnb stack class.
The gnb stack class could be destroyed concurrently while still running its task scheduler thread.
3 years ago
Alejandro Leal Conejos 1a64c6adad Enum fixes so clang 12 can build the repo 3 years ago
Francisco 964dce575b nr,sched: fix nof_harqs in NR scheduler to 8 3 years ago
Francisco acd5b8c46a nr,gnb,rrc: correctly configure TDD for UE and scheduler 3 years ago
Francisco 25f34502a7 nr,gnb,rrc: restore the GTPU TEIDs back from NR RNTI to LTE RNTI when RRC reconfiguration fails 3 years ago
Francisco 25eb44914e nr,sched: fix sched_args_t default values 3 years ago
Francisco 04d48127bb nr,sched: enable NR fixed mcs configuration via enb.conf 3 years ago
Carlo Galiotto a57ccdabf5 mac: move and check boolean from funcion to caller
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 1a52cdcdaa mac: remove unused rwlock and unused cqi counter
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto f53e01cfa3 mac: apply changes by PR reviewers
- reinstate write_lock on ue metrics
- change "rwlock" variable name in mac_nr.h

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto dc3e3a89f8 mac: update CQI in MAC with CSI reports from PHY
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Francisco c08bb6023c nr,sched,refactor: clear of unused typedefs and renaming of some types 3 years ago
Francisco 510e9f47a7 sched,nr: simplify metrics extraction from MAC
Allow some level of mutex contention between metrics and worker threads in accessing
internal scheduler variables.
3 years ago
Francisco 1b595b6eff nr,gnb: if no nr cell is initiated, do not enable endc in the LTE RRC 3 years ago
Francisco 877b995a4d gnb,nr: add metrics for ack'd TBS in the gNB. 3 years ago
Codebot 1528f69d5b Adding AGPL copyright to new files 3 years ago
Codebot cf4b0f1739 Merge branch 'next' into agpl_next 3 years ago
Francisco 43b12b9ffb rrc,nr: transfer SSB config to both UE and NR scheduler 3 years ago
Andre Puschmann c8d6f54dab enb,rrc: add radio link monitoring config 3 years ago
Francisco 7d4a5238f6 sched,nr: force R<0.9 by reducing mcs 3 years ago
Francisco 47e5e85449 refactor: clean unnecessary includes of the asn1/rrc_nr.h 3 years ago
Bedran Karakoc 1e1e1420b1 Return AUTS in authentication failure for case AUTH_SYNCH_FAILURE 3 years ago
Bedran Karakoc ca08b18745 Pass pdu_session_id instead of lcid for mapping in GTPU 3 years ago
Bedran Karakoc 850606f20b Added deregistration (UE terminating) 3 years ago
Andre Puschmann 8d2c394326 enb,rrc: fix SSB absolute freq value in EUTRA measConfig
we've been using the ARFCN of the NR carrier instead of
the absolute freq SSB.

The patch fixes this and renames the variable to make it clearer.
3 years ago
faluco 83b9777220 Fix data races in cell_list array members inside enb::phy_common. 3 years ago
Francisco Paisana efa2026a70 sched,nr: erase uneeded parameters from sched_nr_interface bwp_cft_t 3 years ago
Francisco Paisana 51f1c0d6ef rrc,nr: refactor csi report asn1 configuration 3 years ago
Francisco Paisana b7f40b2baf rrc,nr: reenable CSI reporting in gNB 3 years ago
faluco 9058ee9a5b Move gNB metrics processing to the stack thread avoiding concurrency issues in MAC and RRC. 3 years ago
faluco a703279975 Fix a data race when passing the nr_workers to the txrx worker.
There was an unprotected access of the txrx reading this variable while being set from a different thread.
Fix it by starting the txrx thread after all variables are ready.
3 years ago
Andre Puschmann 06fbb58d70 gnb,mac: add dedicated arguments struct for MAC-NR
as the PCAP object is now only visible inside MAC-NR we can't
share the PCAP file between EUTRA/NR (like we do in the UE).

This patch removes the hard-coded filename for the NR PCAP file.
3 years ago
Xavier Arteaga b6ea78dfd3
Fix gNb PHY-Stack UL-DL time paradox (#3365)
* Fix gNb PHY-Stack UL-DL time paradox

* Fix clang compilation
3 years ago
Francisco Paisana b58915d7ed rrc,nr: make gnb cell CSI NZP configuration consistent with UE NSA configuration. 3 years ago
Ismael Gomez 410cec7557 NR: assume all zero LCG is SBSR with 0 is received 3 years ago
Francisco Paisana 23bf542ae7 stack,nr: isolate calls between LTE and NR stacks via the task multiqueue 3 years ago
Andre Puschmann 8bb06ff2c0 Added SSB in gNb PHY 3 years ago
Xavier Arteaga ca19b466bb Fix paging float to int conversion 3 years ago
Francisco Paisana 55ea2cbcee sched,nr: fix harq delay derivation 3 years ago
Francisco Paisana 8ceb573ea7 mac,nr: avoid concurrency in update of pdsch/pusch slot 3 years ago
Carlo Galiotto f177a03605 sched,nr: add const to function input parameter
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 9887c17c17 sched,nr: move ssb_sched test to different file...
and also:
- correct half-frame bit in MIB package
- rename slot_index variable in ssb_sched function

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto d18af603aa sched,nr: address comments in PR (code formatting)
Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Carlo Galiotto 9d864bbe55 sched,nr: add function that schedule SSB
Notes:
- NOT YET TESTED
- Requires rebase on commit with PHY changes to work

Signed-off-by: Carlo Galiotto <carlo@srs.io>
3 years ago
Codebot 01369f65c3 Adding AGPL copyright to new files 3 years ago
Codebot 8c3332f894 Merge branch 'next' into agpl_next
# Conflicts:
#	srsenb/hdr/stack/upper/pdcp_nr.h
#	srsenb/hdr/stack/upper/rlc_nr.h
#	srsenb/src/stack/upper/pdcp_nr.cc
#	srsenb/src/stack/upper/rlc_nr.cc
3 years ago
Andre Puschmann f8d55a6fd3 Refactor rrc nr. 3 years ago
yagoda 82bda02b36 adding nr metrics 3 years ago
Andre Puschmann 782aefa553 enb,rrc: derive ENDC configuration from cell config
* move ENDC config struct to main RRC config (same for all UEs)
* remove hard-coded measurement config for NR carrier
* now both TDD and FDD cells are correctly handled
3 years ago
Fabian Eckermann 992d1bb02a Configure PHY from RRC. 3 years ago
Francisco Paisana 28e25b12b4 sched,nr: add error checking and logging for invalid PIDs 3 years ago
Francisco Paisana d927b779dc sched,nr: implement methods to fill nzp csi-rs in scheduler 3 years ago
faluco a8f58f503c - Fix arm compiler warning. GCC treats chars as unsigned in this arch.
- Fix race condition in json metrics.
3 years ago
Andre Puschmann 315057d11c enb: signal user activity to EUTRA RRC when doing NR DL traffic
to avoid releasing the UE when only NR DL traffic is done.
similar to the EUTRA solution.
3 years ago
Francisco Paisana cbb709d4e3 sched,nr: function to log UEs buffer status before scheduling decision, fix const_iterator of circular_map 3 years ago
Ismael Gomez 1c77998df5 Stop PDCP for data bearers before initiating HO 3 years ago
faluco fa351cd285 Rename functions that contain the unsafe word to nolock.
The term "unsafe" does not clearly state that the function is not locking the shared date and it sounds "dangerous", so use a more explicit term.
3 years ago
Codebot 2b80b88a98 Adding AGPL copyright to new files 3 years ago
Codebot ecd0580b9e Merge branch 'next' into agpl_next 3 years ago
Francisco Paisana a952f0f62d sched,nr: expose sched nr UE bearer configuration in sched interface 3 years ago
Francisco Paisana bdf18856d1 sched,nr: fix handling of DL BSR in NR scheduler and computation of UCI 3 years ago
Francisco Paisana 70fe48a5ab sched,nr: change NR sched configuration api 3 years ago
Francisco Paisana a035ad144b mac,nr: create sched_nr object only at mac::init() 3 years ago
Andre Puschmann 5966760458 rrc_endc: start SgNB addition from start if B1 events are disabled 3 years ago
Andre Puschmann af73c57780 rrc_endc: prepare ENDC paramter
exposes some of the hard-coded params as struct.
filling/parsing from file still needs to be added.
3 years ago
Francisco Paisana 12d63468e3 sched,lte: separated adaptive mcs learning rate argument into two arguments, one for DL and the other for UL 3 years ago
Andre Puschmann 7f897d83e2 gnb,mac_nr: push DL buffer state to scheduler 3 years ago
Andre Puschmann 426e876047 enb,nr: fix GTPU handler to forward UL PDUs 3 years ago
yagoda bc4388a78c -adding temp crnti removal for NR carrier attach 3 years ago
Ismael Gomez af9822bede srsenb: add error handling on RRC message generation 3 years ago
Francisco Paisana 3351e97aa2 nr,mac: use SR to send an UL grant after Msg3 and complete ContextResolution of UE NSA NR 3 years ago
Francisco Paisana e1a4e63ec8 sched,nr: use MAC-NR as prefix for NR scheduler 3 years ago
Francisco Paisana 00cc8fb8d8 sched,nr: ensure PUCCH is generated for SR even if the UE doesn't have any pending ACK 3 years ago
Ismael Gomez 3bbf173149 Allocate PUCCH resources on ConnectionRequest and send ConnectionReject if not available 3 years ago
Andre Puschmann faf9d2dbd8 gnb,rrc: replace hard-coded PCI with actual value in rrc_cfg 3 years ago
Andre Puschmann 802b22ac91 enb,nsa: refactor NR RRC/cell config parsing
this allows to access all cell-related params from within RRC
3 years ago
faluco feec3c5905 Fix a data race during enb initialization.
The stack unique pointer in the enb class is written while the phy workers are calling enb::tti_clock() where it is read.
Avoid the read access until the whole class has been properly initialized.
3 years ago
David Rupprecht 611255aa5f Added GTPU bind address as output parameter 3 years ago
Bedran Karakoc 43915550cc NGAP GTP Bearer Establishment 3 years ago
David Rupprecht 3712983308 Added PDU Session est request 3 years ago
David Rupprecht 0385980347 Fixed minor NGAP issues 3 years ago
Andre Puschmann b134781d36 enb: remove redundant RLC/PDPC classes for NR
the RLC/PDCP entities for NR are included in the RLC/PDCP wrapper classes
and don't require their own
3 years ago
Fabian Eckermann 651a76000e Add function to pack secondary cell group config for FDD. 3 years ago
Xavier Arteaga 0324806d6c Packed NR TDD config in duplex configuration and created test case for FDD 3 years ago
Ismael Gomez 3eaf5c50cb Make PUCCH HARQ region a configurable parameter. Skip grants when ACK falls outside region 3 years ago
Codebot b87b760326 Merge branch 'next' into agpl_next 3 years ago
Andre Puschmann 3fd47d2af4 enb: refactor L2/L3 and (re)move all NR components to gNB stack
* decouple EUTRA and NR stack classes
* implement dummy X2 interface with control and data plane methods
* implement eNB time source interface that PHY calls
3 years ago
Andre Puschmann 1e9a4e3fba enb: remove stack type variable 3 years ago
Andre Puschmann 8d49e58078 enb: prepare split of EUTRA and NR stack classes
this allows for a slimmer base station if only EUTRA or NR cells are used.
also it seperates entities in a cleaner way
3 years ago
faluco 8a2231251a Fix data race in enb::mac::ue class. 3 years ago
faluco 457dcf4de4 Fix data race in enb::ta class. 3 years ago
Andre Puschmann ed92f2bd34 enb,mac_nr: remove EUTRA cell param for MAC-NR cell config calls
* the old srsran_cell_cfg_t is only carried for SIB params
* the SIB scheduling, etc needs to be ported and integrated into NR data structures
* disbable SIB test for the moment
3 years ago
Andre Puschmann e2b1bbe2dc enb,metrics: add helper method to print MAC metrics
preparation to be used to print MAC metrics for EUTRA and NR cells
3 years ago
Andre Puschmann 6a46931144 mac_nr,enb: move header into nr subfolder 3 years ago
Andre Puschmann 4a5d2a8659 mac_nr: add basic get_metrics() implementation 3 years ago
Andre Puschmann dbcf5c9503 sched_nr: add ue_exists() helper 3 years ago
Andre Puschmann 9a49d47968 sched_nr_interface: disable auto-refill of NR scheduler 3 years ago
Codebot 958542dc2b Merge branch 'next' into agpl_next 3 years ago
Andre Puschmann dbbc621905 phy_common: fix PRB lookup for NR cells 3 years ago
Andre Puschmann c1892eb2ec enb,nsa: refactor of SgNB addition interface
* update of FSM
* better integration of parameter for X2 calls
3 years ago
Andre Puschmann f7e943b6b6 enb,mac_nr: add handling of SBSR MAC CE 3 years ago
faluco 5798f09252 Re-format the enb stdout metrics and port the code to use the fmt library. 3 years ago
faluco fdb4b91e98 Adapt the enb metrics to allow adding a PCI field for each CC.
Include the PCI field in the enb JSON metrics.
3 years ago
faluco d168536bc4 Add a new program option to control how ASN1 messages get printed into the enb JSON report file. 3 years ago
faluco df6ae7b0e0 - Implement new enb events:
* ho_command
* connection_resume
* rlf_detected
- Rename rlf_report event to "rlf_report".
3 years ago
Ismael Gomez 00653bdd46 Fix PUCCH2 RRC scheduling 3 years ago
Andre Puschmann 88bb92dc0d mac_nr,sched: handle C-RNTI CE 3 years ago
Codebot 71098315ca Adding AGPL copyright to new files 3 years ago