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
canghaiwuhen
OpenXG-RAN
Commits
21dcd834
Commit
21dcd834
authored
Sep 10, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save list of SOs used in user plane
parent
65e52fcf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
3 deletions
+80
-3
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+74
-3
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
+6
-0
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
21dcd834
...
...
@@ -66,6 +66,9 @@ int xid = 50;
struct
lfds700_ringbuffer_element
*
ue_assoc_array
[
NUM_MAX_ENB
];
struct
lfds700_ringbuffer_state
ue_assoc_ringbuffer_state
[
NUM_MAX_ENB
];
/* a list of shared objects that are loaded into the user plane */
SLIST_HEAD
(
flexran_so_handle
,
flexran_agent_so_handle_s
)
flexran_handles
[
NUM_MAX_ENB
];
int
flexran_agent_mac_stats_reply_ue
(
mid_t
mod_id
,
Protocol__FlexUeStatsReport
**
ue_report
,
int
n_ue
,
...
...
@@ -1404,6 +1407,8 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
RC
.
mac
[
mod_id
]
->
UE_info
.
eNB_UE_stats
[
UE_PCCID
(
mod_id
,
i
)][
i
].
harq_pid
=
0
;
}
}
SLIST_INIT
(
&
flexran_handles
[
mod_id
]);
}
/***********************************************
...
...
@@ -1902,6 +1907,69 @@ void flexran_agent_slice_update(mid_t mod_id) {
apply_update_dl_slice_config
(
mod_id
,
sc
->
dl
);
apply_update_ul_slice_config
(
mod_id
,
sc
->
ul
);
helper_destroy_mac_slice_config
(
sc
);
flexran_agent_so_handle_t
*
so
=
NULL
;
flexran_agent_so_handle_t
*
prev
=
NULL
;
// the previous to current element, if we delete in order to go back
//SLIST_FOREACH(so, &flexran_handles[mod_id], entries)
for
(
so
=
flexran_handles
[
mod_id
].
slh_first
;
so
;)
{
char
*
name
=
so
->
name
;
int
in_use
=
strcmp
(
flexran_get_dl_scheduler_name
(
mod_id
),
name
)
==
0
||
strcmp
(
flexran_get_ul_scheduler_name
(
mod_id
),
name
)
==
0
;
Protocol__FlexSliceAlgorithm
dl_algo
=
flexran_get_dl_slice_algo
(
mod_id
);
if
(
!
in_use
&&
dl_algo
!=
PROTOCOL__FLEX_SLICE_ALGORITHM__None
)
{
int
n
=
flexran_get_num_dl_slices
(
mod_id
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
Protocol__FlexSlice
s
;
/* NONE so it won't do any allocations */
flexran_get_dl_slice
(
mod_id
,
i
,
&
s
,
PROTOCOL__FLEX_SLICE_ALGORITHM__None
);
if
(
strcmp
(
s
.
scheduler
,
name
)
==
0
)
{
in_use
=
1
;
break
;
}
}
}
Protocol__FlexSliceAlgorithm
ul_algo
=
flexran_get_ul_slice_algo
(
mod_id
);
if
(
!
in_use
&&
ul_algo
!=
PROTOCOL__FLEX_SLICE_ALGORITHM__None
)
{
int
n
=
flexran_get_num_ul_slices
(
mod_id
);
for
(
int
i
=
0
;
i
<
n
;
++
i
)
{
Protocol__FlexSlice
s
;
/* NONE so it won't do any allocations */
flexran_get_ul_slice
(
mod_id
,
i
,
&
s
,
PROTOCOL__FLEX_SLICE_ALGORITHM__None
);
if
(
strcmp
(
s
.
scheduler
,
name
)
==
0
)
{
in_use
=
1
;
break
;
}
}
}
if
(
!
in_use
)
{
char
s
[
512
];
int
rc
=
flexran_agent_map_name_to_delegated_object
(
mod_id
,
so
->
name
,
s
,
512
);
LOG_W
(
FLEXRAN_AGENT
,
"removing %s (library handle %p) since it is not used in the user "
"plane anymore
\n
"
,
s
,
so
->
dl_handle
);
dlclose
(
so
->
dl_handle
);
if
(
rc
<
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"cannot map name %s
\n
"
,
so
->
name
);
}
else
{
int
rc
=
remove
(
s
);
if
(
rc
<
0
)
LOG_E
(
FLEXRAN_AGENT
,
"cannot remove file %s: %s
\n
"
,
s
,
strerror
(
errno
));
}
free
(
so
->
name
);
if
(
!
prev
)
{
//it's the head, start over
SLIST_REMOVE_HEAD
(
&
flexran_handles
[
mod_id
],
entries
);
so
=
flexran_handles
[
mod_id
].
slh_first
;
}
else
{
SLIST_REMOVE
(
&
flexran_handles
[
mod_id
],
so
,
flexran_agent_so_handle_s
,
entries
);
so
=
prev
->
entries
.
sle_next
;
}
}
else
{
prev
=
so
;
so
=
so
->
entries
.
sle_next
;
}
}
}
Protocol__FlexUeConfig
*
ue_config
=
NULL
;
...
...
@@ -1975,7 +2043,10 @@ void flexran_agent_mac_inform_delegation(mid_t mod_id,
* prepare_update_slice_config() takes ownership of the slice config, it is
* freed inside */
/* TODO save dlhandle in list with name. If it has been installed and nothing
* references it after a reconfiguration, free and remove */
flexran_agent_so_handle_t
*
so
=
malloc
(
sizeof
(
flexran_agent_so_handle_t
));
DevAssert
(
so
);
so
->
name
=
strdup
(
cdm
->
name
);
DevAssert
(
so
->
name
);
so
->
dl_handle
=
h
;
SLIST_INSERT_HEAD
(
&
flexran_handles
[
mod_id
],
so
,
entries
);
}
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.h
View file @
21dcd834
...
...
@@ -39,6 +39,12 @@
// for flexran_agent_get_mac_xface()
#include "flexran_agent_extern.h"
/* Type for a list of shared objects used in the user plane (schedulers) */
typedef
struct
flexran_agent_so_handle_s
{
char
*
name
;
// name of the object
void
*
dl_handle
;
// handle of associated objects
SLIST_ENTRY
(
flexran_agent_so_handle_s
)
entries
;
}
flexran_agent_so_handle_t
;
/* Initialization function for the agent structures etc */
void
flexran_agent_init_mac_agent
(
mid_t
mod_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