mirror of https://github.com/PentHertz/srsLTE.git
mac,nr: avoid repacking NR DL retxs
This commit is contained in:
parent
01441d143d
commit
b311806179
|
@ -139,7 +139,7 @@ private:
|
|||
/* Map of active UEs */
|
||||
static const uint16_t FIRST_RNTI = 0x46;
|
||||
rnti_map_t<unique_rnti_ptr<ue> > ue_db;
|
||||
std::atomic<uint16_t> ue_counter;
|
||||
std::atomic<uint16_t> ue_counter{0};
|
||||
|
||||
uint8_t* assemble_rar(sched_interface::dl_sched_rar_grant_t* grants,
|
||||
uint32_t enb_cc_idx,
|
||||
|
|
|
@ -56,12 +56,11 @@ public:
|
|||
bool new_retx(slot_point slot_tx, slot_point slot_ack, const prb_grant& grant);
|
||||
bool new_retx(slot_point slot_tx, slot_point slot_ack);
|
||||
|
||||
const uint32_t pid;
|
||||
|
||||
protected:
|
||||
// NOTE: Has to be used before first tx is dispatched
|
||||
bool set_tbs(uint32_t tbs);
|
||||
|
||||
const uint32_t pid;
|
||||
|
||||
private:
|
||||
struct tb_t {
|
||||
bool active = false;
|
||||
|
@ -84,16 +83,15 @@ class dl_harq_proc : public harq_proc
|
|||
public:
|
||||
dl_harq_proc(uint32_t id_, uint32_t nprb);
|
||||
|
||||
tx_harq_softbuffer& get_softbuffer() { return *softbuffer; }
|
||||
tx_harq_softbuffer& get_softbuffer() { return *softbuffer; }
|
||||
srsran::unique_byte_buffer_t* get_tx_pdu() { return &pdu; }
|
||||
|
||||
// clear and reset softbuffer and PDU for new tx
|
||||
bool set_tbs(uint32_t tbs)
|
||||
{
|
||||
softbuffer->reset();
|
||||
pdu->clear();
|
||||
return harq_proc::set_tbs(tbs);
|
||||
}
|
||||
bool new_tx(slot_point slot_tx,
|
||||
slot_point slot_ack,
|
||||
const prb_grant& grant,
|
||||
uint32_t mcs,
|
||||
uint32_t tbs,
|
||||
uint32_t max_retx);
|
||||
|
||||
private:
|
||||
srsran::unique_pool_ptr<tx_harq_softbuffer> softbuffer;
|
||||
|
|
|
@ -281,7 +281,7 @@ int mac_nr::get_dl_sched(const srsran_slot_cfg_t& slot_cfg, dl_sched_t& dl_sched
|
|||
continue;
|
||||
}
|
||||
for (auto& tb_data : pdsch.data) {
|
||||
if (tb_data != nullptr) {
|
||||
if (tb_data != nullptr and tb_data->N_bytes == 0) {
|
||||
// TODO: exclude retx from packing
|
||||
ue_db[rnti]->generate_pdu(tb_data, pdsch.sch.grant.tb->tbs / 8);
|
||||
|
||||
|
|
|
@ -105,6 +105,21 @@ dl_harq_proc::dl_harq_proc(uint32_t id_, uint32_t nprb) :
|
|||
harq_proc(id_), softbuffer(harq_softbuffer_pool::get_instance().get_tx(nprb)), pdu(srsran::make_byte_buffer())
|
||||
{}
|
||||
|
||||
bool dl_harq_proc::new_tx(slot_point slot_tx,
|
||||
slot_point slot_ack,
|
||||
const prb_grant& grant,
|
||||
uint32_t mcs,
|
||||
uint32_t tbs,
|
||||
uint32_t max_retx)
|
||||
{
|
||||
if (harq_proc::new_tx(slot_tx, slot_ack, grant, mcs, tbs, max_retx)) {
|
||||
softbuffer->reset();
|
||||
pdu->clear();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
harq_entity::harq_entity(uint32_t nprb, uint32_t nof_harq_procs)
|
||||
{
|
||||
// Create HARQs
|
||||
|
|
Loading…
Reference in New Issue