Bug-fix DoSchedUlTriggerReq of all schedulers: remove UEs discared for CQI=0 from the allocation map used to retrieve info when processing PUSCH CQIs
--- a/src/lte/model/fdbet-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/fdbet-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1515,6 +1515,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1539,7 +1540,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1634,6 +1635,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/fdmt-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/fdmt-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1494,6 +1494,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1518,7 +1519,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1613,6 +1614,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/fdtbfq-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/fdtbfq-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1745,6 +1745,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1769,7 +1770,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1864,6 +1865,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/lte-enb-mac.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/lte-enb-mac.cc Fri May 24 12:30:04 2013 +0200
@@ -541,7 +541,7 @@
// --- UPLINK ---
// Send UL-CQI info to the scheduler
- std::vector <FfMacSchedSapProvider::SchedUlCqiInfoReqParameters>::iterator itCqi;
+ std::vector <FfMacSchedSapProvider::SchedUlCqiInfoReqParameters>::iterator itCqi;
for (uint16_t i = 0; i < m_ulCqiReceived.size (); i++)
{
if (subframeNo>1)
@@ -636,6 +636,10 @@
{
NS_LOG_DEBUG (this << " eNB rxed an PUSCH UL-CQI");
}
+ else if (ulcqi.m_ulCqi.m_type == UlCqi_s::SRS)
+ {
+ NS_LOG_DEBUG (this << " eNB rxed an SRS UL-CQI");
+ }
m_ulCqiReceived.push_back (ulcqi);
}
--- a/src/lte/model/pf-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/pf-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1538,6 +1538,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1562,7 +1563,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1657,6 +1658,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
@@ -1889,6 +1896,7 @@
break;
case UlCqi_s::SRS:
{
+ NS_LOG_DEBUG (this << " Collect SRS CQIs of Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf));
// get the RNTI from vendor specific parameters
uint16_t rnti = 0;
NS_ASSERT (params.m_vendorSpecificList.size () > 0);
--- a/src/lte/model/pss-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/pss-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1843,6 +1843,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1867,7 +1868,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1962,6 +1963,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/rr-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/rr-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1217,8 +1217,7 @@
void
RrFfMacScheduler::DoSchedUlTriggerReq (const struct FfMacSchedSapProvider::SchedUlTriggerReqParameters& params)
{
- NS_LOG_FUNCTION (this << " Ul - Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf));
-
+ NS_LOG_FUNCTION (this << " UL - Frame no. " << (params.m_sfnSf >> 4) << " subframe no. " << (0xF & params.m_sfnSf) << " size " << params.m_ulInfoList.size ());
RefreshUlCqiMaps ();
@@ -1241,6 +1240,7 @@
if (rbgAllocationMap.at (i) != 0)
{
rbMap.at (i) = true;
+ NS_LOG_DEBUG (this << " Allocated for RACH " << i);
}
}
@@ -1401,6 +1401,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1486,7 +1487,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
- NS_LOG_INFO (this << " UE discarded for CQI = 0");
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/tdbet-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/tdbet-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1438,6 +1438,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1462,7 +1463,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1557,6 +1558,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/tdmt-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/tdmt-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1434,6 +1434,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1458,7 +1459,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1553,6 +1554,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/tdtbfq-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/tdtbfq-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1531,6 +1531,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1555,7 +1556,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1650,6 +1651,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);
--- a/src/lte/model/tta-ff-mac-scheduler.cc Tue May 21 17:48:08 2013 +0200
+++ b/src/lte/model/tta-ff-mac-scheduler.cc Fri May 24 12:30:04 2013 +0200
@@ -1513,6 +1513,7 @@
if ((itRnti != rntiAllocated.end ())||((*it).second == 0))
{
// UE already allocated for UL-HARQ -> skip it
+ NS_LOG_DEBUG (this << " UE already allocated in HARQ -> discared, RNTI " << (*it).first);
it++;
if (it == m_ceBsrRxed.end ())
{
@@ -1537,7 +1538,7 @@
uldci.m_rnti = (*it).first;
uldci.m_rbLen = rbPerFlow;
bool allocated = false;
- NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow);
+ NS_LOG_INFO (this << " RB Allocated " << rbAllocated << " rbPerFlow " << rbPerFlow << " flows " << nflows);
while ((!allocated)&&((rbAllocated + rbPerFlow - 1) < m_cschedCellConfig.m_ulBandwidth) && (rbPerFlow != 0))
{
// check availability
@@ -1632,6 +1633,12 @@
// restart from the first
it = m_ceBsrRxed.begin ();
}
+ NS_LOG_DEBUG (this << " UE discared for CQI=0, RNTI " << uldci.m_rnti);
+ // remove UE from allocation map
+ for (uint16_t i = uldci.m_rbStart; i < uldci.m_rbStart + uldci.m_rbLen; i++)
+ {
+ rbgAllocationMap.at (i) = 0;
+ }
continue; // CQI == 0 means "out of range" (see table 7.2.3-1 of 36.213)
}
uldci.m_mcs = m_amc->GetMcsFromCqi (cqi);