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
e324cfb9
Commit
e324cfb9
authored
Sep 06, 2022
by
General ABS
Committed by
abs
Jun 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gtpu Update Tunnel OutgoingTeid
parent
0dce41dc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
14 deletions
+35
-14
openair2/F1AP/f1ap_common.h
openair2/F1AP/f1ap_common.h
+8
-3
openair2/F1AP/f1ap_cu_ue_context_management.c
openair2/F1AP/f1ap_cu_ue_context_management.c
+11
-11
openair3/ocp-gtpu/gtp_itf.cpp
openair3/ocp-gtpu/gtp_itf.cpp
+15
-0
openair3/ocp-gtpu/gtp_itf.h
openair3/ocp-gtpu/gtp_itf.h
+1
-0
No files found.
openair2/F1AP/f1ap_common.h
View file @
e324cfb9
...
@@ -400,17 +400,21 @@ typedef int (*f1ap_message_processing_t)(
...
@@ -400,17 +400,21 @@ typedef int (*f1ap_message_processing_t)(
uint32_t
stream
,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
message_p
F1AP_F1AP_PDU_t
*
message_p
);
);
int
f1ap_handle_message
(
instance_t
instance
,
uint32_t
assoc_id
,
int32_t
stream
,
int
f1ap_handle_message
(
instance_t
instance
,
uint32_t
assoc_id
,
int32_t
stream
,
const
uint8_t
*
const
data
,
const
uint32_t
data_length
);
const
uint8_t
*
const
data
,
const
uint32_t
data_length
);
typedef
struct
f1ap_cudu_ue_inst_s
{
typedef
struct
f1ap_cudu_ue_inst_s
{
// used for NB stats generation
// used for NB stats generation
rnti_t
rnti
;
rnti_t
rnti
;
instance_t
f1ap_uid
;
instance_t
f1ap_uid
;
instance_t
du_ue_f1ap_id
;
instance_t
du_ue_f1ap_id
;
instance_t
cu_ue_f1ap_id
;
instance_t
cu_ue_f1ap_id
;
}
f1ap_cudu_ue_t
;
}
f1ap_cudu_ue_t
;
typedef
struct
rnti_update_s
{
rnti_t
prior_rnti
;
rnti_t
new_rnti
;
}
rnti_update_t
;
typedef
struct
f1ap_cudu_inst_s
{
typedef
struct
f1ap_cudu_inst_s
{
f1ap_setup_req_t
setupReq
;
f1ap_setup_req_t
setupReq
;
uint16_t
sctp_in_streams
;
uint16_t
sctp_in_streams
;
...
@@ -420,6 +424,7 @@ typedef struct f1ap_cudu_inst_s {
...
@@ -420,6 +424,7 @@ typedef struct f1ap_cudu_inst_s {
uint64_t
gNB_DU_id
;
uint64_t
gNB_DU_id
;
uint16_t
num_ues
;
uint16_t
num_ues
;
f1ap_cudu_ue_t
f1ap_ue
[
MAX_MOBILES_PER_GNB
];
f1ap_cudu_ue_t
f1ap_ue
[
MAX_MOBILES_PER_GNB
];
rnti_update_t
rnti_update
;
}
f1ap_cudu_inst_t
;
}
f1ap_cudu_inst_t
;
typedef
enum
{
typedef
enum
{
...
...
openair2/F1AP/f1ap_cu_ue_context_management.c
View file @
e324cfb9
...
@@ -523,8 +523,11 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
...
@@ -523,8 +523,11 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
for
(
int
j
=
0
;
j
<
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl_length
;
j
++
)
{
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*/
/*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*/
/* 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 */
/* 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
}
};
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_cudu_inst_t
*
f1_inst
=
getCxt
(
CUtype
,
instance
);
f1_inst
->
rnti_update
.
prior_rnti
=
f1ap_ue_context_setup_req
->
rnti
;
f1_inst
->
rnti_update
.
new_rnti
=
0
;
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
up_ul_tnl
[
j
].
teid
=
newGtpuCreateTunnel
(
f1_inst
->
gtpInst
,
f1ap_ue_context_setup_req
->
rnti
,
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
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
f1ap_ue_context_setup_req
->
drbs_to_be_setup
[
i
].
drb_id
,
...
@@ -725,17 +728,15 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
...
@@ -725,17 +728,15 @@ int CU_handle_UE_CONTEXT_SETUP_RESPONSE(instance_t instance,
// TODO in the following, assume only one UP UL TNL is present.
// TODO in the following, assume only one UP UL TNL is present.
// this matches/assumes OAI CU/DU implementation, can be up to 2!
// this matches/assumes OAI CU/DU implementation, can be up to 2!
drb_p
->
up_dl_tnl_length
=
1
;
drb_p
->
up_dl_tnl_length
=
1
;
AssertFatal
(
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
count
>
0
,
AssertFatal
(
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
count
>
0
,
"no DL UP TNL Information in DRBs to be Setup list
\n
"
);
"no DL UP TNL Information in DRBs to be Setup list
\n
"
);
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
dl_up_tnl_info_p
=
(
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
)
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
array
[
0
];
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
dl_up_tnl_info_p
=
(
F1AP_DLUPTNLInformation_ToBeSetup_Item_t
*
)
drbs_setup_item_p
->
dLUPTNLInformation_ToBeSetup_List
.
list
.
array
[
0
];
F1AP_GTPTunnel_t
*
dl_up_tnl0
=
dl_up_tnl_info_p
->
dLUPTNLInformation
.
choice
.
gTPTunnel
;
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
);
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
);
OCTET_STRING_TO_INT32
(
&
dl_up_tnl0
->
gTP_TEID
,
drb_p
->
up_dl_tnl
[
0
].
teid
);
GtpuUpdateTunnelOutgoingAddressAndTeid
(
getCxt
(
CUtype
,
instance
)
->
gtpInst
,
if
(
f1_inst
->
rnti_update
.
new_rnti
!=
0
)
{
f1ap_ue_context_setup_resp
->
rnti
,
GtpuUpdateTunnelRNTI
(
f1_inst
->
gtpInst
,
f1_inst
->
rnti_update
.
prior_rnti
,
f1_inst
->
rnti_update
.
new_rnti
);
(
ebi_t
)
drbs_setup_item_p
->
dRBID
,
}
drb_p
->
up_dl_tnl
[
0
].
tl_address
,
GtpuUpdateTunnelOutgoingAddressAndTeid
(
f1_inst
->
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
);
drb_p
->
up_dl_tnl
[
0
].
teid
);
}
}
}
}
...
@@ -1267,8 +1268,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
...
@@ -1267,8 +1268,7 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, f1ap_ue_context
asn1cSequenceAdd
(
drbs_toBeSetupMod_item
->
uLUPTNLInformation_ToBeSetup_List
.
list
,
asn1cSequenceAdd
(
drbs_toBeSetupMod_item
->
uLUPTNLInformation_ToBeSetup_List
.
list
,
F1AP_ULUPTNLInformation_ToBeSetup_Item_t
,
uLUPTNLInformation_ToBeSetup_Item
);
F1AP_ULUPTNLInformation_ToBeSetup_Item_t
,
uLUPTNLInformation_ToBeSetup_Item
);
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
present
=
F1AP_UPTransportLayerInformation_PR_gTPTunnel
;
asn1cCalloc
(
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
choice
.
gTPTunnel
,
asn1cCalloc
(
uLUPTNLInformation_ToBeSetup_Item
->
uLUPTNLInformation
.
choice
.
gTPTunnel
,
gTPTunnel
);
gTPTunnel
);
/* transportLayerAddress */
/* transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
1234
,
&
gTPTunnel
->
transportLayerAddress
);
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING
(
1234
,
&
gTPTunnel
->
transportLayerAddress
);
/* gTP_TEID */
/* gTP_TEID */
...
...
openair3/ocp-gtpu/gtp_itf.cpp
View file @
e324cfb9
...
@@ -571,6 +571,21 @@ void GtpuUpdateTunnelOutgoingAddressAndTeid(instance_t instance, ue_id_t ue_id,
...
@@ -571,6 +571,21 @@ void GtpuUpdateTunnelOutgoingAddressAndTeid(instance_t instance, ue_id_t ue_id,
return
;
return
;
}
}
void
GtpuUpdateTunnelRNTI
(
instance_t
instance
,
rnti_t
prior_rnti
,
rnti_t
new_rnti
)
{
pthread_mutex_lock
(
&
globGtp
.
gtp_lock
);
auto
inst
=
&
globGtp
.
instances
[
compatInst
(
instance
)];
auto
it
=
inst
->
ue2te_mapping
.
find
(
prior_rnti
);
if
(
it
==
inst
->
ue2te_mapping
.
end
())
{
LOG_E
(
GTPU
,
"[%ld] Update tunnel for a not existing RNTI %04x
\n
"
,
instance
,
prior_rnti
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
return
;
}
inst
->
ue2te_mapping
[
new_rnti
]
=
it
->
second
;
inst
->
ue2te_mapping
.
erase
(
it
);
pthread_mutex_unlock
(
&
globGtp
.
gtp_lock
);
}
teid_t
newGtpuCreateTunnel
(
instance_t
instance
,
teid_t
newGtpuCreateTunnel
(
instance_t
instance
,
ue_id_t
ue_id
,
ue_id_t
ue_id
,
int
incoming_bearer_id
,
int
incoming_bearer_id
,
...
...
openair3/ocp-gtpu/gtp_itf.h
View file @
e324cfb9
...
@@ -100,6 +100,7 @@ extern "C" {
...
@@ -100,6 +100,7 @@ extern "C" {
in_addr_t
newOutgoingAddr
,
in_addr_t
newOutgoingAddr
,
teid_t
newOutgoingTeid
);
teid_t
newOutgoingTeid
);
void
GtpuUpdateTunnelRNTI
(
instance_t
instance
,
rnti_t
prior_rnti
,
rnti_t
new_rnti
);
int
newGtpuDeleteAllTunnels
(
instance_t
instance
,
ue_id_t
ue_id
);
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
);
int
newGtpuDeleteTunnels
(
instance_t
instance
,
ue_id_t
ue_id
,
int
nbTunnels
,
pdusessionid_t
*
pdusession_id
);
instance_t
gtpv1Init
(
openAddr_t
context
);
instance_t
gtpv1Init
(
openAddr_t
context
);
...
...
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