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
zzha zzha
OpenXG-RAN
Commits
2c3e4ef4
Commit
2c3e4ef4
authored
Jan 12, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/bugfix-cu-du-gtpu-correct-address' into integration_2023_w02
parents
47a4da8d
551aee17
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
28 deletions
+24
-28
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+3
-5
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+13
-17
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+3
-2
openair3/ocp-gtpu/gtp_itf.h
openair3/ocp-gtpu/gtp_itf.h
+5
-4
No files found.
openair2/F1AP/f1ap_cu_task.c
View file @
2c3e4ef4
...
...
@@ -41,12 +41,10 @@
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t
CUuniqInstance
=
0
;
static
instance_t
cu_task_create_gtpu_instance
_to_du
(
eth_params_t
*
IPaddrs
)
{
static
instance_t
cu_task_create_gtpu_instance
(
eth_params_t
*
IPaddrs
)
{
openAddr_t
tmp
=
{
0
};
strncpy
(
tmp
.
originHost
,
IPaddrs
->
my_addr
,
sizeof
(
tmp
.
originHost
)
-
1
);
strncpy
(
tmp
.
destinationHost
,
IPaddrs
->
remote_addr
,
sizeof
(
tmp
.
destinationHost
)
-
1
);
sprintf
(
tmp
.
originService
,
"%d"
,
IPaddrs
->
my_portd
);
sprintf
(
tmp
.
destinationService
,
"%d"
,
IPaddrs
->
remote_portd
);
sprintf
(
tmp
.
originService
,
"%d"
,
IPaddrs
->
my_portd
);
return
gtpv1Init
(
tmp
);
}
...
...
@@ -59,7 +57,7 @@ static void cu_task_handle_sctp_association_ind(instance_t instance, sctp_new_as
f1ap_cu_data
->
sctp_in_streams
=
sctp_new_association_ind
->
in_streams
;
f1ap_cu_data
->
sctp_out_streams
=
sctp_new_association_ind
->
out_streams
;
f1ap_cu_data
->
default_sctp_stream_id
=
0
;
getCxt
(
CUtype
,
instance
)
->
gtpInst
=
cu_task_create_gtpu_instance
_to_du
(
IPaddrs
);
getCxt
(
CUtype
,
instance
)
->
gtpInst
=
cu_task_create_gtpu_instance
(
IPaddrs
);
AssertFatal
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
>
0
,
"Failed to create CU F1-U UDP listener"
);
// Fixme: fully inconsistent instances management
// dirty global var is a bad fix
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
2c3e4ef4
...
...
@@ -510,18 +510,15 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl_length
;
j
++
)
{
/*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/
transport_layer_addr_t
addr
;
int
sz
=
sizeof
(
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
);
memcpy
(
addr
.
buffer
,
&
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
,
sz
);
addr
.
length
=
sz
*
8
;
/* Use a dummy address and teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU */
transport_layer_addr_t
addr
=
{
length
:
32
,
buffer
:
{
0
}
};
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
=
newGtpuCreateTunnel
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_setup_req
->
rnti
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
0xFFFF
,
// We will set the right value from DU answer
-
1
,
// no qfi
addr
,
addr
,
// We will set the right value from DU answer
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
port
,
cu_f1u_data_req
,
NULL
);
...
...
@@ -700,10 +697,11 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
F1AP_GTPTunnel_t
*
dl_up_tnl0
=
dl_up_tnl_info_p
->
dLUPTNLInformation
.
choice
.
gTPTunnel
;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4
(
&
dl_up_tnl0
->
transportLayerAddress
,
drb_p
->
up_dl_tnl
[
0
].
tl_address
);
OCTET_STRING_TO_INT32
(
&
dl_up_tnl0
->
gTP_TEID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
GtpuUpdateTunnelOutgoingTeid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_setup_resp
->
rnti
,
(
ebi_t
)
drbs_setup_item_p
->
dRBID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
GtpuUpdateTunnelOutgoingAddressAndTeid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_setup_resp
->
rnti
,
(
ebi_t
)
drbs_setup_item_p
->
dRBID
,
drb_p
->
up_dl_tnl
[
0
].
tl_address
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
}
}
...
...
@@ -1478,11 +1476,8 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
/* 12.1.3 uLUPTNLInformation_ToBeSetup_List */
for
(
int
j
=
0
;
j
<
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl_length
;
j
++
)
{
/*Use a dummy teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context setup response from the DU*/
transport_layer_addr_t
addr
;
int
sz
=
sizeof
(
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
);
memcpy
(
addr
.
buffer
,
&
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
tl_address
,
sz
);
addr
.
length
=
sz
*
8
;
/* Use a dummy address and teid for the outgoing GTP-U tunnel (DU) which will be updated once we get the UE context modification response from the DU */
transport_layer_addr_t
addr
=
{
length
:
32
,
buffer
:
{
0
}
};
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
=
newGtpuCreateTunnel
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_modification_req
->
rnti
,
...
...
@@ -1490,7 +1485,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
drb_id
,
0xFFFF
,
// We will set the right value from DU answer
-
1
,
// no qfi
addr
,
addr
,
// We will set the right value from DU answer
f1ap_ue_context_modification_req
->
drbs_to_be_setup
[
i
].
up_dl_tnl
[
0
].
port
,
cu_f1u_data_req
,
NULL
);
...
...
@@ -1702,9 +1697,10 @@ int CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE(instance_t instance,
F1AP_GTPTunnel_t
*
dl_up_tnl0
=
dl_up_tnl_info_p
->
dLUPTNLInformation
.
choice
.
gTPTunnel
;
BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4
(
&
dl_up_tnl0
->
transportLayerAddress
,
drb_p
->
up_dl_tnl
[
0
].
tl_address
);
OCTET_STRING_TO_INT32
(
&
dl_up_tnl0
->
gTP_TEID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
GtpuUpdateTunnelOutgoingTeid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
GtpuUpdateTunnelOutgoing
AddressAnd
Teid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
f1ap_ue_context_modification_resp
->
rnti
,
(
ebi_t
)
drbs_setupmod_item_p
->
dRBID
,
drb_p
->
up_dl_tnl
[
0
].
tl_address
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
}
}
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
2c3e4ef4
...
...
@@ -552,7 +552,7 @@ instance_t gtpv1Init(openAddr_t context) {
return
id
;
}
void
GtpuUpdateTunnelOutgoing
Teid
(
instance_t
instance
,
ue_id_t
ue_id
,
ebi_t
bearer_id
,
teid_t
newOutgoingTeid
)
{
void
GtpuUpdateTunnelOutgoing
AddressAndTeid
(
instance_t
instance
,
ue_id_t
ue_id
,
ebi_t
bearer_id
,
in_addr_t
newOutgoingAddr
,
teid_t
newOutgoingTeid
)
{
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
getInstRetVoid
(
compatInst
(
instance
));
getUeRetVoid
(
inst
,
ue_id
);
...
...
@@ -565,8 +565,9 @@ void GtpuUpdateTunnelOutgoingTeid(instance_t instance, ue_id_t ue_id, ebi_t bear
return
;
}
ptr2
->
second
.
outgoing_ip_addr
=
newOutgoingAddr
;
ptr2
->
second
.
teid_outgoing
=
newOutgoingTeid
;
LOG_I
(
GTPU
,
"[%ld] Tunnel Outgoing TEID updated to %x
\n
"
,
instance
,
ptr2
->
second
.
teid_outgoing
);
LOG_I
(
GTPU
,
"[%ld] Tunnel Outgoing TEID updated to %x
and address to %x
\n
"
,
instance
,
ptr2
->
second
.
teid_outgoing
,
ptr2
->
second
.
outgoing_ip_addr
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
...
...
openair3/ocp-gtpu/gtp_itf.h
View file @
2c3e4ef4
...
...
@@ -92,10 +92,11 @@ extern "C" {
gtpCallback
callBack
,
gtpCallbackSDAP
callBackSDAP
);
void
GtpuUpdateTunnelOutgoingTeid
(
instance_t
instance
,
ue_id_t
ue_id
,
ebi_t
bearer_id
,
teid_t
newOutgoingTeid
);
void
GtpuUpdateTunnelOutgoingAddressAndTeid
(
instance_t
instance
,
ue_id_t
ue_id
,
ebi_t
bearer_id
,
in_addr_t
newOutgoingAddr
,
teid_t
newOutgoingTeid
);
int
newGtpuDeleteAllTunnels
(
instance_t
instance
,
ue_id_t
ue_id
);
int
newGtpuDeleteTunnels
(
instance_t
instance
,
ue_id_t
ue_id
,
int
nbTunnels
,
pdusessionid_t
*
pdusession_id
);
...
...
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