Commit Graph

2078 Commits

Author SHA1 Message Date
Matan Perelman 7ee52dc676 srsUE: Add option to filter N_id_2 / PSS to configuration 2021-04-23 20:31:36 +02:00
David Rupprecht 102a943171 Fixed naming srsLTE to srsRAN 2021-04-23 14:25:02 +02:00
David Rupprecht fd451e8be3 Configure Short PDCP NR SN support 2021-04-23 12:49:53 +02:00
Andre Puschmann 7817f12f1f phy_common: reduce log level to info when UL grant is tried to activate twice
in accordance with discussion in #2717 we reduce the log level to info
to avoid failing tests due to that event
2021-04-23 10:28:10 +02:00
Xavier Arteaga ab6a5ef17a Added NR DCI conversion to string for formats 1_0 and 1_1 2021-04-22 14:16:46 +02:00
Francisco ff3fc0826b asn1 fixes and improvements
- use const char* instead of std::string in enumerated<>::to_string() to avoid mallocs.
- Remove the use of "typedef", and use "using" keyword instead.
- Fix rrc_nr::setup_release_c<>::to_string() broken linkage.
2021-04-22 10:21:08 +01:00
Francisco 23203b73ae fix - avoid recompiling srsue rrc files twice 2021-04-21 16:22:59 +01:00
Andre Puschmann e3b77fd82a rrc_nr: set timeout for NR cell measurement to 250ms
the low timout of 10ms was:
1) causing too frequent measurement reports
2) causes a MO ping test to fail where the ICMP request
was sent on the LTE carrier but never got a reply because
the MCG addition was inbetween
2021-04-21 12:50:43 +02:00
Andre Puschmann 2c156f0007 proc_ra: add further state checks when getting harq_retx signalled
that makes sure to only restart contres timer if we are actually
in the contention resolution state.
2021-04-21 12:36:32 +02:00
Andre Puschmann 607ba7c262 mac_test: fix RAR test for Msg3 retx
with hi=1 the eNB signals a successul Msg3 reception.
To request a retx, which is the case in the MAC test,
it needs to signal a hi=0
2021-04-21 12:36:32 +02:00
Xavier Arteaga 7246ce0cea Fix MSG3 false retransmission
this fixes #2694 by considering hi=1 value and not treating
this as a Msg3 retx
2021-04-21 12:36:32 +02:00
Andre Puschmann c1e4385f50 worker_pool: fix wrong log level when setting worker config 2021-04-20 22:16:48 +02:00
Xavier Arteaga 407903e0d6 SRSUE: refactor carrier setting for accepting a dynamic carrier configuration 2021-04-20 21:50:10 +02:00
Xavier Arteaga 47523935f6 Minor NR RRC fixes 2021-04-20 21:50:10 +02:00
David Rupprecht d2aa25d451 Added option for simulated measurement 2021-04-20 21:47:37 +02:00
Xavier Arteaga 09272edf4b Update NR PHY TTI 2021-04-20 15:07:18 +02:00
Xavier Arteaga 715f8900a8 Selected NR RA procedure PRACH send timeout according to system frame number period from PRACH PHY tables 2021-04-20 15:07:18 +02:00
Andre Puschmann 51e73aa1fc mac_nr_test: add basic DL HARQ test and extend checks for metrics 2021-04-20 15:05:20 +02:00
Andre Puschmann 4b3538aaa8 {dl,ul}_harq: fix metrics calculation
rewrite  metrics calculation for NR HARQ and remove
unneeded operations.
2021-04-20 15:05:20 +02:00
Andre Puschmann b6f2c80f66 mac_common: add helper method to get total buffer state 2021-04-20 15:05:20 +02:00
David Rupprecht a064e85c54 rename common lte header 2021-04-19 22:23:59 +02:00
David Rupprecht 81ad72b0ff Refactor srb and drb handling 2021-04-19 22:23:59 +02:00
David Rupprecht 91ff8a2e6d Add rrc_nr to rlc init function 2021-04-19 22:23:59 +02:00
David Rupprecht 6b41ae7e8b Updated PDCP config struct for rat type 2021-04-19 22:23:59 +02:00
Andre Puschmann 5700b090ea worker_pool: set log level for PHY-NR logger and use for PRACH
log level for PHY-NR wasn't set so:
16:00:32.202953 [PHY-NR ] [I] [ 8024] Setting RAR Grant rnti=4602 dci=rar hop=0 f_alloc=0x32 t_alloc=0x1 mcs=4 tpc=3 csi=0
was always printed. Also use the logger for the PRACH
2021-04-19 22:09:08 +02:00
Andre Puschmann c8d3e133dc ue: bump default RRC release announced to 15 2021-04-19 22:08:03 +02:00
David Rupprecht 75cd5e65e5 Removed arfcn and freq, and nof_prbs from config file 2021-04-19 15:18:35 +02:00
David Rupprecht 6ed6da1f12 Refactor ue config for eutra and nr config section 2021-04-19 15:18:35 +02:00
Xavier Arteaga 77b6b60b82 Fix rach_cfg.nof_groupA_preambles 2021-04-19 15:17:04 +02:00
David Rupprecht db9dd85783 Parse carrier config in NR RRC reconfig 2021-04-19 12:13:37 +02:00
David Rupprecht f42d4dbc28 Refactored carrier config 2021-04-19 12:13:37 +02:00
Andre Puschmann 87f9b2babc mac_nr: turn off warning for non-implemented features
they cause RFCI to fail, features are known to be missing.
2021-04-19 10:46:09 +02:00
Andre Puschmann 73d6b33920 {ul,dl}_harq_nr: reword log entries if HARQ PID isn't found 2021-04-18 15:27:19 +02:00
Andre Puschmann edd150b29f fix PID not being set when reading pending UL grant
this should fix #2679
2021-04-18 15:12:22 +02:00
Andre Puschmann 0df218ab90 cc_worker: fix PDSCH log fmt::v7::format_error 2021-04-17 15:51:11 +02:00
Xavier Arteaga 53b38fccf9 Fix compile and other 2021-04-17 15:51:11 +02:00
Xavier Arteaga 8ffced7e88 NR PHY logging minor corrections 2021-04-17 15:51:11 +02:00
Xavier Arteaga abfc1da921 Multiple NR-PUSCH fixes 2021-04-17 15:51:11 +02:00
Xavier Arteaga 7e06e789d5 Fic NR UCI in the info string 2021-04-17 15:51:11 +02:00
Xavier Arteaga 01ce0718be NR-PUSCH RE mapping correction and NR-SCH detailed grant information 2021-04-17 15:51:11 +02:00
Xavier Arteaga e7096d705e Fix NR RRC config NZP-CSI-RS 2021-04-17 12:54:30 +02:00
David Rupprecht bfe2ad98ef Added parsing for NR DL HARQ cfg 2021-04-17 12:33:21 +02:00
Andre Puschmann b9ae064338 mac_nr: add DL HARQ
this commit adds a complete DL HARQ entity to the MAC of the UE.
It also refactors demux into an own class and adapts the PHY-MAC
interface to use the new MAC capabilities.
2021-04-16 15:32:09 +02:00
David Rupprecht 138230f4e4 Remove NR RRC log line 2021-04-16 09:02:29 +02:00
David Rupprecht fe8727050b Added new rrc_nr to phy flattening functions and fixes 2021-04-16 09:02:29 +02:00
Xavier Arteaga e4e3456d76 Refactored PDSCH/PUSCH decoder for LDPC early stopping 2021-04-15 20:42:41 +02:00
David Rupprecht 4c68c17bd3 Fixed log level of nr loggers to lte level and hex size 2021-04-15 12:12:20 +02:00
Andre Puschmann bf4d0121dd cc_worker,proc_ra: set RNTI type for UL grant contained in RAR
needed for HARQ to correctly pick up the Msg3 Tx
2021-04-14 13:40:31 +02:00
Andre Puschmann 3e1998b2aa proc_sr_nr: tiny cosmetic logging changes 2021-04-14 13:40:31 +02:00
Andre Puschmann ad320c273e proc_bsr_nr: cancel SR if UL grant is received 2021-04-14 13:40:31 +02:00
Andre Puschmann d99402d3b3 rrc_nr: enable SR procedure when pulling config from ASN1 struct 2021-04-14 13:40:31 +02:00
Andre Puschmann 44baea6666 mac_nr: add UL HARQ
this patch adds a basic UL HARQ entity for NR.

