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
a1f40006
Commit
a1f40006
authored
Mar 11, 2024
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move GTP initialization to DU F1 initialization
parent
a645e10f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
32 deletions
+14
-32
openair2/F1AP/f1ap_du_task.c
openair2/F1AP/f1ap_du_task.c
+14
-0
openair2/F1AP/f1ap_du_ue_context_management.c
openair2/F1AP/f1ap_du_ue_context_management.c
+0
-32
No files found.
openair2/F1AP/f1ap_du_task.c
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
:
...
...
openair2/F1AP/f1ap_du_ue_context_management.c
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
;
...
...
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