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
wangwenhui
OpenXG-RAN
Commits
cabff5b7
Commit
cabff5b7
authored
Jul 03, 2020
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix itti issue in memory management
parent
9205b4d0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+10
-2
executables/main-ocp.c
executables/main-ocp.c
+2
-0
No files found.
common/utils/ocp_itti/intertask_interface.cpp
View file @
cabff5b7
...
...
@@ -91,8 +91,16 @@ task_list_t tasks[TASK_MAX];
return
(
EXIT_SUCCESS
);
}
// in the two following functions, the +32 in malloc is there to deal with gcc memory alignment
// because a struct size can be larger than sum(sizeof(struct components))
// We should remove the itti principle of a huge union for all types of messages in paramter "msg_t ittiMsg"
// to use a more C classical pointer casting "void * ittiMsg", later casted in the right struct
// but we would have to change all legacy macros, as per this example
// #define S1AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_register_enb_req
// would become
// #define S1AP_REGISTER_ENB_REQ(mSGpTR) (s1ap_register_enb_req) mSGpTR)->ittiMsg
MessageDef
*
itti_alloc_new_message_sized
(
task_id_t
origin_task_id
,
MessagesIds
message_id
,
MessageHeaderSize
size
)
{
MessageDef
*
temp
=
(
MessageDef
*
)
itti_malloc
(
origin_task_id
,
TASK_UNKNOWN
,
sizeof
(
MessageHeader
)
+
size
);
MessageDef
*
temp
=
(
MessageDef
*
)
itti_malloc
(
origin_task_id
,
TASK_UNKNOWN
,
sizeof
(
MessageHeader
)
+
32
+
size
);
temp
->
ittiMsgHeader
.
messageId
=
message_id
;
temp
->
ittiMsgHeader
.
originTaskId
=
origin_task_id
;
temp
->
ittiMsgHeader
.
ittiMsgSize
=
size
;
...
...
@@ -100,7 +108,7 @@ task_list_t tasks[TASK_MAX];
}
MessageDef
*
itti_alloc_new_message
(
task_id_t
origin_task_id
,
MessagesIds
message_id
)
{
int
size
=
sizeof
(
MessageHeader
)
+
messages_info
[
message_id
].
size
;
int
size
=
sizeof
(
MessageHeader
)
+
32
+
messages_info
[
message_id
].
size
;
MessageDef
*
temp
=
(
MessageDef
*
)
itti_malloc
(
origin_task_id
,
TASK_UNKNOWN
,
size
);
temp
->
ittiMsgHeader
.
messageId
=
message_id
;
temp
->
ittiMsgHeader
.
originTaskId
=
origin_task_id
;
...
...
executables/main-ocp.c
View file @
cabff5b7
...
...
@@ -80,6 +80,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int
split73
;
char
*
split73_config
;
int
split73
;
int
usrp_tx_thread
=
0
;
static
void
*
ru_thread
(
void
*
param
);
void
kill_RU_proc
(
RU_t
*
ru
)
{
...
...
@@ -1152,6 +1153,7 @@ int restart_L1L2(module_id_t enb_id) {
}
int
main
(
int
argc
,
char
**
argv
)
{
//mtrace();
int
i
;
int
CC_id
=
0
;
int
node_type
=
ngran_eNB
;
...
...
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