Commit Graph
826 Commits
Author SHA1 Message Date
Robert Schmidt 8ad215f680 Lower scheduler PF averaging constant
This time constant plays a major role in how long a UE has to wait
maximally before it might be scheduled. For instance, if a UE had a lot
of traffic, the average traffic will be high, pushing the PF coefficient
down. If another UE with no traffic in the past becomes active with
heavy traffic, the first UE might not be scheduled for an extended
period of time.

In the AW2S-Amarisoft UE CI test pipeline, we sometimes see that the
maximum number of RLC retransmissions was reached. While this might not
be the (only) cause, scheduling a UE more often might prevent such
situations, and we saw an improved stability.
2023-08-21 17:16:21 +02:00
Roberto Louro Magueta 45d4333afc Fix reconfigurationWithSync 2023-06-10 13:06:37 +01:00
Robert Schmidt d6fb5c2e31 Handle UE release request at CU, and trigger at DU at UL failure 2023-05-25 22:16:19 +02:00
Robert Schmidt 69bfe7fe87 Implement basic F1 release procedure using F1 internally 2023-05-25 22:16:19 +02:00
Robert Schmidt 31a1003349 Introduce mutex for MAC scheduler
Different threads (e.g., RRC, DU tasks) might access the scheduler at
the same time as the thread that drivers the scheduler itself
(ru_thread). To avoid data races, introduce this mutex.

Most functions of the scheduler are only used internally and have been
marked static in the previous commit. The remaining ones, in this
commit, either lock the scheduler mutex sched_lock, or a comment has
been added of the assumption of how such function is to be locked (e.g.,
if it might be called from different places, or if it is called by a
function that already locks the scheduler).
2023-05-03 13:40:22 +02:00
Robert Schmidt e7a8eb950e NR MAC: make many functions static
To know which functions are used from outside and which are
module-local, make many functions static. This will allow us to protect
only those functions with a mutex for which it is necessary.
2023-05-03 13:40:20 +02:00
francescomani 26e469cbac adding 256QAM in feature set, adding 256QAM test in ulsim and limit mcs according to table 2023-04-17 12:41:47 +02:00
francescomani fc17f3fdc7 fix for transform precoding condition 2023-04-17 12:32:29 +02:00
Robert Schmidt 51c4933258 MAC: count transported SDU bytes 2023-04-14 13:52:16 +02:00
Cedric Roux 733c7e5e89 bugfix: change memory management of interface between PHY and MAC scheduler
This commit fixes a bug caused by global variables in the gNB_MAC_INST
structure used to transfer MAC scheduler's results to the PHY layer.

When using several threads in the PHY layer, it may happen that the
MAC scheduler is called a second time by the second PHY thread for the
next slot before the content of the global variables in the gNB_MAC_INST
structure used to store the result of the MAC scheduler for the current
slot have been consumed by the first thread, leading to unpredictable
results (all of them certainly wrong).

The solution is to introduce a small memory management module for the
interface between the PHY threads and the MAC scheduler. The MAC
scheduler now fills the data structures passed to it, and not a
global variable anymore. The PHY layer manages the structures and
ensures that no data is overwritten before being fully consumed by
the various threads of the PHY layer.

Some care has to be taken because several PHY threads will access the
same structures at the same time for a given slot (in read mode, so
it's okay). A mechanism of reference counting has thus been introduced.

Only one CC is supported. This restriction should not be too hard
to remove if/when needed. (The code before this commit does not seem
to work for more than one CC anyway.)
2023-04-05 16:39:12 +02:00
Robert Schmidt 99d5e50b6a fix merge 2023-03-30 19:58:55 +02:00
Robert Schmidt 1ac428a323 Merge remote-tracking branch 'origin/develop-handle-reconfigurationWithSync' into integration_2023_w13 2023-03-30 19:19:37 +02:00
Roberto Louro Magueta 670fcc0459 Fix handle_nr_ul_harq() for CFRA in SA 2023-03-28 18:52:48 +01:00
francescomani 7c9b501310 removing call from MAC to PHY to clear structures (now automatic clearing) 2023-03-27 15:26:52 +02:00
Robert Schmidt 27566f49dd Create CellGroup, SRB0, and SRB1, before sending Initial UL RRC message
During the Initial UL RRC Message, the CellGroup is created. Since the
CellGroup specifies the SRB1, the SRB1 should also be created (because
the DL RRC Messages is sent via SRB1). However, before this commit, the
CellGroup is created while having the RLC lock, so we cannot create
SRB1, as it results in a deadlock.

Therefore, we now first create CellGroup, SRB0, and SRB1, before giving
the UE message to the RLC.
2023-03-20 16:57:58 +01:00
Robert Schmidt 7773311e0e Merge remote-tracking branch 'origin/NR_UL_scheduler_warnings' into integration_2023_w11b 2023-03-18 12:05:13 +01:00
francescomani df110d457a demote UL scheduler warnings to debug level 2023-03-17 11:22:56 +01:00
francescomani f82bba5535 fix transform precoding scheduling for ulsch 2023-03-15 10:54:03 +01:00
francescomani 7db8dce51c fixes for allowing softmodem to schedule PUSCH with transform precoding 2023-03-15 10:54:03 +01:00
Robert Schmidt 1436470943 Merge remote-tracking branch 'origin/NR_Msg3_dcch_dtch_reworking' into integration_2023_w10b 2023-03-10 15:11:57 +01:00
Robert Schmidt 7668a8917e Use pointer to MAC instead of module ID 2023-03-09 19:06:07 +01:00
francescomani 799d0b3ab5 reworking response to MSG3 with DCCH/DTCH 2023-03-09 14:01:33 +01:00
Robert Schmidt c6883ad2ee Merge remote-tracking branch 'origin/NR_15khz_UL_buffers' into integration_2023_w09 2023-03-02 09:18:06 +01:00
Robert Schmidt 1e3de79862 Merge remote-tracking branch 'origin/NR_UE_BWP_reworking_continuation' into integration_2023_w09 2023-03-02 08:57:40 +01:00
francescomani e4ce069d1a increase UL buffer size for 15kHz 2023-02-24 14:06:23 +01:00
luis_pereira87 263436d866 Implementation of NR_RRCReestablishment procedures at gNB 2023-02-24 07:50:56 +00:00
francescomani 605efb5e86 improving handling of TDAs and other fixes 2023-02-23 19:14:04 +01:00
Robert Schmidt a3685e6bde Merge remote-tracking branch 'origin/multi-ue-fixes' into integration_2023_w08 2023-02-22 15:58:28 +01:00
francescomani e9ff5ee562 improving the logic of reusing the old tda and applying to UL 2023-02-21 19:16:35 +01:00
francescomani a51cb67cb0 fixes in limiting MCS and number of PRB while handling PHR 2023-02-13 11:41:13 +01:00
Guido bc21da6ab2 Harmonized debug logging in DL/UL scheduling
- made it consistent throughout the code
- always reporting the UE RNTI that is failing (helps debug in a multi-ue operation)
2023-02-06 11:48:16 +01:00
francescomani 368ec8956d set max ues to be scheduled by pf 2023-01-19 14:51:52 +01:00
Robert Schmidt ce1246e0dd Merge remote-tracking branch 'origin/NR_UE_BWP_reworking' into integration_2022_wk02 2023-01-12 17:49:22 +01:00
francescomani e55e880b71 cleaning up of dci functions 2022-12-27 18:32:30 +01:00
Roberto Louro Magueta c6bfb97988 Remove calloc of report_tlv, prg_list and prgs 2022-12-23 10:39:11 +00:00
Roberto Louro Magueta f7a34d4274 Rename some variables 2022-12-23 10:39:11 +00:00
Robert Schmidt cc6d1ecded Merge remote-tracking branch 'origin/multi-ue-fixes' into integration_2022_wk51 2022-12-22 15:04:00 +01:00
Guido c99539a806 Bugfix wrong use of qsort
- The qsort() function is defined as:
  void qsort(void *base, size_t nmemb, size_t size,
    int (*compar)(const void *, const void *));
  and sorts an array with nmemb elements of size size.
- in the gNB scheduling functions, nmemb and size were swapped
- this was causing a stack overflow ending with a SEGFAULT under certain circumstances
2022-12-19 15:15:05 +01:00
francescomani 88192f1339 fixes for mixed slot without uplink symbols 2022-12-19 10:24:02 +01:00
Robert Schmidt fca07aae56 Merge remote-tracking branch 'origin/NR_improve_SRS_configuration' into integration_2022_wk50 2022-12-15 16:22:22 +01:00
Roberto Louro Magueta 93756a56eb Fix hardcoded number of layers for the UL 2022-12-14 14:03:22 +00:00
Roberto Louro Magueta ec858d175d Compute TPMI based on SRS for 2 layers 2022-12-14 14:03:22 +00:00
francescomani 64c1b8ac93 adapting ul tda to srs 2022-12-02 10:25:08 +01:00
Robert Schmidt cff0675eee Merge remote-tracking branch 'origin/srb0-use-rlc' into integration_2022_wk48 2022-11-30 14:38:45 +01:00
francescomani 67544e83af re-compute TBS after reducing PRBs or MCS 2022-11-28 09:52:41 +01:00
Cedric Roux 231c2f3c5f gnb: remove srb0 shared global variable - use RLC module instead 2022-11-25 17:31:03 +01:00
luis_pereira87 aebe83e45b Fix infinite loop in ULSCH scheduler when scheduling for multiple UEs 2022-11-22 21:09:18 +00:00
Robert Schmidt 39cf6006d8 Merge remote-tracking branch 'origin/NR_ULSCH_scheduler_fixes' into integration_2022_wk46 2022-11-18 16:20:24 +01:00
Robert Schmidt f54f1fd61d Merge remote-tracking branch 'origin/NR_UE_improve_RA' into integration_2022_wk46 2022-11-17 18:31:45 +01:00
francescomani 623d0e362d further fixes in ulsch (and dlsch) scheduler 2022-11-17 18:01:50 +01:00