Commit baf5f1ed authored by Raphael Defosseux's avatar Raphael Defosseux

Merge remote-tracking branch 'origin/develop' into develop-nr_cppcheck

parents 94968c14 b63e21b6
......@@ -43,6 +43,7 @@ openairinterface5g
RELEASE NOTES:
v1.1.1 -> November 2019. Bug fix in the TDD Fair Round-Robin scheduler
v1.1.0 -> July 2019. This version adds the following implemented features:
* Experimental support of LTE-M
- Single LTE-M UE attachment, legacy-LTE UE attachment is disabled
......
......@@ -25,7 +25,7 @@
<htmlTabRef>test-05-tm2</htmlTabRef>
<htmlTabName>Test-05MHz-TM2</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<repeatCount>3</repeatCount>
<TestCaseRequestedList>
030201
040101
......@@ -36,7 +36,7 @@
<testCase id="030105">
<class>Initialize_eNB</class>
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
</testCase>
<testCase id="030201">
......
......@@ -28,7 +28,7 @@
<TestCaseRequestedList>
030201
040101
030124 040301 040521 040622 040621 040623 040624 040625 040662 040661 040663 040664 040665 040401 040201 030201
030124 040301 040521 040622 040621 040623 040662 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>test-20-tm1-defSched</htmlTabRef>
<htmlTabName>Test-20MHz-TM1-default-scheduler</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201
040101
030125 040301 040522 040627 040626 040628 040629 040630 040667 040666 040668 040669 040670 040401 040201 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="030125">
<class>Initialize_eNB</class>
<desc>Initialize eNB (TDD/Band40/20MHz/info)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040522">
<class>Ping</class>
<desc>ping (20MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>25</ping_packetloss_threshold>
</testCase>
<testCase id="040626">
<class>Iperf</class>
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(balanced)</desc>
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040627">
<class>Iperf</class>
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(single-ue)</desc>
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040628">
<class>Iperf</class>
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(unbalanced)</desc>
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040629">
<class>Iperf</class>
<desc>iperf (20MHz - DL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040630">
<class>Iperf</class>
<desc>iperf (20MHz - DL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
<testCase id="040666">
<class>Iperf</class>
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(balanced)</desc>
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040667">
<class>Iperf</class>
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(single-ue)</desc>
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040668">
<class>Iperf</class>
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(unbalanced)</desc>
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040669">
<class>Iperf</class>
<desc>iperf (20MHz - UL/TCP)(30 sec)(single-ue)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040670">
<class>Iperf</class>
<desc>iperf (20MHz - UL/TCP)(30 sec)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
</testCase>
</testCaseList>
......@@ -43,7 +43,7 @@
<testCase id="030125">
<class>Initialize_eNB</class>
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
</testCase>
......
......@@ -1969,6 +1969,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
int format_flag;
nfapi_hi_dci0_request_body_t *HI_DCI0_req;
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
int rrc_status;
for ( CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++ ) {
//save ulsch dci number
......@@ -2064,9 +2065,11 @@ void ulsch_scheduler_pre_ue_select_fairRR(
}
UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED))) {
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
first_ue_total[CC_id] [ue_first_num[CC_id]] = 0;
ue_first_num[CC_id]++;
......@@ -2171,10 +2174,12 @@ void ulsch_scheduler_pre_ue_select_fairRR(
int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes;
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
if ( (bytes_to_schedule > 0) || (UE_list->UE_template[CC_id][UE_id].ul_SR > 0) ||
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED)) ) {
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
format_flag = 2;
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
......@@ -2756,19 +2761,25 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
if (status < RRC_CONNECTED)
cqi_req = 0;
else if (UE_sched_ctrl->cqi_req_timer>30) {
else if (UE_sched_ctrl->cqi_received == 1){
LOG_D(MAC,"Clearing CQI request timer\n");
UE_sched_ctrl->cqi_req_flag = 0;
UE_sched_ctrl->cqi_received = 0;
UE_sched_ctrl->cqi_req_timer = 0;
cqi_req = 0;
}else if (UE_sched_ctrl->cqi_req_timer>30) {
cqi_req = 1;
// To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition
if (cc->tdd_Config) {
switch (cc->tdd_Config->subframeAssignment) {
case 1:
if( sched_subframeP == 1 || sched_subframeP == 6 ) cqi_req=0;
if( subframeP == 1 || subframeP == 6 ) cqi_req=0;
break;
case 3:
if( sched_subframeP == 1 ) cqi_req=0;
if( subframeP == 1 ) cqi_req=0;
break;
......@@ -2779,7 +2790,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
}
if(cqi_req == 1) {
UE_sched_ctrl->cqi_req_timer=0;
UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
}
} else
......@@ -2858,6 +2868,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
//store for possible retransmission
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
UE_template->cqi_req[harq_pid] = cqi_req;
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
if (UE_id == UE_list->head)
......@@ -3025,6 +3036,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
//store for possible retransmission
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
UE_template->first_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb;
cqi_req = UE_template->cqi_req[harq_pid];
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
// Cyclic shift for DM RS
cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
......
......@@ -2495,6 +2495,7 @@ UE_is_to_be_scheduled(module_id_t module_idP,
{
UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id];
UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id];
int rrc_status;
// do not schedule UE if UL is not working
if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0)
......@@ -2506,13 +2507,14 @@ UE_is_to_be_scheduled(module_id_t module_idP,
UE_id,
ue_rnti);
rrc_status = mac_eNB_get_rrc_status(module_idP, ue_rnti);
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
UE_template->ul_SR > 0 || // uplink scheduling request
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
(UE_sched_ctl->ul_inactivity_timer > 10 &&
UE_sched_ctl->ul_scheduled == 0 &&
mac_eNB_get_rrc_status(module_idP,
ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED
UE_sched_ctl->ul_scheduled == 0 && rrc_status < RRC_CONNECTED) || // every Frame when not RRC_CONNECTED
(UE_sched_ctl->cqi_req_timer > 300 && rrc_status >= RRC_CONNECTED)) { // cqi req timer expired long ago (do not put too low value)
LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n",
module_idP,
UE_id,
......
......@@ -2014,6 +2014,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) {
UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
return 1;
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer >
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
return -1;
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer <
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
return 1;
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment