Commit 1410b3f3 authored by Cedric Roux's avatar Cedric Roux

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).
parent 1fdb28d1
...@@ -621,7 +621,9 @@ typedef struct { ...@@ -621,7 +621,9 @@ typedef struct {
uint8_t DLSCH_dci_size_bits; uint8_t DLSCH_dci_size_bits;
/// DCI buffer for DLSCH /// 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) /// Number of Allocated RBs for DL after scheduling (prior to frequency allocation)
uint16_t nb_rb[8]; // num_max_harq uint16_t nb_rb[8]; // num_max_harq
...@@ -645,7 +647,9 @@ typedef struct { ...@@ -645,7 +647,9 @@ typedef struct {
uint8_t assigned_mcs_ul; uint8_t assigned_mcs_ul;
/// DCI buffer for ULSCH /// 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 /// DL DAI
uint8_t DAI; uint8_t DAI;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment