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
Michael Black
OpenXG-RAN
Commits
38ace905
Commit
38ace905
authored
4 years ago
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for shared objects beforing setting scheduler
parent
21dcd834
Branches unavailable
2023.w22
2023.w21
2023.w20
2023.w19
2023.w18
2023.w18b
2023.w16
2023.w15
2023.w14
2023.w13
2023.w12
2023.w11
2023.w11b
2023.w10
2023.w10b
2023.w09
2023.w08
2023.w08b
2023.w07
2023.w06
2023.w05
2023.w03
2023.w02
2022.42
2022.41
2022.w51
2022.w50
2022.w49
2022.w48
2022.w47
2022.w46
2022.w45
2022.w43
2022.w42
2022.w42b
2022.w41
2022.w40
2022.w39
2022.w38
2022.w37
2022.w37b
2022.w36
2022.w35
2022.w33
2022.w32
2022.w31
2022.w31b
2022.w30
2022.w29
2022.w26
2022.w25
2022.w24
2022.w24b
2022.w23
2022.w22
2022.w21
2022.w20
2022.w19
2022.w18
2022.w17
2022.w15
2022.w15b
2022.w14a
2022.w13
2022.w13b
2022.w13a
2022.w12
2022.w10
2022.w09
2022.w09b
2022.w08
2022.w08b
2022.w07
2022.w07b
2022.w06
2022.w06a
2022.w05
2022.w05b
2022.w03_hotfix
2022.w03_b
2022.w02
2022.w01
2021.wk46
2021.wk14_a
2021.wk13_d
2021.wk13_c
2021.w51_c
2021.w51_a
2021.w50_a
2021.w49_b
2021.w49_a
2021.w48
2021.w47
2021.w46
2021.w46-powder
2021.w45
2021.w45_b
2021.w44
2021.w43
2021.w42
2021.w37
2021.w36
2021.w35
2021.w34
2021.w33
2021.w32
2021.w31
2021.w30
2021.w29
2021.w28
2021.w27
2021.w26
2021.w25
2021.w24
2021.w23
2021.w22
2021.w20
2021.w19
2021.w18_b
2021.w18_a
2021.w17_b
2021.w16
2021.w15
2021.w14
2021.w13_a
2021.w12
2021.w11
2021.w10
2021.w09
2021.w08
2021.w06
2021.w05
2021.w04
2021.w02
2020.w51_2
2020.w51
2020.w50
2020.w49
2020.w48_2
2020.w48
2020.w47
2020.w46_2
2020.w46
2020.w45_2
2020.w45
2020.w44
2020.w42_2
2020.w42
setparam
flexran-eol
benetel_phase_rotation
benetel_gnb_rel_2.0
benetel_gnb_rel_1.0
benetel_enb_rel_2.0
benetel_enb_rel_1.0
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
24 deletions
+54
-24
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+36
-8
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+8
-8
openair2/ENB_APP/flexran_agent_ran_api.h
openair2/ENB_APP/flexran_agent_ran_api.h
+10
-8
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
38ace905
...
...
@@ -33,6 +33,9 @@
#include "flexran_agent_mac_internal.h"
#include "flexran_agent_mac_slice_verification.h"
extern
SLIST_HEAD
(
flexran_so_handle
,
flexran_agent_so_handle_s
)
flexran_handles
[
NUM_MAX_ENB
];
Protocol__FlexranMessage
*
flexran_agent_generate_diff_mac_stats_report
(
Protocol__FlexranMessage
*
new_message
,
Protocol__FlexranMessage
*
old_message
)
{
...
...
@@ -1025,6 +1028,15 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
}
void
*
search_so
(
mid_t
mod_id
,
char
*
name
)
{
flexran_agent_so_handle_t
*
so
=
NULL
;
SLIST_FOREACH
(
so
,
&
flexran_handles
[
mod_id
],
entries
)
{
if
(
strcmp
(
so
->
name
,
name
)
==
0
)
return
so
->
dl_handle
;
}
return
NULL
;
}
void
update_or_remove_dl
(
mid_t
mod_id
,
Protocol__FlexSlice
*
s
)
{
if
(
s
->
params_case
==
PROTOCOL__FLEX_SLICE__PARAMS__NOT_SET
&&
!
s
->
label
&&
!
s
->
scheduler
)
{
...
...
@@ -1033,8 +1045,12 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) {
if
(
!
rc
)
LOG_W
(
FLEXRAN_AGENT
,
"error while removing slice ID %d
\n
"
,
s
->
id
);
}
else
{
LOG_I
(
FLEXRAN_AGENT
,
"updating DL slice ID %d
\n
"
,
s
->
id
);
const
int
rc
=
flexran_create_dl_slice
(
mod_id
,
s
);
void
*
lib
=
search_so
(
mod_id
,
s
->
scheduler
);
LOG_I
(
FLEXRAN_AGENT
,
"updating DL slice ID %d (library handle %p)
\n
"
,
s
->
id
,
lib
);
const
int
rc
=
flexran_create_dl_slice
(
mod_id
,
s
,
lib
);
if
(
rc
<
0
)
LOG_W
(
FLEXRAN_AGENT
,
"error while update slice ID %d: flexran_create_dl_slice() -> %d
\n
"
,
...
...
@@ -1050,8 +1066,12 @@ void update_or_remove_ul(mid_t mod_id, Protocol__FlexSlice *s) {
if
(
!
rc
)
LOG_W
(
FLEXRAN_AGENT
,
"error while removing slice ID %d
\n
"
,
s
->
id
);
}
else
{
LOG_I
(
FLEXRAN_AGENT
,
"updating UL slice ID %d
\n
"
,
s
->
id
);
const
int
rc
=
flexran_create_ul_slice
(
mod_id
,
s
);
void
*
lib
=
search_so
(
mod_id
,
s
->
scheduler
);
LOG_I
(
FLEXRAN_AGENT
,
"updating UL slice ID %d (library handle %p)
\n
"
,
s
->
id
,
lib
);
const
int
rc
=
flexran_create_ul_slice
(
mod_id
,
s
,
lib
);
if
(
rc
<
0
)
LOG_W
(
FLEXRAN_AGENT
,
"error while updating slice ID %d: flexran_create_ul_slice() -> %d)
\n
"
,
...
...
@@ -1099,8 +1119,12 @@ void apply_update_dl_slice_config(mid_t mod_id, Protocol__FlexSliceDlUlConfig *d
LOG_E
(
FLEXRAN_AGENT
,
"cannot update scheduling algorithm: slice algorithm loaded
\n
"
);
return
;
}
LOG_I
(
FLEXRAN_AGENT
,
"loading DL new scheduling algorithm '%s'
\n
"
,
dl
->
scheduler
);
const
int
rc
=
flexran_set_dl_scheduler
(
mod_id
,
dl
->
scheduler
);
void
*
lib
=
search_so
(
mod_id
,
dl
->
scheduler
);
LOG_I
(
FLEXRAN_AGENT
,
"loading DL new scheduling algorithm '%s' (library handle %p)
\n
"
,
dl
->
scheduler
,
lib
);
const
int
rc
=
flexran_set_dl_scheduler
(
mod_id
,
dl
->
scheduler
,
lib
);
if
(
rc
<
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"error while updating scheduling algorithm: "
...
...
@@ -1147,8 +1171,12 @@ void apply_update_ul_slice_config(mid_t mod_id, Protocol__FlexSliceDlUlConfig *u
LOG_E
(
FLEXRAN_AGENT
,
"cannot update scheduling algorithm: slice algorithm loaded
\n
"
);
return
;
}
LOG_I
(
FLEXRAN_AGENT
,
"loading new UL scheduling algorithm '%s'
\n
"
,
ul
->
scheduler
);
const
int
rc
=
flexran_set_ul_scheduler
(
mod_id
,
ul
->
scheduler
);
void
*
lib
=
search_so
(
mod_id
,
ul
->
scheduler
);
LOG_I
(
FLEXRAN_AGENT
,
"loading new UL scheduling algorithm '%s' (library handle %p)
\n
"
,
ul
->
scheduler
,
lib
);
const
int
rc
=
flexran_set_ul_scheduler
(
mod_id
,
ul
->
scheduler
,
lib
);
if
(
rc
<
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"error while updating scheduling algorithm: "
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
38ace905
...
...
@@ -3116,7 +3116,7 @@ void flexran_set_ue_ul_slice_id(mid_t mod_id, mid_t ue_id, slice_id_t slice_id)
ul
->
move_UE
(
ul
->
slices
,
ue_id
,
idx
);
}
int
flexran_create_dl_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
)
{
int
flexran_create_dl_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
,
void
*
object
)
{
if
(
!
mac_is_present
(
mod_id
))
return
0
;
void
*
params
=
NULL
;
switch
(
s
->
params_case
)
{
...
...
@@ -3133,7 +3133,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
char
*
l
=
s
->
label
?
strdup
(
s
->
label
)
:
NULL
;
void
*
algo
=
&
dl
->
dl_algo
;
// default scheduler
if
(
s
->
scheduler
)
{
algo
=
dlsym
(
NULL
,
s
->
scheduler
);
algo
=
dlsym
(
object
,
s
->
scheduler
);
if
(
!
algo
)
{
free
(
params
);
LOG_E
(
FLEXRAN_AGENT
,
"cannot locate scheduler '%s'
\n
"
,
s
->
scheduler
);
...
...
@@ -3193,7 +3193,7 @@ int flexran_get_num_dl_slices(mid_t mod_id) {
return
RC
.
mac
[
mod_id
]
->
pre_processor_dl
.
slices
->
num
;
}
int
flexran_create_ul_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
)
{
int
flexran_create_ul_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
,
void
*
object
)
{
if
(
!
mac_is_present
(
mod_id
))
return
-
1
;
void
*
params
=
NULL
;
switch
(
s
->
params_case
)
{
...
...
@@ -3210,7 +3210,7 @@ int flexran_create_ul_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
char
*
l
=
s
->
label
?
strdup
(
s
->
label
)
:
NULL
;
void
*
algo
=
&
ul
->
ul_algo
;
// default scheduler
if
(
s
->
scheduler
)
{
algo
=
dlsym
(
NULL
,
s
->
scheduler
);
algo
=
dlsym
(
object
,
s
->
scheduler
);
if
(
!
algo
)
{
free
(
params
);
LOG_E
(
FLEXRAN_AGENT
,
"cannot locate scheduler '%s'
\n
"
,
s
->
scheduler
);
...
...
@@ -3276,9 +3276,9 @@ char *flexran_get_dl_scheduler_name(mid_t mod_id) {
return
RC
.
mac
[
mod_id
]
->
pre_processor_dl
.
dl_algo
.
name
;
}
int
flexran_set_dl_scheduler
(
mid_t
mod_id
,
char
*
sched
)
{
int
flexran_set_dl_scheduler
(
mid_t
mod_id
,
char
*
sched
,
void
*
object
)
{
if
(
!
mac_is_present
(
mod_id
))
return
-
1
;
void
*
d
=
dlsym
(
NULL
,
sched
);
void
*
d
=
dlsym
(
object
,
sched
);
if
(
!
d
)
return
-
2
;
pp_impl_param_t
*
dl_pp
=
&
RC
.
mac
[
mod_id
]
->
pre_processor_dl
;
dl_pp
->
dl_algo
.
unset
(
&
dl_pp
->
dl_algo
.
data
);
...
...
@@ -3292,9 +3292,9 @@ char *flexran_get_ul_scheduler_name(mid_t mod_id) {
return
RC
.
mac
[
mod_id
]
->
pre_processor_ul
.
ul_algo
.
name
;
}
int
flexran_set_ul_scheduler
(
mid_t
mod_id
,
char
*
sched
)
{
int
flexran_set_ul_scheduler
(
mid_t
mod_id
,
char
*
sched
,
void
*
object
)
{
if
(
!
mac_is_present
(
mod_id
))
return
-
1
;
void
*
d
=
dlsym
(
NULL
,
sched
);
void
*
d
=
dlsym
(
object
,
sched
);
if
(
!
d
)
return
-
2
;
pp_impl_param_t
*
ul_pp
=
&
RC
.
mac
[
mod_id
]
->
pre_processor_ul
;
ul_pp
->
ul_algo
.
unset
(
&
ul_pp
->
ul_algo
.
data
);
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
38ace905
...
...
@@ -676,8 +676,9 @@ int flexran_get_ue_ul_slice_id(mid_t mod_id, mid_t ue_id);
/* Set the UL slice for a UE */
void
flexran_set_ue_ul_slice_id
(
mid_t
mod_id
,
mid_t
ue_id
,
slice_id_t
slice_id
);
/* Create slice in DL, returns the new slice index */
int
flexran_create_dl_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
);
/* Create slice in DL, returns the new slice index, object can be shared
* library for the scheduler or NULL */
int
flexran_create_dl_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
,
void
*
object
);
/* Remove slice in DL, returns new number of slices or -1 on error */
int
flexran_remove_dl_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
);
...
...
@@ -691,8 +692,9 @@ void flexran_get_dl_slice(mid_t mod_id,
/* Get the number of slices in DL */
int
flexran_get_num_dl_slices
(
mid_t
mod_id
);
/* Create slice in UL, returns the new slice index */
int
flexran_create_ul_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
);
/* Create slice in UL, returns the new slice index, object can be shared library
* for the scheduler or NULL */
int
flexran_create_ul_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
,
void
*
object
);
/* Remove slice in UL */
int
flexran_remove_ul_slice
(
mid_t
mod_id
,
const
Protocol__FlexSlice
*
s
);
...
...
@@ -708,14 +710,14 @@ int flexran_get_num_ul_slices(mid_t mod_id);
/* Get the name of/Set the DL scheduling algorithm. If slicing is active, this
* corresponds to the default algorithm for slices, otherwise the currently
* used one. */
* used one.
object is a shared object in which to find the scheduler
*/
char
*
flexran_get_dl_scheduler_name
(
mid_t
mod_id
);
int
flexran_set_dl_scheduler
(
mid_t
mod_id
,
char
*
sched
);
int
flexran_set_dl_scheduler
(
mid_t
mod_id
,
char
*
sched
,
void
*
object
);
/* Get the name of/Set the UL scheduler algorithm. Same applies as for the DL
* case */
* case
. object is a shared object in which to find the scheduler
*/
char
*
flexran_get_ul_scheduler_name
(
mid_t
mod_id
);
int
flexran_set_ul_scheduler
(
mid_t
mod_id
,
char
*
sched
);
int
flexran_set_ul_scheduler
(
mid_t
mod_id
,
char
*
sched
,
void
*
object
);
/************************** S1AP **************************/
/* Get the number of MMEs to be connected */
...
...
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