Commit a61b5f30 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/NR_remove_ul_harq_ra_warning' into...

Merge remote-tracking branch 'origin/NR_remove_ul_harq_ra_warning' into integration_2024_w48 (!3133)

NR UL HARQ handling improvements

to avoid printing warning on unexpected HARQ PID for RA
parents ce9aaa8f 31d19ec3
...@@ -2429,7 +2429,8 @@ void nr_schedule_RA(module_id_t module_idP, ...@@ -2429,7 +2429,8 @@ void nr_schedule_RA(module_id_t module_idP,
NR_COMMON_channels_t *cc = &mac->common_channels[CC_id]; NR_COMMON_channels_t *cc = &mac->common_channels[CC_id];
for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) { for (int i = 0; i < NR_NB_RA_PROC_MAX; i++) {
NR_RA_t *ra = &cc->ra[i]; NR_RA_t *ra = &cc->ra[i];
LOG_D(NR_MAC, "RA[state:%d]\n", ra->ra_state); if (ra->ra_state != nrRA_gNB_IDLE)
LOG_D(NR_MAC, "RA[%d] frame.slot %d.%d state: %d\n", i, frameP, slotP, ra->ra_state);
// Check RA Contention Resolution timer // Check RA Contention Resolution timer
if (ra->ra_type == RA_4_STEP && ra->ra_state >= nrRA_WAIT_Msg3) { if (ra->ra_type == RA_4_STEP && ra->ra_state >= nrRA_WAIT_Msg3) {
......
...@@ -585,38 +585,36 @@ void handle_nr_ul_harq(const int CC_idP, ...@@ -585,38 +585,36 @@ void handle_nr_ul_harq(const int CC_idP,
const nfapi_nr_crc_t *crc_pdu) const nfapi_nr_crc_t *crc_pdu)
{ {
gNB_MAC_INST *nrmac = RC.nrmac[mod_id]; gNB_MAC_INST *nrmac = RC.nrmac[mod_id];
NR_SCHED_LOCK(&nrmac->sched_lock); if (nrmac->radio_config.disable_harq) {
LOG_D(NR_MAC, "skipping UL feedback handling as HARQ is disabled\n");
NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, crc_pdu->rnti); return;
bool UE_waiting_CFRA_msg3 = get_UE_waiting_CFRA_msg3(nrmac, CC_idP, frame, slot, crc_pdu->rnti); }
if (!UE || UE_waiting_CFRA_msg3 == true) { NR_SCHED_LOCK(&nrmac->sched_lock);
LOG_D(NR_MAC, "handle harq for rnti %04x, in RA process\n", crc_pdu->rnti); for (int i = 0; i < NR_NB_RA_PROC_MAX; ++i) {
for (int i = 0; i < NR_NB_RA_PROC_MAX; ++i) { NR_RA_t *ra = &nrmac->common_channels[CC_idP].ra[i];
NR_RA_t *ra = &nrmac->common_channels[CC_idP].ra[i]; // if we find any ongoing RA that has already scheduled MSG3
if (ra->ra_state >= nrRA_WAIT_Msg3 && ra->rnti == crc_pdu->rnti) { // and it is expecting its reception in current frame and slot with matching RNTI
NR_SCHED_UNLOCK(&nrmac->sched_lock); // we can exit the function (no HARQ involved)
return; if (ra->ra_state >= nrRA_WAIT_Msg3 && ra->rnti == crc_pdu->rnti && frame == ra->Msg3_frame && slot == ra->Msg3_slot) {
} LOG_D(NR_MAC, "UL for rnti %04x in RA (MSG3), no need to process HARQ\n", crc_pdu->rnti);
NR_SCHED_UNLOCK(&nrmac->sched_lock);
return;
} }
NR_SCHED_UNLOCK(&nrmac->sched_lock);
LOG_D(NR_MAC, "no RA proc for RNTI 0x%04x in Msg3/MsgA-PUSCH\n", crc_pdu->rnti);
return;
} }
if (nrmac->radio_config.disable_harq) {
LOG_D(NR_MAC, "skipping UL feedback handling as HARQ is disabled\n"); NR_UE_info_t *UE = find_nr_UE(&nrmac->UE_info, crc_pdu->rnti);
if (!UE) {
NR_SCHED_UNLOCK(&nrmac->sched_lock); NR_SCHED_UNLOCK(&nrmac->sched_lock);
LOG_E(NR_MAC, "Couldn't identify UE connected with current UL HARQ process\n");
return; return;
} }
NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl;
int8_t harq_pid = sched_ctrl->feedback_ul_harq.head; int8_t harq_pid = sched_ctrl->feedback_ul_harq.head;
LOG_D(NR_MAC, "Comparing crc_pdu->harq_id vs feedback harq_pid = %d %d\n",crc_pdu->harq_id, harq_pid); LOG_D(NR_MAC, "Comparing crc_pdu->harq_id vs feedback harq_pid = %d %d\n",crc_pdu->harq_id, harq_pid);
while (crc_pdu->harq_id != harq_pid || harq_pid < 0) { while (crc_pdu->harq_id != harq_pid || harq_pid < 0) {
LOG_W(NR_MAC, LOG_W(NR_MAC, "Unexpected ULSCH HARQ PID %d (have %d) for RNTI 0x%04x\n", crc_pdu->harq_id, harq_pid, crc_pdu->rnti);
"Unexpected ULSCH HARQ PID %d (have %d) for RNTI 0x%04x (ignore this warning for RA)\n",
crc_pdu->harq_id,
harq_pid,
crc_pdu->rnti);
if (harq_pid < 0) { if (harq_pid < 0) {
NR_SCHED_UNLOCK(&nrmac->sched_lock); NR_SCHED_UNLOCK(&nrmac->sched_lock);
return; return;
......
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