mirror of https://github.com/PentHertz/srsLTE.git
sched,nr: add error checking and logging for invalid PIDs
This commit is contained in:
parent
14b3a65dfe
commit
28e25b12b4
|
@ -44,7 +44,7 @@ public:
|
|||
slot_point harq_slot_tx() const { return slot_tx; }
|
||||
slot_point harq_slot_ack() const { return slot_ack; }
|
||||
|
||||
bool ack_info(uint32_t tb_idx, bool ack);
|
||||
int ack_info(uint32_t tb_idx, bool ack);
|
||||
|
||||
void new_slot(slot_point slot_rx);
|
||||
void reset();
|
||||
|
@ -124,8 +124,8 @@ public:
|
|||
explicit harq_entity(uint32_t nprb, uint32_t nof_harq_procs = SCHED_NR_MAX_HARQ);
|
||||
void new_slot(slot_point slot_rx_);
|
||||
|
||||
void dl_ack_info(uint32_t pid, uint32_t tb_idx, bool ack) { dl_harqs[pid].ack_info(tb_idx, ack); }
|
||||
void ul_crc_info(uint32_t pid, bool ack) { ul_harqs[pid].ack_info(0, ack); }
|
||||
int dl_ack_info(uint32_t pid, uint32_t tb_idx, bool ack) { return dl_harqs[pid].ack_info(tb_idx, ack); }
|
||||
int ul_crc_info(uint32_t pid, bool ack) { return ul_harqs[pid].ack_info(0, ack); }
|
||||
|
||||
uint32_t nof_dl_harqs() const { return dl_harqs.size(); }
|
||||
uint32_t nof_ul_harqs() const { return ul_harqs.size(); }
|
||||
|
|
|
@ -155,13 +155,20 @@ int sched_nr::dl_rach_info(uint32_t cc, const dl_sched_rar_info_t& rar_info)
|
|||
|
||||
void sched_nr::dl_ack_info(uint16_t rnti, uint32_t cc, uint32_t pid, uint32_t tb_idx, bool ack)
|
||||
{
|
||||
sched_workers->enqueue_cc_feedback(
|
||||
rnti, cc, [pid, tb_idx, ack](ue_carrier& ue_cc) { ue_cc.harq_ent.dl_ack_info(pid, tb_idx, ack); });
|
||||
sched_workers->enqueue_cc_feedback(rnti, cc, [this, pid, tb_idx, ack](ue_carrier& ue_cc) {
|
||||
if (ue_cc.harq_ent.dl_ack_info(pid, tb_idx, ack) != SRSRAN_SUCCESS) {
|
||||
logger->warning("SCHED: rnti=0x%x, received DL HARQ-ACK for empty pid=%d", ue_cc.rnti, pid);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void sched_nr::ul_crc_info(uint16_t rnti, uint32_t cc, uint32_t pid, bool crc)
|
||||
{
|
||||
sched_workers->enqueue_cc_feedback(rnti, cc, [pid, crc](ue_carrier& ue_cc) { ue_cc.harq_ent.ul_crc_info(pid, crc); });
|
||||
sched_workers->enqueue_cc_feedback(rnti, cc, [this, pid, crc](ue_carrier& ue_cc) {
|
||||
if (ue_cc.harq_ent.ul_crc_info(pid, crc) != SRSRAN_SUCCESS) {
|
||||
logger->warning("SCHED: rnti=0x%x, received CRC for empty pid=%d", ue_cc.rnti, pid);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void sched_nr::ul_sr_info(uint16_t rnti)
|
||||
|
|
|
@ -16,16 +16,16 @@
|
|||
namespace srsenb {
|
||||
namespace sched_nr_impl {
|
||||
|
||||
bool harq_proc::ack_info(uint32_t tb_idx, bool ack)
|
||||
int harq_proc::ack_info(uint32_t tb_idx, bool ack)
|
||||
{
|
||||
if (empty(tb_idx)) {
|
||||
return false;
|
||||
return SRSRAN_ERROR;
|
||||
}
|
||||
tb[tb_idx].ack_state = ack;
|
||||
if (ack) {
|
||||
tb[tb_idx].active = false;
|
||||
}
|
||||
return true;
|
||||
return SRSRAN_SUCCESS;
|
||||
}
|
||||
|
||||
void harq_proc::new_slot(slot_point slot_rx)
|
||||
|
|
Loading…
Reference in New Issue