Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
openairinterface5G
Commits
bd041a34
Commit
bd041a34
authored
May 20, 2018
by
Robert Schmidt
Browse files
use changed RAN API, set scheduler for new slice
parent
6e5a2f45
Changes
3
Hide whitespace changes
Inline
Side-by-side
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
bd041a34
...
...
@@ -1497,12 +1497,12 @@ void flexran_agent_slice_update(mid_t mod_id)
/* create new DL and UL slices if necessary */
for
(
i
=
slice_config
[
mod_id
]
->
n_dl
;
i
<
sc_update
[
mod_id
]
->
n_dl
;
i
++
)
{
flexran_create_dl_slice
(
mod_id
,
sc_update
[
mod_id
]
->
dl
[
i
]
->
id
,
0
);
flexran_create_dl_slice
(
mod_id
,
sc_update
[
mod_id
]
->
dl
[
i
]
->
id
);
slice_config
[
mod_id
]
->
n_dl
=
flexran_get_num_dl_slices
(
mod_id
);
flexran_agent_read_slice_dl_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
dl
[
i
]);
}
for
(
i
=
slice_config
[
mod_id
]
->
n_ul
;
i
<
sc_update
[
mod_id
]
->
n_ul
;
i
++
)
{
flexran_create_ul_slice
(
mod_id
,
sc_update
[
mod_id
]
->
ul
[
i
]
->
id
,
0
);
flexran_create_ul_slice
(
mod_id
,
sc_update
[
mod_id
]
->
ul
[
i
]
->
id
);
slice_config
[
mod_id
]
->
n_ul
=
flexran_get_num_ul_slices
(
mod_id
);
flexran_agent_read_slice_ul_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
ul
[
i
]);
}
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
bd041a34
...
...
@@ -969,7 +969,7 @@ void flexran_agent_read_slice_dl_config(mid_t mod_id, int slice_idx, Protocol__F
if
(
dl_slice
->
n_sorting
<
1
)
dl_slice
->
sorting
=
NULL
;
dl_slice
->
accounting
=
flexran_get_dl_slice_accounting_policy
(
mod_id
,
slice_idx
);
dl_slice
->
has_accounting
=
1
;
dl_slice
->
scheduler_name
=
flexran_get_dl_slice_scheduler
_name
(
mod_id
,
slice_idx
);
dl_slice
->
scheduler_name
=
flexran_get_dl_slice_scheduler
(
mod_id
,
slice_idx
);
}
void
flexran_agent_read_slice_ul_config
(
mid_t
mod_id
,
int
slice_idx
,
Protocol__FlexUlSlice
*
ul_slice
)
...
...
@@ -1007,7 +1007,7 @@ void flexran_agent_read_slice_ul_config(mid_t mod_id, int slice_idx, Protocol__F
if (ul_slice->n_sorting < 1) ul_slice->sorting = NULL;*/
/*ul_slice->accounting = flexran_get_ul_slice_accounting_policy(mod_id, slice_idx);*/
ul_slice
->
has_accounting
=
0
;
ul_slice
->
scheduler_name
=
flexran_get_ul_slice_scheduler
_name
(
mod_id
,
slice_idx
);
ul_slice
->
scheduler_name
=
flexran_get_ul_slice_scheduler
(
mod_id
,
slice_idx
);
}
void
overwrite_slice_config_dl
(
Protocol__FlexDlSlice
*
exist
,
Protocol__FlexDlSlice
*
update
)
...
...
@@ -1069,10 +1069,12 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli
update
->
id
,
exist
->
accounting
,
update
->
accounting
);
exist
->
accounting
=
update
->
accounting
;
}
if
(
update
->
scheduler_name
&&
strcmp
(
update
->
scheduler_name
,
exist
->
scheduler_name
)
!=
0
)
{
LOG_W
(
FLEXRAN_AGENT
,
"[DL slice %d] ignoring new scheduler name
\"
%s
\"
!
\n
"
,
update
->
id
,
update
->
scheduler_name
);
if
(
!
exist
->
scheduler_name
||
strcmp
(
update
->
scheduler_name
,
exist
->
scheduler_name
)
!=
0
)
{
LOG_I
(
FLEXRAN_AGENT
,
"[DL slice %d] update scheduler: %s -> %s
\n
"
,
update
->
id
,
exist
->
scheduler_name
,
update
->
scheduler_name
);
/* TODO dangerous? */
exist
->
scheduler_name
=
update
->
scheduler_name
;
}
}
...
...
@@ -1135,10 +1137,12 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli
update
->
id
,
exist
->
accounting
,
update
->
accounting
);
exist
->
accounting
=
update
->
accounting
;
}
if
(
update
->
scheduler_name
&&
strcmp
(
update
->
scheduler_name
,
exist
->
scheduler_name
)
!=
0
)
{
LOG_W
(
FLEXRAN_AGENT
,
"[UL slice %d] ignoring new scheduler name
\"
%s
\"
!
\n
"
,
update
->
id
,
update
->
scheduler_name
);
if
(
!
exist
->
scheduler_name
||
strcmp
(
update
->
scheduler_name
,
exist
->
scheduler_name
)
!=
0
)
{
LOG_I
(
FLEXRAN_AGENT
,
"[UL slice %d] update scheduler: %s -> %s
\n
"
,
update
->
id
,
exist
->
scheduler_name
,
update
->
scheduler_name
);
/* TODO dangerous? */
exist
->
scheduler_name
=
update
->
scheduler_name
;
}
}
...
...
@@ -1416,6 +1420,11 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco
flexran_set_dl_slice_accounting_policy
(
mod_id
,
slice_idx
,
newc
->
accounting
);
changes
++
;
}
if
(
!
oldc
->
scheduler_name
||
strcmp
(
oldc
->
scheduler_name
,
newc
->
scheduler_name
)
!=
0
)
{
flexran_set_dl_slice_scheduler
(
mod_id
,
slice_idx
,
newc
->
scheduler_name
);
changes
++
;
}
return
changes
;
}
...
...
@@ -1477,6 +1486,11 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
LOG_W
(
FLEXRAN_AGENT
,
"[%d][UL slice %d] setting the accounting is not supported
\n
"
,
mod_id
,
slice_idx
);
}
if
(
!
oldc
->
scheduler_name
||
strcmp
(
oldc
->
scheduler_name
,
newc
->
scheduler_name
)
!=
0
)
{
flexran_set_ul_slice_scheduler
(
mod_id
,
slice_idx
,
newc
->
scheduler_name
);
changes
++
;
}
return
changes
;
}
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_slice_verification.c
View file @
bd041a34
...
...
@@ -84,8 +84,13 @@ int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls)
}
/* sorting is an enum */
/* accounting is an enum */
if
(
dls
->
scheduler_name
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] setting the scheduler is not allowed
\n
"
,
mod_id
);
if
(
!
dls
->
scheduler_name
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] no scheduler name found
\n
"
,
mod_id
);
return
0
;
}
if
(
strcmp
(
dls
->
scheduler_name
,
"schedule_ue_spec"
)
!=
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] setting the scheduler to something different "
"than schedule_ue_spec is currently not allowed
\n
"
,
mod_id
);
return
0
;
}
...
...
@@ -183,8 +188,13 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls)
}
/* sorting is an enum */
/* accounting is an enum */
if
(
uls
->
scheduler_name
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] setting the scheduler is not allowed
\n
"
,
mod_id
);
if
(
!
uls
->
scheduler_name
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] no scheduler name found
\n
"
,
mod_id
);
return
0
;
}
if
(
strcmp
(
uls
->
scheduler_name
,
"schedule_ulsch_rnti"
)
!=
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"[%d] setting the scheduler to something different "
"than schedule_ulsch_rnti is currently not allowed
\n
"
,
mod_id
);
return
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