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
d8c2943f
Commit
d8c2943f
authored
May 19, 2018
by
Robert Schmidt
Browse files
FlexRAN RAN API: slice creation does not set default vals
parent
328a464e
Changes
2
Hide whitespace changes
Inline
Side-by-side
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
d8c2943f
...
...
@@ -1435,35 +1435,13 @@ int flexran_dl_slice_exists(mid_t mod_id, int slice_idx)
return
slice_idx
>=
0
&&
slice_idx
<
RC
.
mac
[
mod_id
]
->
slice_info
.
n_dl
;
}
int
flexran_create_dl_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
,
int
slice_default_values_idx
)
int
flexran_create_dl_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
)
{
if
(
!
mac_is_present
(
mod_id
))
return
-
1
;
if
(
!
flexran_dl_slice_exists
(
mod_id
,
slice_default_values_idx
))
return
-
1
;
int
newidx
=
RC
.
mac
[
mod_id
]
->
slice_info
.
n_dl
;
if
(
newidx
>=
MAX_NUM_SLICES
)
return
-
1
;
++
RC
.
mac
[
mod_id
]
->
slice_info
.
n_dl
;
flexran_set_dl_slice_id
(
mod_id
,
newidx
,
slice_id
);
flexran_set_dl_slice_percentage
(
mod_id
,
newidx
,
flexran_get_dl_slice_percentage
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_isolation
(
mod_id
,
newidx
,
flexran_get_dl_slice_isolation
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_priority
(
mod_id
,
newidx
,
flexran_get_dl_slice_priority
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_position_low
(
mod_id
,
newidx
,
flexran_get_dl_slice_position_low
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_position_high
(
mod_id
,
newidx
,
flexran_get_dl_slice_position_high
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_maxmcs
(
mod_id
,
newidx
,
flexran_get_dl_slice_maxmcs
(
mod_id
,
slice_default_values_idx
));
Protocol__FlexDlSorting
*
sorting
=
NULL
;
int
n
=
flexran_get_dl_slice_sorting
(
mod_id
,
slice_default_values_idx
,
&
sorting
);
flexran_set_dl_slice_sorting
(
mod_id
,
newidx
,
sorting
,
n
);
free
(
sorting
);
flexran_set_dl_slice_accounting_policy
(
mod_id
,
newidx
,
flexran_get_dl_slice_accounting_policy
(
mod_id
,
slice_default_values_idx
));
flexran_set_dl_slice_scheduler_name
(
mod_id
,
newidx
,
flexran_get_dl_slice_scheduler_name
(
mod_id
,
slice_default_values_idx
));
return
newidx
;
}
...
...
@@ -1716,33 +1694,13 @@ int flexran_set_dl_slice_scheduler(mid_t mod_id, int slice_idx, char *name)
return
RC
.
mac
[
mod_id
]
->
slice_info
.
dl
[
slice_idx
].
sched_cb
!=
NULL
;
}
int
flexran_create_ul_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
,
int
slice_default_values_idx
)
int
flexran_create_ul_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
)
{
if
(
!
mac_is_present
(
mod_id
))
return
-
1
;
if
(
!
flexran_ul_slice_exists
(
mod_id
,
slice_default_values_idx
))
return
-
1
;
int
newidx
=
RC
.
mac
[
mod_id
]
->
slice_info
.
n_ul
;
if
(
newidx
>=
MAX_NUM_SLICES
)
return
-
1
;
++
RC
.
mac
[
mod_id
]
->
slice_info
.
n_ul
;
flexran_set_ul_slice_id
(
mod_id
,
newidx
,
slice_id
);
flexran_set_ul_slice_percentage
(
mod_id
,
newidx
,
flexran_get_ul_slice_percentage
(
mod_id
,
slice_default_values_idx
));
/*flexran_set_ul_slice_isolation(mod_id, newidx,
flexran_get_ul_slice_isolation(mod_id, slice_default_values_idx));
flexran_set_ul_slice_priority(mod_id, newidx,
flexran_get_ul_slice_priority(mod_id, slice_default_values_idx));*/
flexran_set_ul_slice_first_rb
(
mod_id
,
newidx
,
flexran_get_ul_slice_first_rb
(
mod_id
,
slice_default_values_idx
));
flexran_set_ul_slice_maxmcs
(
mod_id
,
newidx
,
flexran_get_ul_slice_maxmcs
(
mod_id
,
slice_default_values_idx
));
/*Protocol__FlexUlSorting *sorting = NULL;
int n = flexran_get_ul_slice_sorting(mod_id, slice_default_values_idx, &sorting);
flexran_set_ul_slice_sorting(mod_id, newidx, sorting, n);
free(sorting);*/
/*flexran_set_ul_slice_accounting_policy(mod_id, newidx,
flexran_get_ul_slice_accounting_policy(mod_id, slice_default_values_idx));*/
flexran_set_ul_slice_scheduler_name
(
mod_id
,
newidx
,
flexran_get_ul_slice_scheduler_name
(
mod_id
,
slice_default_values_idx
));
return
newidx
;
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.h
View file @
d8c2943f
...
...
@@ -535,8 +535,8 @@ int flexran_get_num_dl_slices(mid_t mod_id);
/* Query slice existence in DL. Return is boolean value */
int
flexran_dl_slice_exists
(
mid_t
mod_id
,
int
slice_idx
);
/* Create slice in DL
with values from another slice
, returns the new slice index */
int
flexran_create_dl_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
,
int
slice_default_values_idx
);
/* Create slice in DL, returns the new slice index */
int
flexran_create_dl_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
);
/* Finds slice in DL with given slice_id and returns slice index */
int
flexran_find_dl_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
);
/* Remove slice in DL, returns new number of slices or -1 on error */
...
...
@@ -599,8 +599,8 @@ int flexran_get_num_ul_slices(mid_t mod_id);
/* Query slice existence in UL. Return is boolean value */
int
flexran_ul_slice_exists
(
mid_t
mod_id
,
int
slice_idx
);
/* Create slice in UL
with values from another slice
, returns the new slice index */
int
flexran_create_ul_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
,
int
slice_default_values_idx
);
/* Create slice in UL, returns the new slice index */
int
flexran_create_ul_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
);
/* Finds slice in UL with given slice_id and returns slice index */
int
flexran_find_ul_slice
(
mid_t
mod_id
,
slice_id_t
slice_id
);
/* Remove slice in UL */
...
...
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