Avoid concurrent write while filling RX/CRC.indication

We observe these asserts while running concurrent UL traffic on many
UEs:

  Assertion (crc->rnti == rx->rnti) failed!
  In handle_nr_ulsch() ../../../openair2/NR_PHY_INTERFACE/NR_IF_Module.c:193
  mis-match between CRC RNTI 7221 and RX RNTI 35cf

CRC and RX indication need to be pairwise for one UE, when here we have
each for different UE. However, investigation seemed to indicate that
both arrays for CRC and RX indication contained only one PDU; it seemed
the RNTI changed while writing the CRC/RX.indication messages in
nr_fill_indication().

In this patch, we change the logic to mark a ULSCH free AFTER calling
nr_fill_indication(). It is difficult to say if this makes the assertion
disappear, but preliminary tests did not exhibit the same failure
states.

Closes #773
This commit is contained in:
Robert Schmidt
2024-04-04 19:00:57 +02:00
parent 1cae1879be
commit 5951caa91e
2 changed files with 5 additions and 6 deletions
@@ -292,10 +292,9 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB,
}
if (crc_valid) {
LOG_D(PHY, "ULSCH: Setting ACK for slot %d TBS %d\n", ulsch->slot, harq_process->TBS);
nr_fill_indication(phy_vars_gNB, ulsch->frame, ulsch->slot, ULSCH_id, harq_pid, 0, 0);
ulsch->active = false;
harq_process->round = 0;
LOG_D(PHY, "ULSCH received ok \n");
nr_fill_indication(phy_vars_gNB, ulsch->frame, ulsch->slot, ULSCH_id, harq_pid, 0, 0);
} else {
LOG_D(PHY,
"[gNB %d] ULSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d)\n",
@@ -306,10 +305,10 @@ int decode_offload(PHY_VARS_gNB *phy_vars_gNB,
ulsch->active,
harq_process->round,
harq_process->TBS);
nr_fill_indication(phy_vars_gNB, ulsch->frame, ulsch->slot, ULSCH_id, harq_pid, 1, 0);
ulsch->handled = 1;
decodeIterations = ulsch->max_ldpc_iterations + 1;
LOG_D(PHY, "ULSCH %d in error\n", ULSCH_id);
nr_fill_indication(phy_vars_gNB, ulsch->frame, ulsch->slot, ULSCH_id, harq_pid, 1, 0);
}
ulsch->last_iteration_cnt = decodeIterations;
+3 -3
View File
@@ -314,10 +314,10 @@ static void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
ulsch_harq->round,
ulsch_harq->TBS,
rdata->decodeIterations);
nr_fill_indication(gNB, ulsch->frame, ulsch->slot, rdata->ulsch_id, rdata->harq_pid, 0, 0);
LOG_D(PHY, "ULSCH received ok \n");
ulsch->active = false;
ulsch_harq->round = 0;
LOG_D(PHY, "ULSCH received ok \n");
nr_fill_indication(gNB, ulsch->frame, ulsch->slot, rdata->ulsch_id, rdata->harq_pid, 0, 0);
//dumpsig=1;
} else {
LOG_D(PHY,
@@ -335,9 +335,9 @@ static void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req)
ulsch_harq->ulsch_pdu.rb_size,
ulsch_harq->TBS,
r);
nr_fill_indication(gNB, ulsch->frame, ulsch->slot, rdata->ulsch_id, rdata->harq_pid, 1, 0);
ulsch->handled = 1;
LOG_D(PHY, "ULSCH %d in error\n",rdata->ulsch_id);
nr_fill_indication(gNB, ulsch->frame, ulsch->slot, rdata->ulsch_id, rdata->harq_pid, 1, 0);
// dumpsig=1;
}
ulsch->last_iteration_cnt = rdata->decodeIterations;