Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangjie
OpenXG-RAN
Commits
bbf6d514
Commit
bbf6d514
authored
Aug 06, 2020
by
Haruki NAOI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean PRE_SCD_THREAD build option. FairRR scheduler always use Pre_Scheduler.
parent
e6e9ea28
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
91 deletions
+71
-91
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+0
-1
cmake_targets/build_oai
cmake_targets/build_oai
+0
-1
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler.c
+8
-12
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+38
-42
openair2/LAYER2/MAC/mac_extern.h
openair2/LAYER2/MAC/mac_extern.h
+0
-3
openair2/LAYER2/MAC/mac_proto.h
openair2/LAYER2/MAC/mac_proto.h
+1
-2
openair2/RRC/LTE/rrc_proto.h
openair2/RRC/LTE/rrc_proto.h
+0
-2
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+6
-7
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+1
-5
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+17
-16
No files found.
cmake_targets/CMakeLists.txt
View file @
bbf6d514
...
...
@@ -633,7 +633,6 @@ add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchang
add_boolean_option
(
UE_EXPANSION False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
PHY_TX_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
PRE_SCD_THREAD False
"enable UE_EXPANSION with max 256 UE"
)
add_boolean_option
(
UESIM_EXPANSION False
"enable UESIM_EXPANSION with max 256 UE"
)
add_boolean_option
(
PHY_RM False
"enable PHY_RM with phy resource management"
)
add_boolean_option
(
UDP_1MS False
"enable using UDP socket for VNF-PNF interface"
)
...
...
cmake_targets/build_oai
View file @
bbf6d514
...
...
@@ -504,7 +504,6 @@ function main() {
echo
"set ( PHY_RM
$PHY_RM
)"
>>
$cmake_file
echo
"set ( UDP_1MS
$UDP_1MS
)"
>>
$cmake_file
echo
"set ( PHYSIM
$PHYSIM
)"
>>
$cmake_file
echo
"set ( PRE_SCD_THREAD True )"
>>
$cmake_file
echo
"set ( UESIM_EXPANSION
$UESIM_EXPANSION
)"
>>
$cmake_file
echo
"set ( RRC_ASN1_VERSION
\"
${
REL
}
\"
)"
>>
$cmake_file
echo
"set ( ENABLE_VCD_FIFO
$VCD_TIMING
)"
>>
$cmake_file
...
...
openair2/LAYER2/MAC/eNB_scheduler.c
View file @
bbf6d514
...
...
@@ -588,6 +588,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t
frameP
,
sub_frame_t
subframeP
)
{
protocol_ctxt_t
ctxt
;
int
mbsfn_status
[
MAX_NUM_CCs
];
int
CC_id
=
0
;
int
UE_id
=
-
1
;
...
...
@@ -622,13 +623,12 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
}
#if (!defined(PRE_SCD_THREAD))
if
(
eNB
->
scheduler_mode
==
SCHED_MODE_DEFAULT
)
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
module_idP
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frameP
,
subframeP
,
module_idP
);
pdcp_run
(
&
ctxt
);
rrc_rx_tx
(
&
ctxt
,
CC_id
);
}
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
...
...
@@ -787,11 +787,7 @@ void update_ue_timers(module_id_t module_idP,frame_t frameP, sub_frame_t subfram
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_pdu_bytes
,
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_num_pdus
,
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
total_rbs_used
,
#if defined(PRE_SCD_THREAD)
dl_buffer_total
[
CC_id
][
UE_id
],
#else
0
,
#endif
eNB
->
scheduler_mode
==
SCHED_MODE_DEFAULT
?
0
:
dl_buffer_total
[
CC_id
][
UE_id
],
UE_scheduling_control
->
first_cnt
[
CC_id
],
UE_scheduling_control
->
ret_cnt
[
CC_id
],
UE_scheduling_control
->
aperiodic_ri_received
[
CC_id
]
...
...
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
View file @
bbf6d514
...
...
@@ -61,12 +61,9 @@ int last_dlsch_ue_id_volte[MAX_NUM_CCs] = {-1};
int
last_ulsch_ue_id
[
MAX_NUM_CCs
]
=
{
-
1
};
int
last_ulsch_ue_id_volte
[
MAX_NUM_CCs
]
=
{
-
1
};
#if defined(PRE_SCD_THREAD)
uint64_t
dl_buffer_total
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
boolean_t
pre_scd_activeUE
[
NUMBER_OF_UE_MAX
];
eNB_UE_STATS
pre_scd_eNB_UE_stats
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
#endif
uint64_t
dl_buffer_total
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
boolean_t
pre_scd_activeUE
[
NUMBER_OF_UE_MAX
];
eNB_UE_STATS
pre_scd_eNB_UE_stats
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
#define DEBUG_eNB_SCHEDULER 1
#define DEBUG_HEADER_PARSING 1
...
...
@@ -86,7 +83,7 @@ void set_dl_ue_select_msg4(int CC_idP, uint16_t nb_rb, int UE_id, rnti_t rnti) {
dlsch_ue_select
[
CC_idP
].
list
[
dlsch_ue_select
[
CC_idP
].
ue_num
].
rnti
=
rnti
;
dlsch_ue_select
[
CC_idP
].
ue_num
++
;
}
#if defined(PRE_SCD_THREAD)
inline
uint16_t
search_rbs_required
(
uint16_t
mcs
,
uint64_t
len
,
uint32_t
NB_RB
,
uint16_t
step_size
)
{
uint16_t
nb_rb
,
i_TBS
,
TBS
;
i_TBS
=
get_I_TBS
(
mcs
);
...
...
@@ -193,7 +190,6 @@ int dl_dtch_num;
}
}
#endif
int
cc_id_end
(
uint8_t
*
cc_id_flag
)
{
int
end_flag
=
1
;
...
...
@@ -1038,12 +1034,11 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
// uint16_t r1=0;
uint8_t
CC_id
;
UE_list_t
*
UE_list
=
&
RC
.
mac
[
Mod_id
]
->
UE_list
;
eNB_MAC_INST
*
eNB
=
RC
.
mac
[
Mod_id
];
int
N_RB_DL
;
#if defined(PRE_SCD_THREAD)
eNB_UE_STATS
*
eNB_UE_stats
;
uint16_t
step_size
;
uint64_t
dl_buffer
;
#endif
UE_sched_ctrl_t
*
ue_sched_ctl
;
// int rrc_status = RRC_IDLE;
COMMON_channels_t
*
cc
;
...
...
@@ -1098,13 +1093,13 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
}
}
#if (!defined(PRE_SCD_THREAD))
if
(
eNB
->
scheduler_mode
==
SCHED_MODE_DEFAULT
)
{
// Store the DLSCH buffer for each logical channel
store_dlsch_buffer
(
Mod_id
,
0
,
frameP
,
subframeP
);
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
assign_rbs_required
(
Mod_id
,
0
,
frameP
,
subframeP
,
nb_rbs_required
,
min_rb_unit
);
#else
}
else
if
(
eNB
->
scheduler_mode
==
SCHED_MODE_FAIR_RR
)
{
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
N_RB_DL
=
to_prb
(
RC
.
mac
[
Mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
if
(
N_RB_DL
==
50
)
{
...
...
@@ -1136,7 +1131,8 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
}
}
}
#endif
}
dlsch_scheduler_pre_ue_select_fairRR
(
Mod_id
,
frameP
,
subframeP
,
mbsfn_flag
,
nb_rbs_required
,
dlsch_ue_select
);
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
average_rbs_per_user
[
CC_id
]
=
0
;
...
...
openair2/LAYER2/MAC/mac_extern.h
View file @
bbf6d514
...
...
@@ -76,12 +76,9 @@ extern uint32_t RRC_CONNECTION_FLAG;
extern
uint8_t
rb_table
[
34
];
#if defined(PRE_SCD_THREAD)
extern
uint64_t
dl_buffer_total
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
extern
boolean_t
pre_scd_activeUE
[
NUMBER_OF_UE_MAX
];
extern
eNB_UE_STATS
pre_scd_eNB_UE_stats
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
#endif
extern
mac_rlc_am_muilist_t
rlc_am_mui
;
extern
SCHEDULER_MODES
global_scheduler_mode
;
...
...
openair2/LAYER2/MAC/mac_proto.h
View file @
bbf6d514
...
...
@@ -1321,12 +1321,11 @@ int32_t get_uldl_offset(int eutra_bandP);
int
l2_init_ue
(
int
eMBMS_active
,
char
*
uecap_xer
,
uint8_t
cba_group_active
,
uint8_t
HO_active
);
void
sort_lcid_priority
(
module_id_t
module_id
,
int
UE_id
,
int
dl_dtch_num
,
int
*
dl_dtch_list
);
#if defined(PRE_SCD_THREAD)
void
pre_scd_nb_rbs_required
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
int
min_rb_unit
[
MAX_NUM_CCs
]);
#endif
/* Slice related functions */
uint16_t
nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
...
...
openair2/RRC/LTE/rrc_proto.h
View file @
bbf6d514
...
...
@@ -352,11 +352,9 @@ void *rrc_enb_process_itti_msg(void *);
\param void *args_p Pointer on arguments to start the task. */
void
*
rrc_enb_task
(
void
*
args_p
);
#if defined(PRE_SCD_THREAD)
/**\brief MAC eNB Pre SCD task.
\param void *args_p Pointer on arguments to start the task. */
void
*
pre_scd_task
(
void
*
args_p
);
#endif
/**\brief RRC UE task.
\param void *args_p Pointer on arguments to start the task. */
...
...
targets/RT/USER/lte-enb.c
View file @
bbf6d514
...
...
@@ -226,13 +226,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thread_name
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
1
);
#if defined(PRE_SCD_THREAD)
if
(
global_scheduler_mode
==
SCHED_MODE_FAIR_RR
)
{
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
memcpy
(
&
pre_scd_eNB_UE_stats
,
&
RC
.
mac
[
0
]
->
UE_list
.
eNB_UE_stats
,
sizeof
(
eNB_UE_STATS
)
*
MAX_NUM_CCs
*
NUMBER_OF_UE_MAX
);
memcpy
(
&
pre_scd_activeUE
,
&
RC
.
mac
[
0
]
->
UE_list
.
active
,
sizeof
(
boolean_t
)
*
NUMBER_OF_UE_MAX
);
}
#endif
}
if
((
ret
=
pthread_mutex_lock
(
&
eNB
->
UL_INFO_mutex
))
!=
0
)
{
LOG_E
(
PHY
,
"error locking UL_INFO_mutex, return %d
\n
"
,
ret
);
return
-
1
;
...
...
@@ -1520,7 +1521,6 @@ void stop_eNB(int nb_inst) {
}
}
#if defined(PRE_SCD_THREAD)
void
*
pre_scd_task
(
void
*
param
)
{
static
int
eNB_pre_scd_status
;
protocol_ctxt_t
ctxt
;
...
...
@@ -1593,5 +1593,4 @@ void *pre_scd_task( void *param ) {
eNB_pre_scd_status
=
0
;
return
&
eNB_pre_scd_status
;
}
#endif
targets/RT/USER/lte-ru.c
View file @
bbf6d514
...
...
@@ -130,9 +130,7 @@ const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERRO
extern
uint16_t
sf_ahead
;
#if defined(PRE_SCD_THREAD)
void
init_ru_vnf
(
void
);
#endif
void
init_ru_vnf
(
void
);
/*************************************************************/
...
...
@@ -2914,7 +2912,6 @@ void stop_RU(int nb_ru)
//Some of the member of ru pointer is used in pre_scd.
//This funtion is for initializing ru pointer for L2 FAPI simulator.
#if defined(PRE_SCD_THREAD)
void
init_ru_vnf
(
void
)
{
int
ru_id
;
RU_t
*
ru
;
...
...
@@ -2990,7 +2987,6 @@ void init_ru_vnf(void) {
// sleep(1);
LOG_D
(
HW
,
"[lte-softmodem.c] RU threads created
\n
"
);
}
#endif
/* --------------------------------------------------------*/
...
...
targets/RT/USER/lte-softmodem.c
View file @
bbf6d514
...
...
@@ -471,14 +471,15 @@ int restart_L1L2(module_id_t enb_id) {
LOG_I
(
RRC
,
"Re-created task for RRC eNB successfully
\n
"
);
}
#if defined(PRE_SCD_THREAD)
if
(
global_scheduler_mode
==
SCHED_MODE_FAIR_RR
)
{
if
(
itti_create_task
(
TASK_MAC_ENB_PRE_SCD
,
pre_scd_task
,
NULL
)
<
0
)
{
LOG_E
(
MAC
,
"Create task for MAC eNB PreSCD failed
\n
"
);
return
-
1
;
}
else
{
LOG_I
(
RRC
,
"Re-created task for MAC eNB PreSCD successfully
\n
"
);
}
#endif
}
/* pass a reconfiguration request which will configure everything down to
* RC.eNB[i][j]->frame_parms, too */
...
...
@@ -655,13 +656,13 @@ int main( int argc, char **argv ) {
}
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
{
// VNF
#if defined(PRE_SCD_THREAD)
if
(
global_scheduler_mode
==
SCHED_MODE_FAIR_RR
)
{
init_ru_vnf
();
// ru pointer is necessary for pre_scd.
int
rc
;
LOG_I
(
MAC
,
"Creating MAC eNB PreSCD Task
\n
"
);
rc
=
itti_create_task
(
TASK_MAC_ENB_PRE_SCD
,
pre_scd_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for MAC eNB PreSCD failed
\n
"
);
#endif
}
wait_nfapi_init
(
"main?"
);
}
...
...
@@ -694,14 +695,14 @@ int main( int argc, char **argv ) {
printf
(
"Initializing RU threads
\n
"
);
init_RU
(
get_softmodem_params
()
->
rf_config_file
,
get_softmodem_params
()
->
clock_source
,
get_softmodem_params
()
->
timing_source
,
get_softmodem_params
()
->
send_dmrs_sync
);
#if defined(PRE_SCD_THREAD)
if
(
global_scheduler_mode
==
SCHED_MODE_FAIR_RR
)
{
if
(
NFAPI_MODE
==
NFAPI_MONOLITHIC
)
{
int
rc
;
LOG_I
(
MAC
,
"Creating MAC eNB PreSCD Task
\n
"
);
rc
=
itti_create_task
(
TASK_MAC_ENB_PRE_SCD
,
pre_scd_task
,
NULL
);
AssertFatal
(
rc
>=
0
,
"Create task for MAC eNB PreSCD failed
\n
"
);
}
#endif
}
for
(
ru_id
=
0
;
ru_id
<
RC
.
nb_RU
;
ru_id
++
)
{
RC
.
ru
[
ru_id
]
->
rf_map
.
card
=
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment