Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
19d83ad2
Commit
19d83ad2
authored
2 years ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Make GTPV1U REQ in one allocation to avoid mem leak at GTP
parent
51a7b7bd
No related branches found
No related tags found
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1667
integration_2022_wk33
,
!1562
Correctly handle SIGINT/stop signal in nr-softmodem
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+13
-11
13 additions, 11 deletions
openair2/SDAP/nr_sdap/nr_sdap_entity.c
with
13 additions
and
11 deletions
openair2/SDAP/nr_sdap/nr_sdap_entity.c
+
13
−
11
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment