fix vnf-ue stack interface

master
Francisco Paisana 5 years ago
parent e6ef201cb0
commit fddcbc9879

@ -139,8 +139,10 @@ int rlc_um_base::read_pdu(uint8_t* payload, uint32_t nof_bytes)
{ {
if (tx && tx_enabled) { if (tx && tx_enabled) {
uint32_t len = tx->build_data_pdu(payload, nof_bytes); uint32_t len = tx->build_data_pdu(payload, nof_bytes);
metrics.num_tx_bytes += len; if (len > 0) {
metrics.num_tx_pdus++; metrics.num_tx_bytes += len;
metrics.num_tx_pdus++;
}
return len; return len;
} }
return 0; return 0;

@ -81,11 +81,11 @@ public:
// MAC interface for PHY // MAC interface for PHY
int sf_indication(const uint32_t tti) int sf_indication(const uint32_t tti)
{ {
mac->sf_indication(tti); run_tti(tti);
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
void tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant) final; void tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant) final { mac->tb_decoded(cc_idx, grant); }
void new_grant_ul(const uint32_t cc_idx, const mac_nr_grant_ul_t& grant) final; void new_grant_ul(const uint32_t cc_idx, const mac_nr_grant_ul_t& grant) final { mac->new_grant_ul(cc_idx, grant); }
// Interface for GW // Interface for GW
void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking) final; void write_sdu(uint32_t lcid, srslte::unique_byte_buffer_t sdu, bool blocking) final;

@ -145,7 +145,7 @@ void mac_nr::tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant)
} }
} }
process_pdus(); stack->defer_task([this]() { process_pdus(); });
} }
} }
@ -185,6 +185,8 @@ void mac_nr::get_ul_data(const mac_nr_grant_ul_t& grant, phy_interface_stack_nr:
if (tx_pdu.add_sdu(args.drb_lcid, rlc_buffer->msg, rlc_buffer->N_bytes) != SRSLTE_SUCCESS) { if (tx_pdu.add_sdu(args.drb_lcid, rlc_buffer->msg, rlc_buffer->N_bytes) != SRSLTE_SUCCESS) {
log_h->error("Error packing MAC PDU\n"); log_h->error("Error packing MAC PDU\n");
} }
} else {
break;
} }
} }

@ -214,7 +214,7 @@ void ue_stack_nr::out_of_sync()
void ue_stack_nr::run_tti(uint32_t tti) void ue_stack_nr::run_tti(uint32_t tti)
{ {
// pending_tasks.push(sync_queue_id, task_t{[this, tti](task_t*) { run_tti_impl(tti); }}); pending_tasks.push(sync_queue_id, [this, tti]() { run_tti_impl(tti); });
} }
void ue_stack_nr::run_tti_impl(uint32_t tti) void ue_stack_nr::run_tti_impl(uint32_t tti)
@ -238,18 +238,6 @@ void ue_stack_nr::start_cell_select(const phy_interface_rrc_lte::phy_cell_t* cel
// not implemented // not implemented
} }
void ue_stack_nr::tb_decoded(const uint32_t cc_idx, mac_nr_grant_dl_t& grant)
{
pending_tasks.push(
mac_queue_id,
std::bind([this, cc_idx](mac_nr_grant_dl_t& grant) { mac->tb_decoded(cc_idx, grant); }, std::move(grant)));
}
void ue_stack_nr::new_grant_ul(const uint32_t cc_idx, const mac_nr_grant_ul_t& grant)
{
pending_tasks.push(mac_queue_id, [this, cc_idx, grant]() { mac->new_grant_ul(cc_idx, grant); });
}
/*************************** /***************************
* Task Handling Interface * Task Handling Interface
**************************/ **************************/

Loading…
Cancel
Save