The patch also updates some interfaces between MAC/RA/HARQ,
i.e. get_temp_crnti().

It also adds a Msg3 unit test.
2021-04-14 13:40:31 +02:00
Andre Puschmann b7146c41b2 nr: add NDI for PUSCH grant to sch cfg struct 2021-04-14 13:40:31 +02:00
Xavier Arteaga af97538448 Remove NR from log lines 2021-04-14 08:16:44 +02:00
Xavier Arteaga 7823bfc28c Fix append NR to loggers for NR components 2021-04-14 08:16:44 +02:00
Xavier Arteaga b5e879db47 SRSUE: review metrics interfaces 2021-04-13 16:02:53 +02:00
Xavier Arteaga 044da18db9 SRSUE: Reviewed PHY metrics getter 2021-04-13 16:02:53 +02:00
Xavier Arteaga dac331ab38 Fix SR PUCCH resource flattening 2021-04-13 16:02:53 +02:00
Xavier Arteaga 2f453b43ba Initial NR PHY interface 2021-04-13 16:02:53 +02:00
David Rupprecht eeddbe69ce Fixes repeating proc RA due to SR trigger 2021-04-12 20:51:07 +02:00
David Rupprecht 5a3a2a6d6f Added functions for adding phr and tag config 2021-04-12 20:50:30 +02:00
Andre Puschmann 396040fd75 metrics_csv: fix CC numbering for NR carrier in CSV 2021-04-12 18:26:31 +02:00
Andre Puschmann c9da21c9bb mac_nr: add error handling when unpacking SCH MAC PDU
* only handle PDU if unpacking was successfull
* add TC unpacking with malformed PDU
2021-04-12 18:26:31 +02:00
Xavier Arteaga bc1b14efea Fix NR common PDSCH Resource allocation count 2021-04-12 17:05:53 +02:00
Xavier Arteaga f30f3e0239 Minor aesthetic log change 2021-04-12 17:05:53 +02:00
Xavier Arteaga 21fe502448 Fix NR PRACH resource determination 2021-04-12 17:05:53 +02:00
Francisco f7a8b8bf94 separate drb srb ids into separate enum types 2021-04-12 13:21:43 +01:00
Francisco 21718af3b6 avoid allocating std::string to get lcid radio bearer name. Refactored the lte radio bearer enum type 2021-04-12 13:21:43 +01:00
David Rupprecht 5e02dbc536 Remove measurement id from trigger state nr allows to second nr reconfig 2021-04-12 10:32:40 +02:00
Andre Puschmann c1b66e89a5 mux_nr: protect MAC PDU packing from concurrent access from PHY workers
this will be moved to UL HARQ shortly but for now we need
to protect the packing
2021-04-10 14:01:43 +02:00
Andre Puschmann cf696138d3 mac_nr: fix packing order of SDU and CEs
SDUs need to go first in the MAC PDU, followed by CEs
2021-04-10 14:01:43 +02:00
Andre Puschmann 399954a970 mac_nr: convert bytes to bits for DL metrics 2021-04-10 14:01:43 +02:00
Andre Puschmann b083b612de proc_bsr_nr_test: fix SBSR test 2021-04-10 14:01:43 +02:00
Andre Puschmann 7da68dfee3 proc_bsr_nr: disable SR activation temporarily
SR isn't currently working correctly resulting in random PRACHs
being sent.
2021-04-10 14:01:43 +02:00
Andre Puschmann d1ad315969 mac_nr: add various safety/length checks 2021-04-10 14:01:43 +02:00
Andre Puschmann b1aaadb51c nr,cc_worker: convert grant size in bytes before passing to MAC 2021-04-10 14:01:43 +02:00
Andre Puschmann 7f415189f3 ue,mac: enable basic MAC metrics
this adds basic MAC metrics calculation for the DL NR MAC
2021-04-10 14:01:43 +02:00
Andre Puschmann 8024bf7820 mux_nr: improve logging when building UL MAC PDU 2021-04-09 20:40:22 +02:00
Andre Puschmann 880bd66db4 mac_nr_test: add testcase for MAC PDU packing with long L field
this reproduces the issue found in #2609
2021-04-09 20:12:03 +02:00
Andre Puschmann 9950278a12 nr,mac_sch_pdu,mux: fix packing of MAC subPDUs with 16bit L field
the created RLC PDU was too large to fit inside the MAC grant
because only the header room for the short L field was used.

The patch determines the correct size before passing the opportunity to RLC.

It also improves logging in error case by using the MAC logger instead of
stderr/stdout when error occurs.
2021-04-09 20:12:03 +02:00
Andre Puschmann db496df1e6 mac_nr: add support for periodic BSR reporting
building on the previous refactor this patch now adds support
for peridoic BSR reporting (using short BSR). It furthermore does
the following changes:

* add BSR packing
* add proc_bsr_nr unit test
* move mac_nr test code into test folder under src (needs to be done with other test code too)
2021-04-09 12:28:05 +02:00
Andre Puschmann 7188603f2e mac_nr: don't push MAC CE LCIDs to RLC when unpacking DL MAC PDU
this should fix log warnings then demux was trying to feed MAC CEs
to RLC:

10:50:54.845116 [MAC ] [I] [ 1153] Handling subPDU 1/2: rnti=0x0 lcid=61, sdu_len=1
10:50:54.845117 [RLC ] [E] Radio bearer id must be in [0:11] - 61
10:50:54.845118 [RLC ] [W] LCID 61 doesn't exist. Dropping PDU.
10:50:54.845119 [MAC ] [I] [ 1153] Handling subPDU 2/2: rnti=0x0 lcid=63, sdu_len=33
10:50:54.845119 [RLC ] [E] Radio bearer id must be in [0:11] - 63
2021-04-09 09:49:14 +02:00
David Rupprecht 56e947bf27 Added functionality for releasing a NR bearer 2021-04-08 17:37:36 +02:00
David Rupprecht cc6d8128ad Added gw interface if it is running 2021-04-08 17:37:36 +02:00
David Rupprecht 7a481c40ab Added mac prach nr proc error handling 2021-04-08 17:37:36 +02:00
David Rupprecht f9ea02b6bf Added functions for rrc reestablishing procedure if nr reconfig failes 2021-04-08 17:37:36 +02:00
David Rupprecht 43ec714ce1 Added functionality for printing nr metrics 2021-04-08 15:55:28 +02:00
Xavier Arteaga db1a1c059c NR PHY workers TTI synchronization between DL and UL work 2021-04-08 11:39:55 +02:00
Xavier Arteaga 991c6e7016 Refactored NR HARQ-ACK feedback enqueue 2021-04-08 11:39:55 +02:00
Xavier Arteaga 49731ab5a1 Initial NR-DCI refactor
Added NR DCI 1_1 size

