Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AIEngine
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
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-AIEngine
Commits
dc6e10f6
Commit
dc6e10f6
authored
Jan 25, 2021
by
wangdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3types
parent
1c47a4ad
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
555 additions
and
11 deletions
+555
-11
1.mp4
1.mp4
+0
-0
ci-scripts/conf_files/enb.conf
ci-scripts/conf_files/enb.conf
+2
-2
openair2/COMMON/platform_constants.h
openair2/COMMON/platform_constants.h
+2
-2
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+6
-2
openair2/ENB_APP/MESSAGES/V2/config_common.proto
openair2/ENB_APP/MESSAGES/V2/config_common.proto
+29
-0
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+86
-0
openair2/LAYER2/MAC/slicing/slicing.c
openair2/LAYER2/MAC/slicing/slicing.c
+391
-5
openair2/LAYER2/MAC/slicing/slicing.h
openair2/LAYER2/MAC/slicing/slicing.h
+39
-0
No files found.
1.mp4
0 → 100644
View file @
dc6e10f6
File added
ci-scripts/conf_files/enb.conf
View file @
dc6e10f6
...
...
@@ -179,7 +179,7 @@ eNBs =
//////////
MME
parameters
:
mme_ip_address
= ( {
ipv4
=
"192.168.174.13
0
"
;
mme_ip_address
= ( {
ipv4
=
"192.168.174.13
6
"
;
ipv6
=
"192:168:30::17"
;
active
=
"yes"
;
preference
=
"ipv4"
;
...
...
@@ -265,7 +265,7 @@ NETWORK_CONTROLLER :
{
FLEXRAN_ENABLED
=
"yes"
;
FLEXRAN_INTERFACE_NAME
=
"ens192"
;
FLEXRAN_IPV4_ADDRESS
=
"192.168.174.13
0
"
;
FLEXRAN_IPV4_ADDRESS
=
"192.168.174.13
6
"
;
FLEXRAN_PORT
=
2210
;
FLEXRAN_CACHE
=
"/mnt/oai_agent_cache"
;
FLEXRAN_AWAIT_RECONF
=
"no"
;
...
...
openair2/COMMON/platform_constants.h
View file @
dc6e10f6
...
...
@@ -84,8 +84,8 @@
#define MAX_eNB 2
#define MAX_gNB 2
#else
#define MAX_MOBILES_PER_ENB
4
#define MAX_MOBILES_PER_ENB_NB_IoT
4
#define MAX_MOBILES_PER_ENB
16
#define MAX_MOBILES_PER_ENB_NB_IoT
16
#define MAX_MOBILES_PER_GNB 2//16
#define MAX_eNB 2
#define MAX_gNB 2
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
dc6e10f6
...
...
@@ -1035,10 +1035,12 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) {
}
else
{
LOG_I
(
FLEXRAN_AGENT
,
"updating DL slice ID %d
\n
"
,
s
->
id
);
const
int
rc
=
flexran_create_dl_slice
(
mod_id
,
s
);
if
(
rc
<
0
)
if
(
rc
<
0
)
{
LOG_W
(
FLEXRAN_AGENT
,
"error while update slice ID %d: flexran_create_dl_slice() -> %d
\n
"
,
"error while update slice ID %d: flexran_create_dl_slice() -> %d
\n
"
,
s
->
id
,
rc
);
}
}
}
...
...
@@ -1073,6 +1075,8 @@ void apply_update_dl_slice_config(mid_t mod_id, Protocol__FlexSliceDlUlConfig *d
/* first update existing slices, then create new. Thus, we go through the
* list twice. First round, if a slice exists, handle and mark as such. Then,
* apply all others in the second round */
printf
(
"Slice Numbers: %d
\n
"
,
dl
->
n_slices
);
LOG_I
(
FLEXRAN_AGENT
,
"Slice Numbers: %d
\n
"
,
dl
->
n_slices
);
if
(
dl
->
n_slices
>
0
)
{
if
(
dl_algo
==
PROTOCOL__FLEX_SLICE_ALGORITHM__None
)
{
LOG_E
(
FLEXRAN_AGENT
,
"cannot update slices: no algorithm loaded
\n
"
);
...
...
openair2/ENB_APP/MESSAGES/V2/config_common.proto
View file @
dc6e10f6
...
...
@@ -65,19 +65,48 @@ enum flex_slice_algorithm {
None
=
0
;
Static
=
1
;
NVS
=
2
;
SCN19
=
3
;
}
enum
flex_slice_type
{
static
=
0
;
ondemand
=
1
;
dynamic
=
2
;
}
message
flex_slice_scn19
{
optional
uint32
kpsRequired
=
1
;
optional
uint32
kpsReference
=
2
;
optional
uint32
posLow
=
3
;
optional
uint32
posHigh
=
4
;
optional
uint32
tmax
=
5
;
optional
uint32
logdelta
=
6
;
optional
uint32
tau
=
7
;
optional
uint32
delay
=
8
;
optional
string
type
=
9
;
}
message
flex_slice_static
{
optional
uint32
posLow
=
1
;
optional
uint32
posHigh
=
2
;
}
message
flex_slice_dynamic
{
optional
uint32
kpsRequired
=
1
;
optional
uint32
kpsReference
=
2
;
}
message
flex_slice
{
optional
uint32
id
=
1
;
optional
string
label
=
2
;
optional
string
scheduler
=
3
;
oneof
params
{
flex_slice_static
static
=
10
;
flex_slice_dynamic
dynamic
=
11
;
flex_slice_scn19
scn19
=
12
;
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
dc6e10f6
...
...
@@ -3020,6 +3020,8 @@ Protocol__FlexSliceAlgorithm flexran_get_dl_slice_algo(mid_t mod_id) {
switch
(
RC
.
mac
[
mod_id
]
->
pre_processor_dl
.
algorithm
)
{
case
STATIC_SLICING
:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__Static
;
case
SCN19_SLICING
:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
;
default:
return
PROTOCOL__FLEX_SLICE_ALGORITHM__None
;
}
...
...
@@ -3035,6 +3037,9 @@ int flexran_set_dl_slice_algo(mid_t mod_id, Protocol__FlexSliceAlgorithm algo) {
case
PROTOCOL__FLEX_SLICE_ALGORITHM__Static
:
mac
->
pre_processor_dl
=
static_dl_init
(
mod_id
,
cc_id
);
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
:
mac
->
pre_processor_dl
=
static_dl_init
(
mod_id
,
cc_id
);
break
;
default:
//如未指定slice算法,则回归原有的调度!
mac
->
pre_processor_dl
.
algorithm
=
0
;
...
...
@@ -3126,6 +3131,43 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
if
(
!
params
)
return
0
;
((
static_slice_param_t
*
)
params
)
->
posLow
=
s
->
static_
->
poslow
;
((
static_slice_param_t
*
)
params
)
->
posHigh
=
s
->
static_
->
poshigh
;
break
;
case
PROTOCOL__FLEX_SLICE__PARAMS_DYNAMIC
:
params
=
malloc
(
sizeof
(
dynamic_slice_param_t
));
if
(
!
params
)
return
0
;
((
dynamic_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
dynamic
->
kpsrequired
;
((
dynamic_slice_param_t
*
)
params
)
->
kpsReference
=
s
->
dynamic
->
kpsreference
;
break
;
case
PROTOCOL__FLEX_SLICE__PARAMS_SCN19
:
params
=
malloc
(
sizeof
(
scn19_slice_param_t
));
if
(
!
params
)
return
0
;
((
scn19_slice_param_t
*
)
params
)
->
type
=
s
->
scn19
->
type
;
if
(
s
->
scn19
->
has_poshigh
){
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
s
->
scn19
->
poslow
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
s
->
scn19
->
poshigh
;
}
else
{
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
NULL
;
}
if
(
s
->
scn19
->
has_kpsrequired
){
((
scn19_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
scn19
->
kpsrequired
;
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
s
->
scn19
->
kpsreference
;
}
else
{
((
scn19_slice_param_t
*
)
params
)
->
kpsRequired
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
NULL
;
}
if
(
s
->
scn19
->
has_tau
){
((
scn19_slice_param_t
*
)
params
)
->
tmax
=
s
->
scn19
->
tmax
;
((
scn19_slice_param_t
*
)
params
)
->
logdelta
=
s
->
scn19
->
logdelta
;
((
scn19_slice_param_t
*
)
params
)
->
tau
=
s
->
scn19
->
tau
;
((
scn19_slice_param_t
*
)
params
)
->
delay
=
s
->
scn19
->
delay
;
}
else
{
((
scn19_slice_param_t
*
)
params
)
->
tmax
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
logdelta
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
tau
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
delay
=
NULL
;
}
break
;
default:
break
;
...
...
@@ -3182,6 +3224,50 @@ void flexran_get_dl_slice(mid_t mod_id,
slice
->
static_
->
has_poshigh
=
1
;
slice
->
static_
->
poshigh
=
((
static_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
slice
->
params_case
=
PROTOCOL__FLEX_SLICE__PARAMS_STATIC
;
break
;
case
PROTOCOL__FLEX_SLICE_ALGORITHM__SCN19
:
slice
->
scn19
=
malloc
(
sizeof
(
Protocol__FlexSliceScn19
));
if
(
!
slice
->
scn19
)
return
;
protocol__flex_slice_scn19__init
(
slice
->
scn19
);
// slice->scn19->has_type = 1;
slice
->
scn19
->
type
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
type
;
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
!=
NULL
){
slice
->
scn19
->
has_kpsrequired
=
1
;
slice
->
scn19
->
kpsrequired
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsReference
!=
NULL
){
slice
->
scn19
->
has_kpsreference
=
1
;
slice
->
scn19
->
kpsrequired
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posLow
!=
NULL
){
slice
->
scn19
->
has_poslow
=
1
;
slice
->
scn19
->
poslow
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posLow
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
!=
NULL
){
slice
->
scn19
->
has_poshigh
=
1
;
slice
->
scn19
->
poshigh
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
!=
NULL
){
slice
->
scn19
->
has_poshigh
=
1
;
slice
->
scn19
->
poshigh
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tmax
!=
NULL
){
slice
->
scn19
->
has_tmax
=
1
;
slice
->
scn19
->
tmax
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tmax
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
logdelta
!=
NULL
){
slice
->
scn19
->
has_logdelta
=
1
;
slice
->
scn19
->
logdelta
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
logdelta
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tau
!=
NULL
){
slice
->
scn19
->
has_tau
=
1
;
slice
->
scn19
->
tau
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tau
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
delay
!=
NULL
){
slice
->
scn19
->
has_delay
=
1
;
slice
->
scn19
->
delay
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
delay
;
}
slice
->
params_case
=
PROTOCOL__FLEX_SLICE__PARAMS_SCN19
;
break
;
default:
break
;
...
...
openair2/LAYER2/MAC/slicing/slicing.c
View file @
dc6e10f6
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/slicing/slicing.h
View file @
dc6e10f6
...
...
@@ -61,14 +61,53 @@ typedef struct slice_info_s {
int
slicing_get_UE_slice_idx
(
slice_info_t
*
si
,
int
UE_id
);
#define STATIC_SLICING 10
#define SCN19_SLICING 11
/* only four static slices for UL, DL resp. (not enough DCIs) */
#define MAX_STATIC_SLICES 4
typedef
struct
{
uint16_t
posLow
;
uint16_t
posHigh
;
}
static_slice_param_t
;
typedef
struct
{
uint16_t
kpsRequired
;
uint16_t
kpsReference
;
}
dynamic_slice_param_t
;
typedef
struct
{
uint16_t
tmax
;
uint16_t
logdelta
;
uint16_t
tau
;
uint16_t
delay
;
}
ondemand_slice_param_t
;
typedef
struct
{
uint16_t
posLow
;
uint16_t
posHigh
;
uint16_t
kpsRequired
;
uint16_t
kpsReference
;
uint16_t
tmax
;
uint16_t
logdelta
;
uint16_t
tau
;
uint16_t
delay
;
char
*
type
;
}
scn19_slice_param_t
;
pp_impl_param_t
static_dl_init
(
module_id_t
mod_id
,
int
CC_id
);
pp_impl_param_t
static_ul_init
(
module_id_t
mod_id
,
int
CC_id
);
// typedef struct {
// /* a slice signals the number of bits Bk to be scheduled to satisfy its delay-threshold */
// uint16_t B_k;
// /* the delay reported by the slice*/
// uint16_t D_k;
// /* SLA requirments of on-demand slices*/
// uint16_t t_k_max;// a long-run maximum resource share
// uint16_t delta_k;// a delay-threshold ∆k
// uint16_t selta_k;// a packet-loss probability
// uint16_t b_exp_k;// an experienced average bit rate b_k
// } ondemand_slice_param_t;
// typedef struct {
// uint16_t kpsRequired;
// uint16_t kpsReference;
// } dynamic_slice_param_t;
#endif
/* __SLICING_H__ */
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