Merge remote-tracking branch 'origin/fix_t2_harq_combined_offset' into integration_2025_w04 (!3214)
fix(nrLDPC_coding_t2): Miscellaneous fixes related to T2 1. HARQ combined offset: The offset provided for each code block in the HARQ combined input and output buffer shall not be above 512. A modulus was performed on the offset of the TB in the buffer to avoid this situation. But the offset of the code block was added afterward so that the total offset was sometimes going above 512.This commit performs the modulus after adding the code block offset. Usually this issue was triggering a segfault after less than 2 minutes of an iperf test on some setup using T2. The same iperf test was successfully performed during 10 minutes on the same setup with this change. 2. Properly stop LDPC coding in gNB and UE: LDPC coding was yet not properly stopped by using free_nrLDPC_coding_interface in gNB and UE. This was not causing major issue until now. It was especially not causing any issue with T2 LDPC coding using the PF. But using T2 VFs, if the coding library is not properly stopped then the VF cannot be used anymore unless the admin app is restarted. So this MR adds the missing free_nrLDPC_coding_interface.
This commit is contained in:
@@ -572,6 +572,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
free_nrLDPC_coding_interface(&nrLDPC_coding_interface);
|
||||
free(pckg);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -70,5 +70,9 @@ int load_nrLDPC_coding_interface(char *version, nrLDPC_coding_interface_t *itf)
|
||||
|
||||
int free_nrLDPC_coding_interface(nrLDPC_coding_interface_t *interface)
|
||||
{
|
||||
return interface->nrLDPC_coding_shutdown();
|
||||
if (interface->nrLDPC_coding_shutdown) {
|
||||
return interface->nrLDPC_coding_shutdown();
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,8 +559,18 @@ set_ldpc_dec_op(struct rte_bbdev_dec_op **ops,
|
||||
ops[j]->ldpc_dec.op_flags |= RTE_BBDEV_LDPC_CRC_TYPE_24B_CHECK;
|
||||
}
|
||||
ops[j]->ldpc_dec.code_block_mode = 1;
|
||||
ops[j]->ldpc_dec.harq_combined_input.offset = (((nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) % HARQ_CODEBLOCK_ID_MAX) + i) * LDPC_MAX_CB_SIZE;
|
||||
ops[j]->ldpc_dec.harq_combined_output.offset = (((nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) % HARQ_CODEBLOCK_ID_MAX) + i) * LDPC_MAX_CB_SIZE;
|
||||
|
||||
// Calculate offset in the HARQ combined buffers
|
||||
// Unique segment offset
|
||||
uint32_t segment_offset = (nrLDPC_slot_decoding_parameters->TBs[h].harq_unique_pid * NR_LDPC_MAX_NUM_CB) + i;
|
||||
// Prune to avoid shooting above maximum id
|
||||
uint32_t pruned_segment_offset = segment_offset % HARQ_CODEBLOCK_ID_MAX;
|
||||
// Segment offset to byte offset
|
||||
uint32_t harq_combined_offset = pruned_segment_offset * LDPC_MAX_CB_SIZE;
|
||||
|
||||
ops[j]->ldpc_dec.harq_combined_input.offset = harq_combined_offset;
|
||||
ops[j]->ldpc_dec.harq_combined_output.offset = harq_combined_offset;
|
||||
|
||||
if (bufs->hard_outputs != NULL)
|
||||
ops[j]->ldpc_dec.hard_output = bufs->hard_outputs[start_idx + j];
|
||||
if (bufs->inputs != NULL)
|
||||
|
||||
@@ -292,6 +292,9 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
|
||||
free_and_zero(pusch_vars->llr);
|
||||
} // ULSCH_id
|
||||
free(gNB->pusch_vars);
|
||||
|
||||
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
|
||||
|
||||
}
|
||||
|
||||
//Adding nr_schedule_handler
|
||||
|
||||
@@ -661,8 +661,6 @@ int main(int argc, char **argv)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
|
||||
|
||||
abortTpool(&gNB->threadPool);
|
||||
|
||||
phy_free_nr_gNB(gNB);
|
||||
|
||||
@@ -603,8 +603,6 @@ int main(int argc, char **argv)
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list);
|
||||
free(gNB->gNB_config.tdd_table.max_tdd_periodicity_list);
|
||||
|
||||
free_nrLDPC_coding_interface(&gNB->nrLDPC_coding_interface);
|
||||
|
||||
term_nr_ue_signal(UE, 1);
|
||||
free(UE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user