Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
04154519
Commit
04154519
authored
May 21, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when sending config report, copy slice config to new mem
parent
3832a8f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
3 deletions
+86
-3
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+69
-1
openair2/ENB_APP/flexran_agent_common.c
openair2/ENB_APP/flexran_agent_common.c
+17
-2
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
04154519
...
...
@@ -1540,5 +1540,73 @@ void flexran_agent_slice_update(mid_t mod_id)
Protocol__FlexSliceConfig
*
flexran_agent_get_slice_config
(
mid_t
mod_id
)
{
return
slice_config
[
mod_id
];
if
(
!
slice_config
[
mod_id
])
return
NULL
;
Protocol__FlexSliceConfig
*
config
=
NULL
;
pthread_mutex_lock
(
&
sc_update_mtx
);
config
=
flexran_agent_create_slice_config
(
slice_config
[
mod_id
]
->
n_dl
,
slice_config
[
mod_id
]
->
n_ul
);
if
(
!
config
)
{
pthread_mutex_unlock
(
&
sc_update_mtx
);
return
NULL
;
}
config
->
has_intraslice_share_active
=
1
;
config
->
intraslice_share_active
=
slice_config
[
mod_id
]
->
intraslice_share_active
;
config
->
has_interslice_share_active
=
1
;
config
->
interslice_share_active
=
slice_config
[
mod_id
]
->
interslice_share_active
;
for
(
int
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_dl
;
++
i
)
{
if
(
!
config
->
dl
[
i
])
continue
;
config
->
dl
[
i
]
->
has_id
=
1
;
config
->
dl
[
i
]
->
id
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
id
;
config
->
dl
[
i
]
->
has_label
=
1
;
config
->
dl
[
i
]
->
label
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
label
;
config
->
dl
[
i
]
->
has_percentage
=
1
;
config
->
dl
[
i
]
->
percentage
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
percentage
;
config
->
dl
[
i
]
->
has_isolation
=
1
;
config
->
dl
[
i
]
->
isolation
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
isolation
;
config
->
dl
[
i
]
->
has_priority
=
1
;
config
->
dl
[
i
]
->
priority
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
priority
;
config
->
dl
[
i
]
->
has_position_low
=
1
;
config
->
dl
[
i
]
->
position_low
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
position_low
;
config
->
dl
[
i
]
->
has_position_high
=
1
;
config
->
dl
[
i
]
->
position_high
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
position_high
;
config
->
dl
[
i
]
->
has_maxmcs
=
1
;
config
->
dl
[
i
]
->
maxmcs
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
maxmcs
;
config
->
dl
[
i
]
->
n_sorting
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
n_sorting
;
config
->
dl
[
i
]
->
sorting
=
calloc
(
config
->
dl
[
i
]
->
n_sorting
,
sizeof
(
Protocol__FlexDlSorting
));
if
(
!
config
->
dl
[
i
]
->
sorting
)
config
->
dl
[
i
]
->
n_sorting
=
0
;
for
(
int
j
=
0
;
j
<
config
->
dl
[
i
]
->
n_sorting
;
++
j
)
config
->
dl
[
i
]
->
sorting
[
j
]
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
sorting
[
j
];
config
->
dl
[
i
]
->
has_accounting
=
1
;
config
->
dl
[
i
]
->
accounting
=
slice_config
[
mod_id
]
->
dl
[
i
]
->
accounting
;
config
->
dl
[
i
]
->
scheduler_name
=
strdup
(
slice_config
[
mod_id
]
->
dl
[
i
]
->
scheduler_name
);
}
for
(
int
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_ul
;
++
i
)
{
if
(
!
config
->
ul
[
i
])
continue
;
config
->
ul
[
i
]
->
has_id
=
1
;
config
->
ul
[
i
]
->
id
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
id
;
config
->
ul
[
i
]
->
has_label
=
1
;
config
->
ul
[
i
]
->
label
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
label
;
config
->
ul
[
i
]
->
has_percentage
=
1
;
config
->
ul
[
i
]
->
percentage
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
percentage
;
config
->
ul
[
i
]
->
has_isolation
=
1
;
config
->
ul
[
i
]
->
isolation
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
isolation
;
config
->
ul
[
i
]
->
has_priority
=
1
;
config
->
ul
[
i
]
->
priority
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
priority
;
config
->
ul
[
i
]
->
has_first_rb
=
1
;
config
->
ul
[
i
]
->
first_rb
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
first_rb
;
config
->
ul
[
i
]
->
has_maxmcs
=
1
;
config
->
ul
[
i
]
->
maxmcs
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
maxmcs
;
config
->
ul
[
i
]
->
n_sorting
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
n_sorting
;
config
->
ul
[
i
]
->
sorting
=
calloc
(
config
->
ul
[
i
]
->
n_sorting
,
sizeof
(
Protocol__FlexUlSorting
));
if
(
!
config
->
ul
[
i
]
->
sorting
)
config
->
ul
[
i
]
->
n_sorting
=
0
;
for
(
int
j
=
0
;
j
<
config
->
ul
[
i
]
->
n_sorting
;
++
j
)
config
->
ul
[
i
]
->
sorting
[
j
]
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
sorting
[
j
];
config
->
ul
[
i
]
->
has_accounting
=
1
;
config
->
ul
[
i
]
->
accounting
=
slice_config
[
mod_id
]
->
ul
[
i
]
->
accounting
;
config
->
ul
[
i
]
->
scheduler_name
=
strdup
(
slice_config
[
mod_id
]
->
ul
[
i
]
->
scheduler_name
);
}
pthread_mutex_unlock
(
&
sc_update_mtx
);
return
config
;
}
openair2/ENB_APP/flexran_agent_common.c
View file @
04154519
...
...
@@ -288,11 +288,26 @@ int flexran_agent_destroy_enb_config_reply(Protocol__FlexranMessage *msg) {
free
(
reply
->
cell_config
[
i
]
->
si_config
->
si_message
);
free
(
reply
->
cell_config
[
i
]
->
si_config
);
}
if
(
reply
->
cell_config
[
i
]
->
slice_config
!=
NULL
)
{
for
(
j
=
0
;
j
<
reply
->
cell_config
[
i
]
->
slice_config
->
n_dl
;
++
j
)
{
if
(
reply
->
cell_config
[
i
]
->
slice_config
->
dl
[
j
]
->
n_sorting
>
0
)
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
dl
[
j
]
->
sorting
);
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
dl
[
j
]
->
scheduler_name
);
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
dl
[
j
]);
}
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
dl
);
for
(
j
=
0
;
j
<
reply
->
cell_config
[
i
]
->
slice_config
->
n_ul
;
++
j
)
{
if
(
reply
->
cell_config
[
i
]
->
slice_config
->
ul
[
j
]
->
n_sorting
>
0
)
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
ul
[
j
]
->
sorting
);
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
ul
[
j
]
->
scheduler_name
);
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
ul
[
j
]);
}
free
(
reply
->
cell_config
[
i
]
->
slice_config
->
ul
);
free
(
reply
->
cell_config
[
i
]
->
slice_config
);
}
free
(
reply
->
cell_config
[
i
]);
}
free
(
reply
->
cell_config
);
/* don't free the slice_config, it is maintained internally during
* the liftetime of the agent */
free
(
reply
);
free
(
msg
);
...
...
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