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
promise
OpenXG-RAN
Commits
b049f0c8
Commit
b049f0c8
authored
Dec 14, 2017
by
Navid Nikaein
Committed by
Anta Huang
Dec 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ue stats bugfix for dynamic reconfiguration
parent
d35f52a2
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
207 additions
and
154 deletions
+207
-154
openair2/ENB_APP/enb_app.c
openair2/ENB_APP/enb_app.c
+7
-1
openair2/ENB_APP/flexran_agent.c
openair2/ENB_APP/flexran_agent.c
+15
-9
openair2/ENB_APP/flexran_agent.h
openair2/ENB_APP/flexran_agent.h
+1
-0
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
+79
-68
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
+105
-76
No files found.
openair2/ENB_APP/enb_app.c
View file @
b049f0c8
...
@@ -283,6 +283,7 @@ void *eNB_app_task(void *args_p)
...
@@ -283,6 +283,7 @@ void *eNB_app_task(void *args_p)
#if defined(ENABLE_ITTI)
#if defined(ENABLE_ITTI)
uint32_t
enb_nb
=
1
;
/* Default number of eNB is 1 */
uint32_t
enb_nb
=
1
;
/* Default number of eNB is 1 */
uint32_t
enb_id_start
=
0
;
uint32_t
enb_id_start
=
0
;
uint32_t
enb_i
;
uint32_t
enb_id_end
=
enb_id_start
+
enb_nb
;
uint32_t
enb_id_end
=
enb_id_start
+
enb_nb
;
# if defined(ENABLE_USE_MME)
# if defined(ENABLE_USE_MME)
uint32_t
register_enb_pending
;
uint32_t
register_enb_pending
;
...
@@ -318,7 +319,12 @@ void *eNB_app_task(void *args_p)
...
@@ -318,7 +319,12 @@ void *eNB_app_task(void *args_p)
enb_nb
,
enb_properties_p
->
number
);
enb_nb
,
enb_properties_p
->
number
);
enb_app_start_phy_rrc
(
enb_id_start
,
enb_id_end
);
enb_app_start_phy_rrc
(
enb_id_start
,
enb_id_end
);
#ifdef FLEXRAN_AGENT_SB_IF
for
(
enb_i
=
0
;
enb_i
<
1
;
enb_i
++
){
// To be handled for all of current eNB
flexran_set_enb_vars
(
enb_i
,
RAN_LTE_OAI
);
}
#endif
# if defined(ENABLE_USE_MME)
# if defined(ENABLE_USE_MME)
/* Try to register each eNB */
/* Try to register each eNB */
registered_enb
=
0
;
registered_enb
=
0
;
...
...
openair2/ENB_APP/flexran_agent.c
View file @
b049f0c8
...
@@ -186,15 +186,9 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
...
@@ -186,15 +186,9 @@ pthread_t new_thread(void *(*f)(void *), void *b) {
return
t
;
return
t
;
}
}
int
channel_container_init
=
0
;
void
flexran_agent_reconfigure
(
mid_t
mod_id
){
int
flexran_agent_start
(
mid_t
mod_id
)
{
int
channel_id
;
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
Enb_properties_array_t
*
enb_properties
=
enb_config_get
();
flexran_set_enb_vars
(
mod_id
,
RAN_LTE_OAI
);
flexran_agent
[
mod_id
].
enb_id
=
mod_id
;
/*
/*
* check the configuration
* check the configuration
*/
*/
...
@@ -204,7 +198,7 @@ int flexran_agent_start(mid_t mod_id)
...
@@ -204,7 +198,7 @@ int flexran_agent_start(mid_t mod_id)
}
else
{
}
else
{
strcpy
(
local_cache
,
DEFAULT_FLEXRAN_AGENT_CACHE
);
strcpy
(
local_cache
,
DEFAULT_FLEXRAN_AGENT_CACHE
);
}
}
if
(
enb_properties
->
properties
[
mod_id
]
->
flexran_agent_ipv4_address
!=
0
)
{
if
(
enb_properties
->
properties
[
mod_id
]
->
flexran_agent_ipv4_address
!=
0
)
{
inet_ntop
(
AF_INET
,
&
(
enb_properties
->
properties
[
mod_id
]
->
flexran_agent_ipv4_address
),
in_ip
,
INET_ADDRSTRLEN
);
inet_ntop
(
AF_INET
,
&
(
enb_properties
->
properties
[
mod_id
]
->
flexran_agent_ipv4_address
),
in_ip
,
INET_ADDRSTRLEN
);
}
else
{
}
else
{
...
@@ -220,6 +214,18 @@ int flexran_agent_start(mid_t mod_id)
...
@@ -220,6 +214,18 @@ int flexran_agent_start(mid_t mod_id)
flexran_agent
[
mod_id
].
enb_id
,
flexran_agent
[
mod_id
].
enb_id
,
in_ip
,
in_ip
,
in_port
);
in_port
);
}
int
channel_container_init
=
0
;
int
flexran_agent_start
(
mid_t
mod_id
)
{
int
channel_id
;
flexran_set_enb_vars
(
mod_id
,
RAN_LTE_OAI
);
flexran_agent
[
mod_id
].
enb_id
=
mod_id
;
flexran_agent_reconfigure
(
mod_id
);
/*
/*
* Initialize the channel container
* Initialize the channel container
...
...
openair2/ENB_APP/flexran_agent.h
View file @
b049f0c8
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
/* Initiation and termination of the eNodeB agent */
/* Initiation and termination of the eNodeB agent */
int
flexran_agent_start
(
mid_t
mod_id
);
int
flexran_agent_start
(
mid_t
mod_id
);
int
flexran_agent_stop
(
mid_t
mod_id
);
int
flexran_agent_stop
(
mid_t
mod_id
);
void
flexran_agent_reconfigure
(
mid_t
mod_id
);
/*
/*
* enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller
* enb agent task mainly wakes up the tx thread for periodic and oneshot messages to the controller
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
View file @
b049f0c8
...
@@ -96,9 +96,11 @@ int slicing_strategy = UEID_TO_SLICEID;
...
@@ -96,9 +96,11 @@ int slicing_strategy = UEID_TO_SLICEID;
int
slicing_strategy_current
=
UEID_TO_SLICEID
;
int
slicing_strategy_current
=
UEID_TO_SLICEID
;
// RB share for each slice for past and current time
// RB share for each slice for past and current time
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
float
avg_slice_percentage
=
0
.
25
;
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
1
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage
=
0
;
float
total_slice_percentage
=
0
;
float
total_slice_percentage_current
=
0
;
// MAX MCS for each slice for past and current time
// MAX MCS for each slice for past and current time
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
...
@@ -724,7 +726,23 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
...
@@ -724,7 +726,23 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
int
i
=
0
;
int
i
=
0
;
flexran_agent_mac_create_empty_dl_config
(
mod_id
,
dl_info
);
flexran_agent_mac_create_empty_dl_config
(
mod_id
,
dl_info
);
total_slice_percentage
=
0
;
avg_slice_percentage
=
1
.
0
/
n_active_slices
;
// reset the slice percentage for inactive slices
for
(
i
=
n_active_slices
;
i
<
MAX_NUM_SLICES
;
i
++
)
{
slice_percentage
[
i
]
=
0
;
}
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
if
(
slice_percentage
[
i
]
<
0
){
LOG_W
(
MAC
,
"[eNB %d] frame %d subframe %d:invalid slice %d percentage %d. resetting to zero"
,
mod_id
,
frame
,
subframe
,
i
,
slice_percentage
[
i
]);
slice_percentage
[
i
]
=
0
;
}
total_slice_percentage
+=
slice_percentage
[
i
];
}
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
// Load any updated functions
// Load any updated functions
...
@@ -732,84 +750,77 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
...
@@ -732,84 +750,77 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
slice_sched_dl
[
i
]
=
dlsym
(
NULL
,
dl_scheduler_type
[
i
]);
slice_sched_dl
[
i
]
=
dlsym
(
NULL
,
dl_scheduler_type
[
i
]);
update_dl_scheduler
[
i
]
=
0
;
update_dl_scheduler
[
i
]
=
0
;
update_dl_scheduler_current
[
i
]
=
0
;
update_dl_scheduler_current
[
i
]
=
0
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
total_slice_percentage
+=
slice_percentage
[
i
];
LOG_N
(
MAC
,
"update dl scheduler slice %d
\n
"
,
i
);
LOG_N
(
MAC
,
"update dl scheduler slice %d
\n
"
,
i
);
}
}
// check if the number of slices has changed, and log
if
(
n_active_slices_current
!=
n_active_slices
){
if
((
n_active_slices
>
0
)
&&
(
n_active_slices
<=
MAX_NUM_SLICES
))
{
LOG_N
(
MAC
,
"[eNB %d]frame %d subframe %d: number of active slices has changed: %d-->%d
\n
"
,
mod_id
,
frame
,
subframe
,
n_active_slices_current
,
n_active_slices
);
n_active_slices_current
=
n_active_slices
;
if
(
total_slice_percentage
<=
1
.
0
){
// the new total RB share is within the range
}
else
{
// check if the number of slices has changed, and log
LOG_W
(
MAC
,
"invalid number of slices %d, revert to the previous value %d
\n
"
,
n_active_slices
,
n_active_slices_current
);
if
(
n_active_slices_current
!=
n_active_slices
){
n_active_slices
=
n_active_slices_current
;
if
((
n_active_slices
>
0
)
&&
(
n_active_slices
<=
MAX_NUM_SLICES
))
{
LOG_N
(
MAC
,
"[eNB %d]frame %d subframe %d: number of active DL slices has changed: %d-->%d
\n
"
,
mod_id
,
frame
,
subframe
,
n_active_slices_current
,
n_active_slices
);
n_active_slices_current
=
n_active_slices
;
}
else
{
LOG_W
(
MAC
,
"invalid number of DL slices %d, revert to the previous value %d
\n
"
,
n_active_slices
,
n_active_slices_current
);
n_active_slices
=
n_active_slices_current
;
}
}
}
}
// check if the slice rb share has changed, and log the console
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
]){
// new slice percentage
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
total_slice_percentage_current
,
total_slice_percentage
,
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
total_slice_percentage_current
=
total_slice_percentage
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
}
// check if the slice max MCS, and log the console
if
(
slice_maxmcs_current
[
i
]
!=
slice_maxmcs
[
i
]){
if
((
slice_maxmcs
[
i
]
>=
0
)
&&
(
slice_maxmcs
[
i
]
<
29
)){
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: slice MAX MCS has changed: %d-->%d
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
slice_maxmcs_current
[
i
],
slice_maxmcs
[
i
]);
slice_maxmcs_current
[
i
]
=
slice_maxmcs
[
i
];
}
else
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid slice max mcs %d, revert the previous value %d
\n
"
,
mod_id
,
i
,
slice_maxmcs
[
i
],
slice_maxmcs_current
[
i
]);
slice_maxmcs
[
i
]
=
slice_maxmcs_current
[
i
];
}
}
// check if a new scheduler, and log the console
if
(
update_dl_scheduler_current
[
i
]
!=
update_dl_scheduler
[
i
]){
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: DL scheduler for this slice is updated: %s
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
dl_scheduler_type
[
i
]);
update_dl_scheduler_current
[
i
]
=
update_dl_scheduler
[
i
];
}
// check if the slice rb share has changed, and log the console
}
else
{
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
]){
// here we can correct the values, e.g. reduce proportionally
// if ((slice_percentage[i] >= 0.0) && (slice_percentage[i] <= 1.0)){
// if ((total_slice_percentage - slice_percentage_current[i] + slice_percentage[i]) <= 1.0) {
if
(
n_active_slices
==
n_active_slices_current
){
// total_slice_percentage=total_slice_percentage - slice_percentage_current[i] + slice_percentage[i];
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1
\n
"
,
LOG_N
(
MAC
,
"[eNB %d][SLICE %d] frame %d subframe %d: total percentage %f, slice RB percentage has changed: %f-->%f
\n
"
,
mod_id
,
i
,
mod_id
,
i
,
frame
,
subframe
,
total_slice_percentage
,
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
total_slice_percentage_current
,
total_slice_percentage
);
if
(
slice_percentage
[
i
]
>=
avg_slice_percentage
){
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
slice_percentage
[
i
]
-=
0
.
1
;
total_slice_percentage
-=
0
.
1
;
// } else {
}
// LOG_W(MAC,"[eNB %d][SLICE %d] invalid total RB share (%f->%f), revert the previous value (%f->%f)\n",
// mod_id,i,
// total_slice_percentage,
// total_slice_percentage - slice_percentage_current[i] + slice_percentage[i],
// slice_percentage[i],slice_percentage_current[i]);
// slice_percentage[i]= slice_percentage_current[i];
// }
// } else {
// LOG_W(MAC,"[eNB %d][SLICE %d] invalid slice RB share, revert the previous value (%f->%f)\n",mod_id, i, slice_percentage[i],slice_percentage_current[i]);
// slice_percentage[i]= slice_percentage_current[i];
// }
}
// check if the slice max MCS, and log the console
if
(
slice_maxmcs_current
[
i
]
!=
slice_maxmcs
[
i
]){
if
((
slice_maxmcs
[
i
]
>=
0
)
&&
(
slice_maxmcs
[
i
]
<
29
)){
LOG_N
(
MAC
,
"[eNB %d][SLICE %d] frame %d subframe %d: slice MAX MCS has changed: %d-->%d
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
slice_maxmcs_current
[
i
],
slice_maxmcs
[
i
]);
slice_maxmcs_current
[
i
]
=
slice_maxmcs
[
i
];
}
else
{
}
else
{
// LOG_W(MAC,"[eNB %d][SLICE %d] invalid slice max mcs %d, revert the previous value %d\n",mod_id, i, slice_maxmcs[i],slice_percentage[i]);
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)
\n
"
,
mod_id
,
i
,
slice_maxmcs
[
i
]
=
slice_maxmcs_current
[
i
];
total_slice_percentage_current
,
total_slice_percentage
,
n_active_slices
,
n_active_slices_current
);
n_active_slices
=
n_active_slices_current
;
slice_percentage
[
i
]
=
slice_percentage_current
[
i
];
}
}
}
}
// check if a new scheduler, and log the console
if
(
update_dl_scheduler_current
[
i
]
!=
update_dl_scheduler
[
i
]){
LOG_N
(
MAC
,
"[eNB %d][SLICE %d] frame %d subframe %d: DL scheduler for this slice is updated: %s
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
dl_scheduler_type
[
i
]);
update_dl_scheduler_current
[
i
]
=
update_dl_scheduler
[
i
];
}
// Run each enabled slice-specific schedulers one by one
// Run each enabled slice-specific schedulers one by one
//LOG_N(MAC,"[eNB %d]frame %d subframe %d slice %d: calling the scheduler\n", mod_id, frame, subframe,i);
slice_sched_dl
[
i
](
mod_id
,
i
,
frame
,
subframe
,
mbsfn_flag
,
dl_info
);
slice_sched_dl
[
i
](
mod_id
,
i
,
frame
,
subframe
,
mbsfn_flag
,
dl_info
);
}
}
}
}
uint16_t
flexran_nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
){
uint16_t
flexran_nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
){
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
View file @
b049f0c8
This diff is collapsed.
Click to expand it.
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