From 1410b3f343f48edddbf38b0025dc02fe34c5c3f8 Mon Sep 17 00:00:00 2001 From: Cedric Roux <cedric.roux@eurecom.fr> Date: Wed, 28 Sep 2016 16:51:28 +0200 Subject: [PATCH] hotfix: fields DLSCH_DCI and ULSCH_DCI of UE_TEMPLATE had wrong size The old value was 6, it should be 8 because those fields are casted to 'struct DCI0_5MHz_FDD' and the like and those have a size multiple of 32 bits, that is 4 or 8 bytes as of today. (MAX_DCI_SIZE_BITS is 45, all the shifts, muls and adds lead to a value of 8 after this commit and 6 before.) The problem manifested itself with a 20MHz eNB. Push the traffic, after a while the DL harq process 0 is not used anymore. This is because DLSCH_DCI is directly followed by nb_rb in the structure UE_TEMPLATE and setting a value for harq process 7 did overwrite nb_rb[0], putting much too big values in there, leading to the scheduler to always refuse to reschedule because the required RBs are impossibly huge (I saw values of 32744, 16384, and others). --- openair2/LAYER2/MAC/defs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index 81c480d2c9..5f3c67637c 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -621,7 +621,9 @@ typedef struct { uint8_t DLSCH_dci_size_bits; /// DCI buffer for DLSCH - uint8_t DLSCH_DCI[8][(MAX_DCI_SIZE_BITS>>3)+1]; + /* rounded to 32 bits unit (actual value should be 8 due to the logic + * of the function generate_dci0) */ + uint8_t DLSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4]; /// Number of Allocated RBs for DL after scheduling (prior to frequency allocation) uint16_t nb_rb[8]; // num_max_harq @@ -645,7 +647,9 @@ typedef struct { uint8_t assigned_mcs_ul; /// DCI buffer for ULSCH - uint8_t ULSCH_DCI[8][(MAX_DCI_SIZE_BITS>>3)+1]; + /* rounded to 32 bits unit (actual value should be 8 due to the logic + * of the function generate_dci0) */ + uint8_t ULSCH_DCI[8][(((MAX_DCI_SIZE_BITS)+31)>>5)*4]; /// DL DAI uint8_t DAI; -- GitLab