Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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-RAN
Commits
0c0e7b6e
Commit
0c0e7b6e
authored
May 21, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify control flow
parent
bd041a34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
25 deletions
+3
-25
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+2
-20
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
.../ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
+1
-5
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
0c0e7b6e
...
@@ -1472,24 +1472,6 @@ void flexran_agent_slice_update(mid_t mod_id)
...
@@ -1472,24 +1472,6 @@ void flexran_agent_slice_update(mid_t mod_id)
flexran_agent_read_slice_ul_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
ul
[
i
]);
flexran_agent_read_slice_ul_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
ul
[
i
]);
}
}
/* in case we tried to add a slice and it failed (e.g. due to high sum
* percentage being too high), revert to the correct number of slices.
* Also, do not write if we try the last time */
if
(
perform_slice_config_update_count
==
1
)
{
if
(
slice_config
[
mod_id
]
->
n_dl
!=
sc_update
[
mod_id
]
->
n_dl
)
{
sc_update
[
mod_id
]
->
n_dl
=
slice_config
[
mod_id
]
->
n_dl
;
LOG_W
(
FLEXRAN_AGENT
,
"[%d] reverting to original number of %ld DL slices
\n
"
,
mod_id
,
sc_update
[
mod_id
]
->
n_dl
);
}
if
(
slice_config
[
mod_id
]
->
n_ul
!=
sc_update
[
mod_id
]
->
n_ul
)
{
sc_update
[
mod_id
]
->
n_ul
=
slice_config
[
mod_id
]
->
n_ul
;
LOG_W
(
FLEXRAN_AGENT
,
"[%d] reverting to original number of %ld UL slices
\n
"
,
mod_id
,
sc_update
[
mod_id
]
->
n_ul
);
}
pthread_mutex_unlock
(
&
sc_update_mtx
);
return
;
}
/********* write new config *********/
/********* write new config *********/
/* check for removal (sc_update[X]->dl[Y].percentage == 0)
/* check for removal (sc_update[X]->dl[Y].percentage == 0)
* and update sc_update & slice_config accordingly */
* and update sc_update & slice_config accordingly */
...
@@ -1499,22 +1481,22 @@ void flexran_agent_slice_update(mid_t mod_id)
...
@@ -1499,22 +1481,22 @@ void flexran_agent_slice_update(mid_t mod_id)
for
(
i
=
slice_config
[
mod_id
]
->
n_dl
;
i
<
sc_update
[
mod_id
]
->
n_dl
;
i
++
)
{
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
);
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
);
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
++
)
{
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
);
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
);
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
]);
}
}
for
(
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_dl
;
i
++
)
{
for
(
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_dl
;
i
++
)
{
changes
+=
apply_new_slice_dl_config
(
mod_id
,
changes
+=
apply_new_slice_dl_config
(
mod_id
,
slice_config
[
mod_id
]
->
dl
[
i
],
slice_config
[
mod_id
]
->
dl
[
i
],
sc_update
[
mod_id
]
->
dl
[
i
]);
sc_update
[
mod_id
]
->
dl
[
i
]);
flexran_agent_read_slice_dl_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
dl
[
i
]);
}
}
for
(
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_ul
;
i
++
)
{
for
(
i
=
0
;
i
<
slice_config
[
mod_id
]
->
n_ul
;
i
++
)
{
changes
+=
apply_new_slice_ul_config
(
mod_id
,
changes
+=
apply_new_slice_ul_config
(
mod_id
,
slice_config
[
mod_id
]
->
ul
[
i
],
slice_config
[
mod_id
]
->
ul
[
i
],
sc_update
[
mod_id
]
->
ul
[
i
]);
sc_update
[
mod_id
]
->
ul
[
i
]);
flexran_agent_read_slice_ul_config
(
mod_id
,
i
,
slice_config
[
mod_id
]
->
ul
[
i
]);
}
}
if
(
n_ue_slice_assoc_updates
>
0
)
{
if
(
n_ue_slice_assoc_updates
>
0
)
{
changes
+=
apply_ue_slice_assoc_update
(
mod_id
);
changes
+=
apply_ue_slice_assoc_update
(
mod_id
);
...
...
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac_internal.c
View file @
0c0e7b6e
...
@@ -1365,11 +1365,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup)
...
@@ -1365,11 +1365,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup)
}
}
pthread_mutex_unlock
(
&
sc_update_mtx
);
pthread_mutex_unlock
(
&
sc_update_mtx
);
/* perform the slice configuration reads a couple of times. If there are
perform_slice_config_update_count
=
1
;
* inconsistencies (i.e. the MAC refuses a configuration), we will have a
* couple of warnings because the current configuration and the one in
* sc_update will be diverged */
perform_slice_config_update_count
=
3
;
}
}
int
apply_new_slice_dl_config
(
mid_t
mod_id
,
Protocol__FlexDlSlice
*
oldc
,
Protocol__FlexDlSlice
*
newc
)
int
apply_new_slice_dl_config
(
mid_t
mod_id
,
Protocol__FlexDlSlice
*
oldc
,
Protocol__FlexDlSlice
*
newc
)
...
...
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