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
Michael Black
OpenXG-RAN
Commits
df45820f
Commit
df45820f
authored
Sep 09, 2022
by
Cedric Roux
Committed by
Raymond Knopp
Nov 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
f1 du: get IP address for UL UP GTP tunnel from the right place
parent
d2f456e0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
18 deletions
+31
-18
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_task.c
+0
-18
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+31
-0
No files found.
openair2/F1AP/f1ap_du_task.c
View file @
df45820f
...
...
@@ -96,15 +96,6 @@ void du_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_dat
AssertFatal
(
result
==
EXIT_SUCCESS
,
"Failed to free memory (%d)!
\n
"
,
result
);
}
static
instance_t
du_create_gtpu_instance_to_cu
(
char
*
CUaddr
,
uint16_t
CUport
,
char
*
DUaddr
,
uint16_t
DUport
)
{
openAddr_t
tmp
=
{
0
};
strncpy
(
tmp
.
originHost
,
DUaddr
,
sizeof
(
tmp
.
originHost
)
-
1
);
strncpy
(
tmp
.
destinationHost
,
CUaddr
,
sizeof
(
tmp
.
destinationHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
DUport
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
CUport
);
return
gtpv1Init
(
tmp
);
}
void
*
F1AP_DU_task
(
void
*
arg
)
{
//sctp_cu_init();
LOG_I
(
F1AP
,
"Starting F1AP at DU
\n
"
);
...
...
@@ -126,15 +117,6 @@ void *F1AP_DU_task(void *arg) {
LOG_I
(
F1AP
,
"DU Task Received F1AP_SETUP_REQ
\n
"
);
f1ap_setup_req_t
*
msgSetup
=&
F1AP_SETUP_REQ
(
msg
);
createF1inst
(
false
,
myInstance
,
msgSetup
);
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
=
du_create_gtpu_instance_to_cu
(
msgSetup
->
CU_f1_ip_address
.
ipv4_address
,
//"172.21.6.9", //"172.21.10.9",//"172.21.9.5", //msgSetup->CU_f1_ip_address.ipv4_address, //"192.168.18.91"
msgSetup
->
CUport
,
msgSetup
->
DU_f1_ip_address
.
ipv4_address
,
msgSetup
->
DUport
);
AssertFatal
(
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
>
0
,
"Failed to create CU F1-U UDP listener"
);
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
extern
instance_t
legacyInstanceMapping
;
legacyInstanceMapping
=
DUuniqInstance
=
getCxt
(
DUtype
,
myInstance
)
->
gtpInst
;
du_task_send_sctp_association_req
(
myInstance
,
msgSetup
);
break
;
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
View file @
df45820f
...
...
@@ -1078,6 +1078,17 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
f1ap_remove_ue
(
DUtype
,
instance
,
cplt
->
rnti
);
return
0
;
}
static
instance_t
du_create_gtpu_instance_to_cu
(
char
*
CUaddr
,
uint16_t
CUport
,
char
*
DUaddr
,
uint16_t
DUport
)
{
openAddr_t
tmp
;
strncpy
(
tmp
.
originHost
,
DUaddr
,
sizeof
(
tmp
.
originHost
)
-
1
);
strncpy
(
tmp
.
destinationHost
,
CUaddr
,
sizeof
(
tmp
.
destinationHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
DUport
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
CUport
);
return
gtpv1Init
(
tmp
);
}
int
DU_handle_UE_CONTEXT_MODIFICATION_REQUEST
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
stream
,
...
...
@@ -1160,6 +1171,26 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
// 3GPP assumes GTP-U is on port 2152, but OAI is configurable
drb_p
->
up_ul_tnl
[
0
].
port
=
getCxt
(
false
,
instance
)
->
setupReq
.
CUport
;
extern
instance_t
DUuniqInstance
;
if
(
DUuniqInstance
==
0
)
{
char
gtp_tunnel_ip_address
[
128
];
sprintf
(
gtp_tunnel_ip_address
,
"%d.%d.%d.%d"
,
drb_p
->
up_ul_tnl
[
0
].
tl_address
&
0xff
,
(
drb_p
->
up_ul_tnl
[
0
].
tl_address
>>
8
)
&
0xff
,
(
drb_p
->
up_ul_tnl
[
0
].
tl_address
>>
16
)
&
0xff
,
(
drb_p
->
up_ul_tnl
[
0
].
tl_address
>>
24
)
&
0xff
);
getCxt
(
DUtype
,
instance
)
->
gtpInst
=
du_create_gtpu_instance_to_cu
(
gtp_tunnel_ip_address
,
getCxt
(
false
,
instance
)
->
setupReq
.
CUport
,
getCxt
(
false
,
instance
)
->
setupReq
.
DU_f1_ip_address
.
ipv4_address
,
getCxt
(
false
,
instance
)
->
setupReq
.
DUport
);
AssertFatal
(
getCxt
(
DUtype
,
instance
)
->
gtpInst
>
0
,
"Failed to create CU F1-U UDP listener"
);
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
extern
instance_t
legacyInstanceMapping
;
legacyInstanceMapping
=
DUuniqInstance
=
getCxt
(
DUtype
,
instance
)
->
gtpInst
;
}
switch
(
drbs_tobesetupmod_item_p
->
rLCMode
)
{
case
F1AP_RLCMode_rlc_am
:
drb_p
->
rlc_mode
=
RLC_MODE_AM
;
...
...
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