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
Michael Black
OpenXG UE
Commits
67f22099
Commit
67f22099
authored
Jun 06, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlexRAN MAC: align allocated memory for lfds
parent
3a1ba61a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
+11
-2
No files found.
openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c
View file @
67f22099
...
@@ -1272,8 +1272,17 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
...
@@ -1272,8 +1272,17 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
lfds700_misc_prng_init
(
&
ps
[
mod_id
]);
lfds700_misc_prng_init
(
&
ps
[
mod_id
]);
int
num_elements
=
RINGBUFFER_SIZE
+
1
;
int
num_elements
=
RINGBUFFER_SIZE
+
1
;
//Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time
//Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time
dl_mac_config_array
[
mod_id
]
=
malloc
(
sizeof
(
struct
lfds700_ringbuffer_element
)
*
num_elements
);
/* lfds700_ringbuffer_init_valid_on_current_logical_core()'s second argument
lfds700_ringbuffer_init_valid_on_current_logical_core
(
&
ringbuffer_state
[
mod_id
],
dl_mac_config_array
[
mod_id
],
num_elements
,
&
ps
[
mod_id
],
NULL
);
* must be aligned to LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES. From the
* documentation: "Heap allocated variables however will by no means be
* correctly aligned and an aligned malloc must be used." Therefore, we use
* posix_memalign */
i
=
posix_memalign
((
void
**
)
&
dl_mac_config_array
[
mod_id
],
LFDS700_PAL_ATOMIC_ISOLATION_IN_BYTES
,
sizeof
(
struct
lfds700_ringbuffer_element
)
*
num_elements
);
AssertFatal
(
i
==
0
,
"posix_memalign(): could not allocate aligned memory for lfds library
\n
"
);
lfds700_ringbuffer_init_valid_on_current_logical_core
(
&
ringbuffer_state
[
mod_id
],
dl_mac_config_array
[
mod_id
],
num_elements
,
&
ps
[
mod_id
],
NULL
);
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
{
if
(
RC
.
mac
&&
RC
.
mac
[
mod_id
])
if
(
RC
.
mac
&&
RC
.
mac
[
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