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
spbro
OpenXG-RAN
Commits
19d83ad2
Commit
19d83ad2
authored
Jul 01, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make GTPV1U REQ in one allocation to avoid mem leak at GTP
parent
51a7b7bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
openair2/SDAP/nr_sdap/nr_sdap_entity.c
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+13
-11
No files found.
openair2/SDAP/nr_sdap/nr_sdap_entity.c
View file @
19d83ad2
...
...
@@ -197,18 +197,20 @@ static void nr_sdap_rx_entity(nr_sdap_entity_t *entity,
}
// Pushing SDAP SDU to GTP-U Layer
MessageDef
*
message_p
;
uint8_t
*
gtpu_buffer_p
;
gtpu_buffer_p
=
itti_malloc
(
TASK_PDCP_ENB
,
TASK_GTPV1_U
,
size
+
GTPU_HEADER_OVERHEAD_MAX
-
offset
);
AssertFatal
(
gtpu_buffer_p
!=
NULL
,
"OUT OF MEMORY"
);
memcpy
(
&
gtpu_buffer_p
[
GTPU_HEADER_OVERHEAD_MAX
],
buf
+
offset
,
size
-
offset
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
0
,
GTPV1U_GNB_TUNNEL_DATA_REQ
);
MessageDef
*
message_p
=
itti_alloc_new_message_sized
(
TASK_PDCP_ENB
,
0
,
GTPV1U_GNB_TUNNEL_DATA_REQ
,
sizeof
(
gtpv1u_gnb_tunnel_data_req_t
)
+
size
+
GTPU_HEADER_OVERHEAD_MAX
-
offset
);
AssertFatal
(
message_p
!=
NULL
,
"OUT OF MEMORY"
);
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
).
buffer
=
gtpu_buffer_p
;
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
).
length
=
size
-
offset
;
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
).
offset
=
GTPU_HEADER_OVERHEAD_MAX
;
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
).
rnti
=
rnti
;
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
).
pdusession_id
=
pdusession_id
;
gtpv1u_gnb_tunnel_data_req_t
*
req
=
&
GTPV1U_GNB_TUNNEL_DATA_REQ
(
message_p
);
uint8_t
*
gtpu_buffer_p
=
(
uint8_t
*
)
(
req
+
1
);
memcpy
(
gtpu_buffer_p
+
GTPU_HEADER_OVERHEAD_MAX
,
buf
+
offset
,
size
-
offset
);
req
->
buffer
=
gtpu_buffer_p
;
req
->
length
=
size
-
offset
;
req
->
offset
=
GTPU_HEADER_OVERHEAD_MAX
;
req
->
rnti
=
rnti
;
req
->
pdusession_id
=
pdusession_id
;
LOG_D
(
SDAP
,
"%s() sending message to gtp size %d
\n
"
,
__func__
,
size
-
offset
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
INSTANCE_DEFAULT
,
message_p
);
}
else
{
//nrUE
...
...
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