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
431ed8bd
Commit
431ed8bd
authored
Aug 05, 2020
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GTPU tunnel data request at PDCP to deliver Uplink traffic over S1-U
parent
e6f20804
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
4 deletions
+41
-4
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
+41
-4
No files found.
openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.c
View file @
431ed8bd
...
...
@@ -394,11 +394,48 @@ static void deliver_sdu_drb(void *_ue, nr_pdcp_entity_t *entity,
{
extern
int
nas_sock_fd
[];
int
len
;
nr_pdcp_ue_t
*
ue
=
_ue
;
MessageDef
*
message_p
;
uint8_t
*
gtpu_buffer_p
;
int
rb_id
;
int
i
;
if
(
IS_SOFTMODEM_NOS1
){
len
=
write
(
nas_sock_fd
[
0
],
buf
,
size
);
if
(
len
!=
size
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
}
else
{
for
(
i
=
0
;
i
<
5
;
i
++
)
{
if
(
entity
==
ue
->
drb
[
i
])
{
rb_id
=
i
+
1
;
goto
rb_found
;
}
}
LOG_E
(
PDCP
,
"%s:%d:%s: fatal, no RB found for ue %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rnti
);
exit
(
1
);
rb_found:
gtpu_buffer_p
=
itti_malloc
(
TASK_PDCP_ENB
,
TASK_GTPV1_U
,
size
+
GTPU_HEADER_OVERHEAD_MAX
);
AssertFatal
(
gtpu_buffer_p
!=
NULL
,
"OUT OF MEMORY"
);
memcpy
(
&
gtpu_buffer_p
[
GTPU_HEADER_OVERHEAD_MAX
],
buf
,
size
);
message_p
=
itti_alloc_new_message
(
TASK_PDCP_ENB
,
GTPV1U_ENB_TUNNEL_DATA_REQ
);
AssertFatal
(
message_p
!=
NULL
,
"OUT OF MEMORY"
);
GTPV1U_ENB_TUNNEL_DATA_REQ
(
message_p
).
buffer
=
gtpu_buffer_p
;
GTPV1U_ENB_TUNNEL_DATA_REQ
(
message_p
).
length
=
size
;
GTPV1U_ENB_TUNNEL_DATA_REQ
(
message_p
).
offset
=
GTPU_HEADER_OVERHEAD_MAX
;
GTPV1U_ENB_TUNNEL_DATA_REQ
(
message_p
).
rnti
=
ue
->
rnti
;
GTPV1U_ENB_TUNNEL_DATA_REQ
(
message_p
).
rab_id
=
rb_id
+
4
;
printf
(
"!!!!!!! deliver_sdu_drb (drb %d) sending message to gtp size %d: "
,
rb_id
,
size
);
//for (i = 0; i < size; i++) printf(" %2.2x", (unsigned char)buf[i]);
printf
(
"
\n
"
);
itti_send_msg_to_task
(
TASK_GTPV1_U
,
INSTANCE_DEFAULT
,
message_p
);
len
=
write
(
nas_sock_fd
[
0
],
buf
,
size
);
if
(
len
!=
size
)
{
LOG_E
(
PDCP
,
"%s:%d:%s: fatal
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
);
exit
(
1
);
}
}
...
...
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