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
wangwenhui
OpenXG-RAN
Commits
41b739eb
Commit
41b739eb
authored
Jan 17, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENDC X2AP: Add handling of sGNB Reconfiguration Complete message at gNB side
parent
1493b7cb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
115 additions
and
3 deletions
+115
-3
openair2/COMMON/x2ap_messages_def.h
openair2/COMMON/x2ap_messages_def.h
+1
-0
openair2/COMMON/x2ap_messages_types.h
openair2/COMMON/x2ap_messages_types.h
+20
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+4
-0
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+2
-2
openair2/X2AP/x2ap_eNB_decoder.c
openair2/X2AP/x2ap_eNB_decoder.c
+3
-0
openair2/X2AP/x2ap_eNB_handler.c
openair2/X2AP/x2ap_eNB_handler.c
+85
-1
No files found.
openair2/COMMON/x2ap_messages_def.h
View file @
41b739eb
...
...
@@ -54,3 +54,4 @@ MESSAGE_DEF(X2AP_SENB_ADDITION_REQ , MESSAGE_PRIORITY_MED, x2ap_sen
/*SGnb bearer addition messages X2AP <-> RRC */
MESSAGE_DEF
(
X2AP_ENDC_SGNB_ADDITION_REQ
,
MESSAGE_PRIORITY_MED
,
x2ap_ENDC_sgnb_addition_req_t
,
x2ap_ENDC_sgnb_addition_req
)
MESSAGE_DEF
(
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
,
MESSAGE_PRIORITY_MED
,
x2ap_ENDC_sgnb_addition_req_ACK_t
,
x2ap_ENDC_sgnb_addition_req_ACK
)
MESSAGE_DEF
(
X2AP_ENDC_SGNB_RECONF_COMPLETE
,
MESSAGE_PRIORITY_MED
,
x2ap_ENDC_reconf_complete_t
,
x2ap_ENDC_sgnb_reconf_complete
)
openair2/COMMON/x2ap_messages_types.h
View file @
41b739eb
...
...
@@ -40,6 +40,7 @@
#define X2AP_SENB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_senb_addition_req
#define X2AP_ENDC_SGNB_ADDITION_REQ(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_addition_req
#define X2AP_ENDC_SGNB_ADDITION_REQ_ACK(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_addition_req_ACK
#define X2AP_ENDC_SGNB_RECONF_COMPLETE(mSGpTR) (mSGpTR)->ittiMsg.x2ap_ENDC_sgnb_reconf_complete
#define X2AP_MAX_NB_ENB_IP_ADDRESS 2
...
...
@@ -68,6 +69,13 @@ typedef enum {
X2AP_TX2_RELOC_OVERALL_TIMEOUT
}
x2ap_handover_cancel_cause_t
;
typedef
enum
{
X2AP_RECONF_RESPONSE_SUCCESS
,
X2AP_RECONF_RESPONSE_REJECT
/* Extensions may appear below */
}
x2ap_sgNB_reconf_response_information_t
;
typedef
struct
x2ap_handover_cancel_s
{
int
rnti
;
x2ap_handover_cancel_cause_t
cause
;
...
...
@@ -374,5 +382,17 @@ typedef struct x2ap_ENDC_sgnb_addition_req_ACK_s {
}
x2ap_ENDC_sgnb_addition_req_ACK_t
;
typedef
struct
x2ap_ENDC_reconf_complete_s
{
int
MeNB_ue_x2_id
;
int
SgNB_ue_x2_id
;
x2ap_sgNB_reconf_response_information_t
reconf_response
;
uint8_t
rrc_buffer
[
4096
/* arbitrary, big enough */
];
int
rrc_buffer_size
;
}
x2ap_ENDC_reconf_complete_t
;
#endif
/* X2AP_MESSAGES_TYPES_H_ */
openair2/RRC/NR/rrc_gNB.c
View file @
41b739eb
...
...
@@ -449,6 +449,10 @@ void *rrc_gnb_task(void *args_p) {
rrc_gNB_process_AdditionRequestInformation
(
GNB_INSTANCE_TO_MODULE_ID
(
instance
),
&
X2AP_ENDC_SGNB_ADDITION_REQ
(
msg_p
));
break
;
case
X2AP_ENDC_SGNB_RECONF_COMPLETE
:
LOG_I
(
NR_RRC
,
"Handling of reconfiguration complete message at RRC gNB is pending
\n
"
);
break
;
default:
LOG_E
(
NR_RRC
,
"[gNB %d] Received unexpected message %s
\n
"
,
instance
,
msg_name_p
);
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
41b739eb
...
...
@@ -375,7 +375,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToAddModList
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToReleaseList
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
pdsch_Config
->
choice
.
setup
->
p_ZP_CSI_RS_ResourceSet
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
sps_Config
=
NULL
;
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
sps_Config
=
NULL
;
//calloc(1,sizeof(struct NR_SetupRelease_SPS_Config));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
=
calloc
(
1
,
sizeof
(
*
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
));
secondaryCellGroup
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
->
radioLinkMonitoringConfig
->
present
=
NR_SetupRelease_RadioLinkMonitoringConfig_PR_setup
;
...
...
@@ -794,7 +794,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToAddModList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
sp_ZP_CSI_RS_ResourceSetsToReleaseList
=
NULL
;
bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
->
p_ZP_CSI_RS_ResourceSet
=
NULL
;
bwp
->
bwp_Dedicated
->
sps_Config
=
NULL
;
bwp
->
bwp_Dedicated
->
sps_Config
=
NULL
;
//calloc(1,sizeof(struct NR_SetupRelease_SPS_Config));
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
=
calloc
(
1
,
sizeof
(
*
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
));
bwp
->
bwp_Dedicated
->
radioLinkMonitoringConfig
->
present
=
NR_SetupRelease_RadioLinkMonitoringConfig_PR_setup
;
...
...
openair2/X2AP/x2ap_eNB_decoder.c
View file @
41b739eb
...
...
@@ -65,6 +65,9 @@ static int x2ap_eNB_decode_initiating_message(X2AP_X2AP_PDU_t *pdu)
case
X2AP_ProcedureCode_id_sgNBAdditionPreparation
:
X2AP_INFO
(
"X2AP_ProcedureCode_id_sgNBAdditionPreparation message!
\n
"
);
break
;
case
X2AP_ProcedureCode_id_sgNBReconfigurationCompletion
:
X2AP_INFO
(
"X2AP_ProcedureCode_id_sgNBReconfigurationCompletion message!
\n
"
);
break
;
default:
X2AP_ERROR
(
"Unknown procedure ID (%d) for initiating message
\n
"
,
...
...
openair2/X2AP/x2ap_eNB_handler.c
View file @
41b739eb
...
...
@@ -126,6 +126,12 @@ int x2ap_eNB_handle_ENDC_sGNB_addition_response (instance_t instance,
uint32_t
stream
,
X2AP_X2AP_PDU_t
*
pdu
);
static
int
x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
stream
,
X2AP_X2AP_PDU_t
*
pdu
);
/* Handlers matrix. Only eNB related procedure present here. Placement of callback functions according to X2AP_ProcedureCode.h */
x2ap_message_decoded_callback
x2ap_messages_callback
[][
3
]
=
{
...
...
@@ -157,7 +163,7 @@ x2ap_message_decoded_callback x2ap_messages_callback[][3] = {
{
0
,
0
,
0
},
/* seNBCounterCheck */
{
0
,
0
,
0
},
/* retrieveUEContext */
{
x2ap_gNB_handle_ENDC_sGNB_addition_request
,
x2ap_eNB_handle_ENDC_sGNB_addition_response
,
0
},
/*X2AP_ProcedureCode_id_sgNBAdditionPreparation*/
{
0
,
0
,
0
},
{
x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete
,
0
,
0
},
/*X2AP_ProcedureCode_id_sgNBReconfigurationCompletion*/
{
0
,
0
,
0
},
{
0
,
0
,
0
},
{
0
,
0
,
0
},
...
...
@@ -1907,5 +1913,83 @@ int x2ap_eNB_handle_ENDC_sGNB_addition_response (instance_t instance,
}
static
int
x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete
(
instance_t
instance
,
uint32_t
assoc_id
,
uint32_t
stream
,
X2AP_X2AP_PDU_t
*
pdu
)
{
X2AP_SgNBReconfigurationComplete_t
*
x2SgNBReconfigurationComplete
;
X2AP_SgNBReconfigurationComplete_IEs_t
*
ie
;
x2ap_eNB_instance_t
*
instance_p
;
x2ap_eNB_data_t
*
x2ap_eNB_data
;
MessageDef
*
msg
;
int
ue_id
;
DevAssert
(
pdu
!=
NULL
);
x2SgNBReconfigurationComplete
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
SgNBReconfigurationComplete
;
/*if (stream == 0) {
X2AP_ERROR ("Received new x2 SgNB Addition request on stream == 0\n");
// TODO: send a x2 failure response
return 0;
}*/
X2AP_DEBUG
(
"Received X2 SgNB Reconfiguration complete message
\n
"
);
x2ap_eNB_data
=
x2ap_get_eNB
(
NULL
,
assoc_id
,
0
);
DevAssert
(
x2ap_eNB_data
!=
NULL
);
X2AP_INFO
(
"X2AP Association id: %d
\n
"
,
assoc_id
);
instance_p
=
x2ap_eNB_get_instance
(
instance
);
DevAssert
(
instance_p
!=
NULL
);
//Allocate an ITTI X2AP_SGNB_ADDITION_REQ message instead
msg
=
itti_alloc_new_message
(
TASK_X2AP
,
X2AP_ENDC_SGNB_RECONF_COMPLETE
);
/* X2AP_ProtocolIE_ID_id_MeNB_UE_X2AP_ID */
X2AP_FIND_PROTOCOLIE_BY_ID
(
X2AP_SgNBReconfigurationComplete_IEs_t
,
ie
,
x2SgNBReconfigurationComplete
,
X2AP_ProtocolIE_ID_id_MeNB_UE_X2AP_ID
,
true
);
if
(
ie
==
NULL
)
{
X2AP_ERROR
(
"%s %d: ie is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
-
1
;
}
X2AP_ENDC_SGNB_RECONF_COMPLETE
(
msg
).
MeNB_ue_x2_id
=
ie
->
value
.
choice
.
UE_X2AP_ID
;
/* X2AP_ProtocolIE_ID_id_SgNB_UE_X2AP_ID */
X2AP_FIND_PROTOCOLIE_BY_ID
(
X2AP_SgNBReconfigurationComplete_IEs_t
,
ie
,
x2SgNBReconfigurationComplete
,
X2AP_ProtocolIE_ID_id_SgNB_UE_X2AP_ID
,
true
);
if
(
ie
==
NULL
)
{
X2AP_ERROR
(
"%s %d: ie is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
-
1
;
}
X2AP_ENDC_SGNB_RECONF_COMPLETE
(
msg
).
SgNB_ue_x2_id
=
ie
->
value
.
choice
.
SgNB_UE_X2AP_ID
;
X2AP_FIND_PROTOCOLIE_BY_ID
(
X2AP_SgNBReconfigurationComplete_IEs_t
,
ie
,
x2SgNBReconfigurationComplete
,
X2AP_ProtocolIE_ID_id_ResponseInformationSgNBReconfComp
,
true
);
if
(
ie
==
NULL
)
{
X2AP_ERROR
(
"%s %d: ie is a NULL pointer
\n
"
,
__FILE__
,
__LINE__
);
return
-
1
;
}
if
(
ie
->
value
.
choice
.
ResponseInformationSgNBReconfComp
.
present
==
X2AP_ResponseInformationSgNBReconfComp_PR_success_SgNBReconfComp
){
X2AP_ENDC_SGNB_RECONF_COMPLETE
(
msg
).
reconf_response
=
X2AP_RECONF_RESPONSE_SUCCESS
;
}
else
{
X2AP_ENDC_SGNB_RECONF_COMPLETE
(
msg
).
reconf_response
=
X2AP_RECONF_RESPONSE_REJECT
;
}
itti_send_msg_to_task
(
TASK_RRC_GNB
,
instance_p
->
instance
,
msg
);
return
0
;
}
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