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
Package registry
Model registry
Operate
Terraform modules
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
Patricio Latini
openairinterface5G
Commits
a1f40006
Commit
a1f40006
authored
1 year ago
by
Robert Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Move GTP initialization to DU F1 initialization
parent
a645e10f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/F1AP/f1ap_du_task.c
+14
-0
14 additions, 0 deletions
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_ue_context_management.c
+0
-32
0 additions, 32 deletions
openair2/F1AP/f1ap_du_ue_context_management.c
with
14 additions
and
32 deletions
openair2/F1AP/f1ap_du_task.c
+
14
−
0
View file @
a1f40006
...
...
@@ -40,6 +40,16 @@
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t
DUuniqInstance
=
0
;
static
instance_t
du_create_gtpu_instance_to_cu
(
const
f1ap_net_config_t
*
nc
)
{
openAddr_t
tmp
=
{
0
};
strncpy
(
tmp
.
originHost
,
nc
->
DU_f1_ip_address
.
ipv4_address
,
sizeof
(
tmp
.
originHost
)
-
1
);
strncpy
(
tmp
.
destinationHost
,
nc
->
CU_f1_ip_address
.
ipv4_address
,
sizeof
(
tmp
.
destinationHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
nc
->
DUport
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
nc
->
CUport
);
return
gtpv1Init
(
tmp
);
}
void
du_task_send_sctp_association_req
(
instance_t
instance
,
f1ap_net_config_t
*
nc
)
{
DevAssert
(
nc
!=
NULL
);
...
...
@@ -116,6 +126,10 @@ void *F1AP_DU_task(void *arg) {
f1ap_net_config_t
*
nc
=
&
F1AP_DU_REGISTER_REQ
(
msg
).
net_config
;
createF1inst
(
myInstance
,
msgSetup
,
nc
);
du_task_send_sctp_association_req
(
myInstance
,
nc
);
instance_t
gtpInst
=
du_create_gtpu_instance_to_cu
(
nc
);
AssertFatal
(
gtpInst
!=
0
,
"cannot create DU F1-U GTP module
\n
"
);
getCxt
(
myInstance
)
->
gtpInst
=
gtpInst
;
DUuniqInstance
=
gtpInst
;
}
break
;
case
F1AP_GNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE
:
...
...
This diff is collapsed.
Click to expand it.
openair2/F1AP/f1ap_du_ue_context_management.c
+
0
−
32
View file @
a1f40006
...
...
@@ -37,7 +37,6 @@
#include
"openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
#include
"openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include
<openair3/ocp-gtpu/gtp_itf.h>
#include
"openair2/LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
int
DU_handle_UE_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
sctp_assoc_t
assoc_id
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
...
...
@@ -755,16 +754,6 @@ int DU_send_UE_CONTEXT_RELEASE_COMPLETE(sctp_assoc_t assoc_id, f1ap_ue_context_r
return
0
;
}
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
);
}
int
DU_handle_UE_CONTEXT_MODIFICATION_REQUEST
(
instance_t
instance
,
sctp_assoc_t
assoc_id
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
)
{
F1AP_UEContextModificationRequest_t
*
container
;
...
...
@@ -836,27 +825,6 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, sctp_assoc_t
// 3GPP assumes GTP-U is on port 2152, but OAI is configurable
drb_p
->
up_ul_tnl
[
0
].
port
=
getCxt
(
instance
)
->
net_config
.
CUport
;
extern
instance_t
DUuniqInstance
;
if
(
DUuniqInstance
==
0
)
{
char
gtp_tunnel_ip_address
[
32
];
snprintf
(
gtp_tunnel_ip_address
,
sizeof
(
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
(
instance
)
->
gtpInst
=
du_create_gtpu_instance_to_cu
(
gtp_tunnel_ip_address
,
getCxt
(
instance
)
->
net_config
.
CUport
,
getCxt
(
instance
)
->
net_config
.
DU_f1_ip_address
.
ipv4_address
,
getCxt
(
instance
)
->
net_config
.
DUport
);
AssertFatal
(
getCxt
(
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
(
instance
)
->
gtpInst
;
}
switch
(
drbs_tobesetupmod_item_p
->
rLCMode
)
{
case
F1AP_RLCMode_rlc_am
:
drb_p
->
rlc_mode
=
RLC_MODE_AM
;
...
...
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