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
30feed86
Commit
30feed86
authored
Jan 26, 2021
by
wangdong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addmod_complete
parent
dc6e10f6
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
509 additions
and
149 deletions
+509
-149
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+1
-0
openair2/ENB_APP/MESSAGES/V2/config_common.proto
openair2/ENB_APP/MESSAGES/V2/config_common.proto
+1
-0
openair2/ENB_APP/flexran_agent_ran_api.c
openair2/ENB_APP/flexran_agent_ran_api.c
+15
-22
openair2/LAYER2/MAC/slicing/slicing.c
openair2/LAYER2/MAC/slicing/slicing.c
+476
-127
openair2/LAYER2/MAC/slicing/slicing.h
openair2/LAYER2/MAC/slicing/slicing.h
+16
-0
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
30feed86
...
@@ -1035,6 +1035,7 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) {
...
@@ -1035,6 +1035,7 @@ void update_or_remove_dl(mid_t mod_id, Protocol__FlexSlice *s) {
}
else
{
}
else
{
LOG_I
(
FLEXRAN_AGENT
,
"updating DL slice ID %d
\n
"
,
s
->
id
);
LOG_I
(
FLEXRAN_AGENT
,
"updating DL slice ID %d
\n
"
,
s
->
id
);
const
int
rc
=
flexran_create_dl_slice
(
mod_id
,
s
);
const
int
rc
=
flexran_create_dl_slice
(
mod_id
,
s
);
//pack
if
(
rc
<
0
){
if
(
rc
<
0
){
LOG_W
(
FLEXRAN_AGENT
,
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
"
,
...
...
openair2/ENB_APP/MESSAGES/V2/config_common.proto
View file @
30feed86
...
@@ -84,6 +84,7 @@ message flex_slice_scn19 {
...
@@ -84,6 +84,7 @@ message flex_slice_scn19 {
optional
uint32
tau
=
7
;
optional
uint32
tau
=
7
;
optional
uint32
delay
=
8
;
optional
uint32
delay
=
8
;
optional
string
type
=
9
;
optional
string
type
=
9
;
optional
uint32
typeid
=
10
;
}
}
...
...
openair2/ENB_APP/flexran_agent_ran_api.c
View file @
30feed86
...
@@ -3142,6 +3142,8 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
...
@@ -3142,6 +3142,8 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
params
=
malloc
(
sizeof
(
scn19_slice_param_t
));
params
=
malloc
(
sizeof
(
scn19_slice_param_t
));
if
(
!
params
)
return
0
;
if
(
!
params
)
return
0
;
((
scn19_slice_param_t
*
)
params
)
->
type
=
s
->
scn19
->
type
;
((
scn19_slice_param_t
*
)
params
)
->
type
=
s
->
scn19
->
type
;
if
(
s
->
scn19
->
has_typeid_
)
((
scn19_slice_param_t
*
)
params
)
->
typeid
=
s
->
scn19
->
typeid_
;
if
(
s
->
scn19
->
has_poshigh
){
if
(
s
->
scn19
->
has_poshigh
){
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
s
->
scn19
->
poslow
;
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
s
->
scn19
->
poslow
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
s
->
scn19
->
poshigh
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
s
->
scn19
->
poshigh
;
...
@@ -3149,7 +3151,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
...
@@ -3149,7 +3151,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
posLow
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
posHigh
=
NULL
;
}
}
if
(
s
->
scn19
->
has_kpsrequired
){
if
(
s
->
scn19
->
kpsreference
){
((
scn19_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
scn19
->
kpsrequired
;
((
scn19_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
scn19
->
kpsrequired
;
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
s
->
scn19
->
kpsreference
;
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
s
->
scn19
->
kpsreference
;
}
else
{
}
else
{
...
@@ -3157,6 +3159,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
...
@@ -3157,6 +3159,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
NULL
;
((
scn19_slice_param_t
*
)
params
)
->
kpsReference
=
NULL
;
}
}
if
(
s
->
scn19
->
has_tau
){
if
(
s
->
scn19
->
has_tau
){
((
scn19_slice_param_t
*
)
params
)
->
kpsRequired
=
s
->
scn19
->
kpsrequired
;
((
scn19_slice_param_t
*
)
params
)
->
tmax
=
s
->
scn19
->
tmax
;
((
scn19_slice_param_t
*
)
params
)
->
tmax
=
s
->
scn19
->
tmax
;
((
scn19_slice_param_t
*
)
params
)
->
logdelta
=
s
->
scn19
->
logdelta
;
((
scn19_slice_param_t
*
)
params
)
->
logdelta
=
s
->
scn19
->
logdelta
;
((
scn19_slice_param_t
*
)
params
)
->
tau
=
s
->
scn19
->
tau
;
((
scn19_slice_param_t
*
)
params
)
->
tau
=
s
->
scn19
->
tau
;
...
@@ -3183,6 +3186,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
...
@@ -3183,6 +3186,7 @@ int flexran_create_dl_slice(mid_t mod_id, const Protocol__FlexSlice *s) {
return
-
15
;
return
-
15
;
}
}
}
}
return
dl
->
addmod_slice
(
dl
->
slices
,
s
->
id
,
l
,
algo
,
params
);
return
dl
->
addmod_slice
(
dl
->
slices
,
s
->
id
,
l
,
algo
,
params
);
}
}
...
@@ -3231,39 +3235,28 @@ void flexran_get_dl_slice(mid_t mod_id,
...
@@ -3231,39 +3235,28 @@ void flexran_get_dl_slice(mid_t mod_id,
protocol__flex_slice_scn19__init
(
slice
->
scn19
);
protocol__flex_slice_scn19__init
(
slice
->
scn19
);
// slice->scn19->has_type = 1;
// slice->scn19->has_type = 1;
slice
->
scn19
->
type
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
type
;
slice
->
scn19
->
type
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
type
;
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
!=
NULL
){
slice
->
scn19
->
typeid_
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
typeid
;
if
(
strcmp
(
slice
->
scn19
->
type
,
"dynamic"
)
==
0
){
slice
->
scn19
->
has_kpsrequired
=
1
;
slice
->
scn19
->
has_kpsrequired
=
1
;
slice
->
scn19
->
kpsrequired
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
;
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
->
has_kpsreference
=
1
;
slice
->
scn19
->
kpsre
quired
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
;
slice
->
scn19
->
kpsre
ference
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsReference
;
}
}
if
(
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posLow
!=
NULL
){
if
(
strcmp
(
slice
->
scn19
->
type
,
"static"
)
==
0
){
slice
->
scn19
->
has_poslow
=
1
;
slice
->
scn19
->
has_poslow
=
1
;
slice
->
scn19
->
poslow
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posLow
;
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
->
has_poshigh
=
1
;
slice
->
scn19
->
poshigh
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
slice
->
scn19
->
poshigh
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
}
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
!=
NULL
){
if
(
strcmp
(
slice
->
scn19
->
type
,
"ondemand"
)
==
0
){
slice
->
scn19
->
has_poshigh
=
1
;
slice
->
scn19
->
has_kpsrequired
=
1
;
slice
->
scn19
->
poshigh
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
posHigh
;
slice
->
scn19
->
kpsrequired
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
kpsRequired
;
}
if
(((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tmax
!=
NULL
){
slice
->
scn19
->
has_tmax
=
1
;
slice
->
scn19
->
has_tmax
=
1
;
slice
->
scn19
->
tmax
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tmax
;
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
->
has_logdelta
=
1
;
slice
->
scn19
->
logdelta
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
logdelta
;
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
->
has_tau
=
1
;
slice
->
scn19
->
tau
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
tau
;
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
->
has_delay
=
1
;
slice
->
scn19
->
delay
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
delay
;
slice
->
scn19
->
delay
=
((
scn19_slice_param_t
*
)
s_
->
algo_data
)
->
delay
;
}
}
...
...
openair2/LAYER2/MAC/slicing/slicing.c
View file @
30feed86
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/slicing/slicing.h
View file @
30feed86
...
@@ -64,6 +64,8 @@ int slicing_get_UE_slice_idx(slice_info_t *si, int UE_id);
...
@@ -64,6 +64,8 @@ int slicing_get_UE_slice_idx(slice_info_t *si, int UE_id);
#define SCN19_SLICING 11
#define SCN19_SLICING 11
/* only four static slices for UL, DL resp. (not enough DCIs) */
/* only four static slices for UL, DL resp. (not enough DCIs) */
#define MAX_STATIC_SLICES 4
#define MAX_STATIC_SLICES 4
#define MAX_DYNAMIC_SLICES 10
#define RB_NUMS 25
typedef
struct
{
typedef
struct
{
uint16_t
posLow
;
uint16_t
posLow
;
uint16_t
posHigh
;
uint16_t
posHigh
;
...
@@ -79,6 +81,8 @@ typedef struct {
...
@@ -79,6 +81,8 @@ typedef struct {
uint16_t
tau
;
uint16_t
tau
;
uint16_t
delay
;
uint16_t
delay
;
}
ondemand_slice_param_t
;
}
ondemand_slice_param_t
;
typedef
struct
{
typedef
struct
{
uint16_t
posLow
;
uint16_t
posLow
;
uint16_t
posHigh
;
uint16_t
posHigh
;
...
@@ -88,8 +92,20 @@ typedef struct {
...
@@ -88,8 +92,20 @@ typedef struct {
uint16_t
logdelta
;
uint16_t
logdelta
;
uint16_t
tau
;
uint16_t
tau
;
uint16_t
delay
;
uint16_t
delay
;
uint16_t
typeid
;
char
*
type
;
char
*
type
;
uint16_t
fexp
;
uint16_t
rbs
;
uint16_t
texp
;
uint16_t
eff
;
}
scn19_slice_param_t
;
}
scn19_slice_param_t
;
typedef
struct
{
uint16_t
fexp
;
uint16_t
rbs
;
uint16_t
texp
;
}
stats_param_t
;
pp_impl_param_t
static_dl_init
(
module_id_t
mod_id
,
int
CC_id
);
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
);
pp_impl_param_t
static_ul_init
(
module_id_t
mod_id
,
int
CC_id
);
...
...
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