mirror of https://github.com/PentHertz/srsLTE.git
log on allocation failure in mac::ue class
This commit is contained in:
parent
beed2ddbaa
commit
023cb0fdde
|
@ -47,7 +47,7 @@ public:
|
||||||
void allocate_cc(uint32_t nof_prb, uint32_t nof_rx_harq_proc, uint32_t nof_tx_harq_proc);
|
void allocate_cc(uint32_t nof_prb, uint32_t nof_rx_harq_proc, uint32_t nof_tx_harq_proc);
|
||||||
void deallocate_cc();
|
void deallocate_cc();
|
||||||
|
|
||||||
bool empty() const { return softbuffer_tx_list.empty(); }
|
bool empty() const { return softbuffer_tx_list.empty() and softbuffer_rx_list.empty(); }
|
||||||
srslte_softbuffer_tx_t& get_tx_softbuffer(uint32_t pid, uint32_t tb_idx)
|
srslte_softbuffer_tx_t& get_tx_softbuffer(uint32_t pid, uint32_t tb_idx)
|
||||||
{
|
{
|
||||||
return softbuffer_tx_list.at(pid * SRSLTE_MAX_TB + tb_idx);
|
return softbuffer_tx_list.at(pid * SRSLTE_MAX_TB + tb_idx);
|
||||||
|
@ -88,21 +88,16 @@ public:
|
||||||
uint32_t nof_cells_,
|
uint32_t nof_cells_,
|
||||||
uint32_t nof_rx_harq_proc = SRSLTE_FDD_NOF_HARQ,
|
uint32_t nof_rx_harq_proc = SRSLTE_FDD_NOF_HARQ,
|
||||||
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ);
|
uint32_t nof_tx_harq_proc = SRSLTE_FDD_NOF_HARQ);
|
||||||
|
|
||||||
virtual ~ue();
|
virtual ~ue();
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
|
|
||||||
void start_pcap(srslte::mac_pcap* pcap_);
|
void start_pcap(srslte::mac_pcap* pcap_);
|
||||||
|
|
||||||
void set_tti(uint32_t tti);
|
void set_tti(uint32_t tti);
|
||||||
|
|
||||||
uint16_t get_rnti() { return rnti; }
|
uint16_t get_rnti() { return rnti; }
|
||||||
|
|
||||||
uint32_t set_ta(int ta) override;
|
uint32_t set_ta(int ta) override;
|
||||||
|
|
||||||
void start_ta() { ta_fsm.start(); };
|
void start_ta() { ta_fsm.start(); };
|
||||||
uint32_t set_ta_us(float ta_us) { return ta_fsm.push_value(ta_us); };
|
uint32_t set_ta_us(float ta_us) { return ta_fsm.push_value(ta_us); };
|
||||||
|
|
||||||
void tic();
|
void tic();
|
||||||
|
|
||||||
uint8_t* generate_pdu(uint32_t ue_cc_idx,
|
uint8_t* generate_pdu(uint32_t ue_cc_idx,
|
||||||
|
|
|
@ -27,6 +27,10 @@ cc_buffer_handler::cc_buffer_handler()
|
||||||
for (auto& harq_buffers : tx_payload_buffer) {
|
for (auto& harq_buffers : tx_payload_buffer) {
|
||||||
for (srslte::unique_byte_buffer_t& tb_buffer : harq_buffers) {
|
for (srslte::unique_byte_buffer_t& tb_buffer : harq_buffers) {
|
||||||
tb_buffer = srslte::make_byte_buffer();
|
tb_buffer = srslte::make_byte_buffer();
|
||||||
|
if (tb_buffer == nullptr) {
|
||||||
|
srslog::fetch_basic_logger("MAC").error("Failed to allocate HARQ buffers for UE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue