mirror of https://github.com/PentHertz/srsLTE.git
Fix srsENB DL TCP stalling
This commit is contained in:
parent
f4243656c9
commit
45cae1d1ab
|
@ -254,18 +254,22 @@ uint32_t sched::get_ul_buffer(uint16_t rnti)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* \Warning: This function is not mutexed because it can produce late changes on the buffer state while
|
||||||
|
* the scheduler is already allocating data, resulting in empty grants.
|
||||||
|
* Ideally we would like the scheduler to query the RLC for buffer states in order to get the most updated
|
||||||
|
* buffer state with the minimum overhead. However, the current architecture is designed to be compliant
|
||||||
|
* with the FAPI interface
|
||||||
|
*/
|
||||||
int sched::dl_rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, uint32_t retx_queue)
|
int sched::dl_rlc_buffer_state(uint16_t rnti, uint32_t lc_id, uint32_t tx_queue, uint32_t retx_queue)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock(&mutex);
|
int ret = 0;
|
||||||
int ret = 0;
|
if (ue_db.count(rnti)) {
|
||||||
if (ue_db.count(rnti)) {
|
|
||||||
ue_db[rnti].dl_buffer_state(lc_id, tx_queue, retx_queue);
|
ue_db[rnti].dl_buffer_state(lc_id, tx_queue, retx_queue);
|
||||||
} else {
|
} else {
|
||||||
Error("User rnti=0x%x not found\n", rnti);
|
Error("User rnti=0x%x not found\n", rnti);
|
||||||
ret = -1;
|
ret = -1;
|
||||||
}
|
}
|
||||||
pthread_mutex_unlock(&mutex);
|
return ret;
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int sched::dl_mac_buffer_state(uint16_t rnti, uint32_t ce_code)
|
int sched::dl_mac_buffer_state(uint16_t rnti, uint32_t ce_code)
|
||||||
|
@ -676,10 +680,11 @@ int sched::dl_sched_data(dl_sched_data_t data[MAX_DATA_LIST])
|
||||||
|
|
||||||
int nof_data_elems = 0;
|
int nof_data_elems = 0;
|
||||||
for(std::map<uint16_t, sched_ue>::iterator iter=ue_db.begin(); iter!=ue_db.end(); ++iter) {
|
for(std::map<uint16_t, sched_ue>::iterator iter=ue_db.begin(); iter!=ue_db.end(); ++iter) {
|
||||||
sched_ue *user = (sched_ue*) &iter->second;
|
sched_ue *user = (sched_ue*) &iter->second;
|
||||||
uint16_t rnti = (uint16_t) iter->first;
|
uint16_t rnti = (uint16_t) iter->first;
|
||||||
|
|
||||||
dl_harq_proc *h = dl_metric->get_user_allocation(user);
|
uint32_t data_before = user->get_pending_dl_new_data(current_tti);
|
||||||
|
dl_harq_proc *h = dl_metric->get_user_allocation(user);
|
||||||
srslte_dci_format_t dci_format = user->get_dci_format();
|
srslte_dci_format_t dci_format = user->get_dci_format();
|
||||||
data[nof_data_elems].dci_format = dci_format;
|
data[nof_data_elems].dci_format = dci_format;
|
||||||
|
|
||||||
|
@ -706,10 +711,12 @@ int sched::dl_sched_data(dl_sched_data_t data[MAX_DATA_LIST])
|
||||||
Error("DCI format (%d) not implemented\n", dci_format);
|
Error("DCI format (%d) not implemented\n", dci_format);
|
||||||
}
|
}
|
||||||
if (tbs > 0) {
|
if (tbs > 0) {
|
||||||
log_h->info("SCHED: DL %s rnti=0x%x, pid=%d, mask=0x%x, dci=%d,%d, n_rtx=%d, tbs=%d, buffer=%d, tb_en={%s,%s}\n",
|
log_h->info("SCHED: DL %s rnti=0x%x, pid=%d, mask=0x%x, dci=%d,%d, n_rtx=%d, tbs=%d, buffer=%d/%d, tb_en={%s,%s}\n",
|
||||||
!is_newtx?"retx":"tx", rnti, h->get_id(), h->get_rbgmask(),
|
!is_newtx?"retx":"tx", rnti, h->get_id(), h->get_rbgmask(),
|
||||||
data[nof_data_elems].dci_location.L, data[nof_data_elems].dci_location.ncce, h->nof_retx(0) + h->nof_retx(1),
|
data[nof_data_elems].dci_location.L, data[nof_data_elems].dci_location.ncce, h->nof_retx(0) + h->nof_retx(1),
|
||||||
tbs, user->get_pending_dl_new_data(current_tti), data[nof_data_elems].dci.tb_en[0]?"y":"n",
|
tbs,
|
||||||
|
data_before, user->get_pending_dl_new_data(current_tti),
|
||||||
|
data[nof_data_elems].dci.tb_en[0]?"y":"n",
|
||||||
data[nof_data_elems].dci.tb_en[1]?"y":"n");
|
data[nof_data_elems].dci.tb_en[1]?"y":"n");
|
||||||
nof_data_elems++;
|
nof_data_elems++;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -148,9 +148,7 @@ dl_harq_proc* dl_metric_rr::get_user_allocation(sched_ue *user)
|
||||||
if (pending_data || (h && !h->is_empty())) {
|
if (pending_data || (h && !h->is_empty())) {
|
||||||
#endif
|
#endif
|
||||||
if (nof_users_with_data) {
|
if (nof_users_with_data) {
|
||||||
if (nof_users_with_data == 2) {
|
if ((current_tti%nof_users_with_data) != user->ue_idx) {
|
||||||
}
|
|
||||||
if ((current_tti%nof_users_with_data) != user->ue_idx) {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue