mirror of https://github.com/PentHertz/srsLTE.git
sched - handle the case when the CRC is missing and max retx is reached
This commit is contained in:
parent
ced757a11b
commit
cc369aca1f
|
@ -26,7 +26,8 @@ public:
|
||||||
harq_proc();
|
harq_proc();
|
||||||
void init(uint32_t id);
|
void init(uint32_t id);
|
||||||
void reset(uint32_t tb_idx);
|
void reset(uint32_t tb_idx);
|
||||||
uint32_t get_id() const;
|
|
||||||
|
uint32_t get_id() const { return id; }
|
||||||
bool is_empty() const;
|
bool is_empty() const;
|
||||||
bool is_empty(uint32_t tb_idx) const;
|
bool is_empty(uint32_t tb_idx) const;
|
||||||
|
|
||||||
|
@ -62,6 +63,9 @@ class dl_harq_proc : public harq_proc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
dl_harq_proc();
|
dl_harq_proc();
|
||||||
|
|
||||||
|
void new_tti(tti_point tti_tx_dl);
|
||||||
|
|
||||||
void new_tx(const rbgmask_t& new_mask,
|
void new_tx(const rbgmask_t& new_mask,
|
||||||
uint32_t tb_idx,
|
uint32_t tb_idx,
|
||||||
tti_point tti_tx_dl,
|
tti_point tti_tx_dl,
|
||||||
|
@ -86,6 +90,8 @@ private:
|
||||||
class ul_harq_proc : public harq_proc
|
class ul_harq_proc : public harq_proc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
void new_tti();
|
||||||
|
|
||||||
void new_tx(srsran::tti_point tti, int mcs, int tbs, prb_interval alloc, uint32_t max_retx_, bool is_msg3);
|
void new_tx(srsran::tti_point tti, int mcs, int tbs, prb_interval alloc, uint32_t max_retx_, bool is_msg3);
|
||||||
void new_retx(srsran::tti_point tti_, int* mcs, int* tbs, prb_interval alloc);
|
void new_retx(srsran::tti_point tti_, int* mcs, int* tbs, prb_interval alloc);
|
||||||
bool set_ack(uint32_t tb_idx, bool ack);
|
bool set_ack(uint32_t tb_idx, bool ack);
|
||||||
|
|
|
@ -297,7 +297,7 @@ int sched::dl_sched(uint32_t tti_tx_dl, uint32_t enb_cc_idx, sched_interface::dl
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
tti_point tti_rx = tti_point{tti_tx_dl} - FDD_HARQ_DELAY_UL_MS;
|
tti_point tti_rx = tti_point{tti_tx_dl} - TX_ENB_DELAY;
|
||||||
new_tti(tti_rx);
|
new_tti(tti_rx);
|
||||||
|
|
||||||
// copy result
|
// copy result
|
||||||
|
@ -318,7 +318,7 @@ int sched::ul_sched(uint32_t tti, uint32_t enb_cc_idx, srsenb::sched_interface::
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute scheduling Result for tti_rx
|
// Compute scheduling Result for tti_rx
|
||||||
tti_point tti_rx = tti_point{tti} - FDD_HARQ_DELAY_UL_MS - FDD_HARQ_DELAY_DL_MS;
|
tti_point tti_rx = tti_point{tti} - TX_ENB_DELAY - FDD_HARQ_DELAY_DL_MS;
|
||||||
new_tti(tti_rx);
|
new_tti(tti_rx);
|
||||||
|
|
||||||
// copy result
|
// copy result
|
||||||
|
|
|
@ -686,7 +686,8 @@ void sf_sched::set_dl_data_sched_result(const sf_cch_allocator::alloc_result_t&
|
||||||
// Print Resulting DL Allocation
|
// Print Resulting DL Allocation
|
||||||
fmt::memory_buffer str_buffer;
|
fmt::memory_buffer str_buffer;
|
||||||
fmt::format_to(str_buffer,
|
fmt::format_to(str_buffer,
|
||||||
"SCHED: DL {} rnti=0x{:x}, cc={}, pid={}, mask=0x{:x}, dci=({}, {}), n_rtx={}, tbs={}, buffer={}/{}",
|
"SCHED: DL {} rnti=0x{:x}, cc={}, pid={}, mask=0x{:x}, dci=({}, {}), n_rtx={}, tbs={}, "
|
||||||
|
"buffer={}/{}, tti_tx_dl={}",
|
||||||
is_newtx ? "tx" : "retx",
|
is_newtx ? "tx" : "retx",
|
||||||
user->get_rnti(),
|
user->get_rnti(),
|
||||||
cc_cfg->enb_cc_idx,
|
cc_cfg->enb_cc_idx,
|
||||||
|
@ -697,7 +698,8 @@ void sf_sched::set_dl_data_sched_result(const sf_cch_allocator::alloc_result_t&
|
||||||
dl_harq.nof_retx(0) + dl_harq.nof_retx(1),
|
dl_harq.nof_retx(0) + dl_harq.nof_retx(1),
|
||||||
tbs,
|
tbs,
|
||||||
data_before,
|
data_before,
|
||||||
user->get_requested_dl_bytes(cc_cfg->enb_cc_idx).stop());
|
user->get_requested_dl_bytes(cc_cfg->enb_cc_idx).stop(),
|
||||||
|
get_tti_tx_dl());
|
||||||
logger.info("%s", srsran::to_c_str(str_buffer));
|
logger.info("%s", srsran::to_c_str(str_buffer));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,11 +45,6 @@ void harq_proc::reset(uint32_t tb_idx)
|
||||||
tx_cnt[tb_idx] = 0;
|
tx_cnt[tb_idx] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t harq_proc::get_id() const
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool harq_proc::is_empty() const
|
bool harq_proc::is_empty() const
|
||||||
{
|
{
|
||||||
for (uint32_t i = 0; i < SRSRAN_MAX_TB; ++i) {
|
for (uint32_t i = 0; i < SRSRAN_MAX_TB; ++i) {
|
||||||
|
@ -83,14 +78,7 @@ int harq_proc::set_ack_common(uint32_t tb_idx, bool ack_)
|
||||||
}
|
}
|
||||||
ack_state[tb_idx] = ack_;
|
ack_state[tb_idx] = ack_;
|
||||||
logger->debug("ACK=%d received pid=%d, tb_idx=%d, n_rtx=%d, max_retx=%d", ack_, id, tb_idx, n_rtx[tb_idx], max_retx);
|
logger->debug("ACK=%d received pid=%d, tb_idx=%d, n_rtx=%d, max_retx=%d", ack_, id, tb_idx, n_rtx[tb_idx], max_retx);
|
||||||
if (!ack_ && (n_rtx[tb_idx] + 1 >= max_retx)) {
|
if (ack_) {
|
||||||
logger->info("SCHED: discarding TB=%d pid=%d, tti=%d, maximum number of retx exceeded (%d)",
|
|
||||||
tb_idx,
|
|
||||||
id,
|
|
||||||
tti.to_uint(),
|
|
||||||
max_retx);
|
|
||||||
active[tb_idx] = false;
|
|
||||||
} else if (ack_) {
|
|
||||||
active[tb_idx] = false;
|
active[tb_idx] = false;
|
||||||
}
|
}
|
||||||
return SRSRAN_SUCCESS;
|
return SRSRAN_SUCCESS;
|
||||||
|
@ -161,6 +149,20 @@ dl_harq_proc::dl_harq_proc() : harq_proc()
|
||||||
n_cce = 0;
|
n_cce = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dl_harq_proc::new_tti(tti_point tti_tx_dl)
|
||||||
|
{
|
||||||
|
for (uint32_t tb = 0; tb < SRSRAN_MAX_TB; ++tb) {
|
||||||
|
if (has_pending_retx(tb, tti_tx_dl) and nof_retx(tb) + 1 >= max_nof_retx()) {
|
||||||
|
logger->info("SCHED: discarding DL TB=%d pid=%d, tti=%d, maximum number of retx exceeded (%d)",
|
||||||
|
tb,
|
||||||
|
get_id(),
|
||||||
|
tti.to_uint(),
|
||||||
|
max_retx);
|
||||||
|
active[tb] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void dl_harq_proc::new_tx(const rbgmask_t& new_mask,
|
void dl_harq_proc::new_tx(const rbgmask_t& new_mask,
|
||||||
uint32_t tb_idx,
|
uint32_t tb_idx,
|
||||||
tti_point tti_tx_dl,
|
tti_point tti_tx_dl,
|
||||||
|
@ -225,6 +227,15 @@ void dl_harq_proc::reset_pending_data()
|
||||||
* UE::UL HARQ class *
|
* UE::UL HARQ class *
|
||||||
******************************************************/
|
******************************************************/
|
||||||
|
|
||||||
|
void ul_harq_proc::new_tti()
|
||||||
|
{
|
||||||
|
if (has_pending_retx() and nof_retx(0) + 1 >= max_nof_retx()) {
|
||||||
|
logger->info(
|
||||||
|
"SCHED: discarding UL pid=%d, tti=%d, maximum number of retx exceeded (%d)", get_id(), tti.to_uint(), max_retx);
|
||||||
|
active[0] = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
prb_interval ul_harq_proc::get_alloc() const
|
prb_interval ul_harq_proc::get_alloc() const
|
||||||
{
|
{
|
||||||
return allocation;
|
return allocation;
|
||||||
|
@ -329,6 +340,12 @@ void harq_entity::reset()
|
||||||
void harq_entity::new_tti(tti_point tti_rx)
|
void harq_entity::new_tti(tti_point tti_rx)
|
||||||
{
|
{
|
||||||
last_ttis[tti_rx.to_uint() % last_ttis.size()] = tti_rx;
|
last_ttis[tti_rx.to_uint() % last_ttis.size()] = tti_rx;
|
||||||
|
for (auto& hul : ul_harqs) {
|
||||||
|
hul.new_tti();
|
||||||
|
}
|
||||||
|
for (auto& hdl : dl_harqs) {
|
||||||
|
hdl.new_tti(to_tx_dl(tti_rx));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dl_harq_proc* harq_entity::get_empty_dl_harq(tti_point tti_tx_dl)
|
dl_harq_proc* harq_entity::get_empty_dl_harq(tti_point tti_tx_dl)
|
||||||
|
|
Loading…
Reference in New Issue