Several DCI NR fixes
2021-04-07 16:57:12 +02:00
Xavier Arteaga dee2ec30cd SRSUE: use new MAC interface for NR SR procedure 2021-04-07 14:16:46 +02:00
Xavier Arteaga 01990c2e1d SRSUE: Add PHY-MAC SR related interfaces 2021-04-07 14:16:46 +02:00
Xavier Arteaga f4ae2d73aa SRSUE: report positive ACK for retx 2021-04-07 13:56:06 +02:00
Xavier Arteaga 20a4c39fa4 SRSUE: Disable PDSCH retransmissions in NR 2021-04-07 13:56:06 +02:00
David Rupprecht 506adca930 Set eutra nr band info based config value 2021-04-07 13:24:26 +02:00
Andre Puschmann d135ae4d29 proc_bsr: initial BSR procedure for NR
* refactor some common methods to mac_common.cc
* add common mux_base class
* move UL PDU generation to mux class
* add logical channel registration to MAC, MUX, BSR
* add initial proc BSR
* add basic MAC NR test
* rework MAC interfaces
2021-03-30 13:46:12 +02:00
Francisco d04a19f8bc refactor - increase code reuse in adt files 2021-03-29 22:11:25 +01:00
Xavier Arteaga e200a3359e SRSUE: check RNTI prior to UL encoding 2021-03-27 10:09:53 +01:00
Pedro Alvarez a5229a02d1 Make sure RRC identity is set when NAS reads UE context from file. 2021-03-26 16:36:12 +00:00
David Rupprecht 838d5ac0f4 Added description for using the same filename for mac and mac_nr pcap 2021-03-26 16:12:45 +01:00