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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
e6d4e96d
Commit
e6d4e96d
authored
May 07, 2024
by
Vijitha M
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Xn Setup - May 7
parent
3ef79774
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
142 additions
and
47 deletions
+142
-47
openair2/COMMON/xnap_messages_types.h
openair2/COMMON/xnap_messages_types.h
+2
-2
openair2/F1AP/f1ap_cu_interface_management.c
openair2/F1AP/f1ap_cu_interface_management.c
+1
-1
openair2/F1AP/f1ap_cu_task.c
openair2/F1AP/f1ap_cu_task.c
+7
-4
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+5
-1
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+13
-0
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+73
-0
openair2/RRC/NR/rrc_gNB_du.c
openair2/RRC/NR/rrc_gNB_du.c
+1
-0
openair2/XNAP/xnap_gNB_generate_messages.c
openair2/XNAP/xnap_gNB_generate_messages.c
+37
-33
openair2/XNAP/xnap_gNB_interface_management.c
openair2/XNAP/xnap_gNB_interface_management.c
+1
-1
openair2/XNAP/xnap_gNB_management_procedures.h
openair2/XNAP/xnap_gNB_management_procedures.h
+1
-1
openair2/XNAP/xnap_gNB_task.c
openair2/XNAP/xnap_gNB_task.c
+1
-4
No files found.
openair2/COMMON/xnap_messages_types.h
View file @
e6d4e96d
...
@@ -107,7 +107,7 @@ typedef struct xnap_served_cell_info_t {
...
@@ -107,7 +107,7 @@ typedef struct xnap_served_cell_info_t {
uint16_t
nr_pci
;
// NR Physical Cell Ids
uint16_t
nr_pci
;
// NR Physical Cell Ids
/* Tracking area code */
/* Tracking area code */
uint32_t
*
tac
;
uint32_t
tac
;
xnap_mode_t
mode
;
xnap_mode_t
mode
;
union
{
union
{
...
@@ -122,7 +122,7 @@ typedef struct xnap_setup_req_s {
...
@@ -122,7 +122,7 @@ typedef struct xnap_setup_req_s {
uint64_t
gNB_id
;
uint64_t
gNB_id
;
/* Tracking area code */
/* Tracking area code */
uint16_t
num_tai
;
uint16_t
num_tai
;
uint32_t
*
tai_support
;
uint32_t
tai_support
;
xnap_plmn_t
plmn_support
;
xnap_plmn_t
plmn_support
;
// Number of slide support items
// Number of slide support items
uint16_t
num_snssai
;
uint16_t
num_snssai
;
...
...
openair2/F1AP/f1ap_cu_interface_management.c
View file @
e6d4e96d
...
@@ -124,7 +124,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint3
...
@@ -124,7 +124,7 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, sctp_assoc_t assoc_id, uint3
if
(
servedCellInformation
->
fiveGS_TAC
)
{
if
(
servedCellInformation
->
fiveGS_TAC
)
{
req
->
cell
[
i
].
info
.
tac
=
malloc
(
sizeof
(
*
req
->
cell
[
i
].
info
.
tac
));
req
->
cell
[
i
].
info
.
tac
=
malloc
(
sizeof
(
*
req
->
cell
[
i
].
info
.
tac
));
AssertFatal
(
req
->
cell
[
i
].
info
.
tac
!=
NULL
,
"out of memory
\n
"
);
AssertFatal
(
req
->
cell
[
i
].
info
.
tac
!=
NULL
,
"out of memory
\n
"
);
OCTET_STRING_TO_INT
16
(
servedCellInformation
->
fiveGS_TAC
,
*
req
->
cell
[
i
].
info
.
tac
);
OCTET_STRING_TO_INT
24
(
servedCellInformation
->
fiveGS_TAC
,
*
req
->
cell
[
i
].
info
.
tac
);
//OCTET_STRING_TO_INT16(servedCellInformation->fiveGS_TAC, *req->cell[i].info.tac); - OAI
LOG_D
(
F1AP
,
"req->tac[%d] %d
\n
"
,
i
,
*
req
->
cell
[
i
].
info
.
tac
);
LOG_D
(
F1AP
,
"req->tac[%d] %d
\n
"
,
i
,
*
req
->
cell
[
i
].
info
.
tac
);
}
}
...
...
openair2/F1AP/f1ap_cu_task.c
View file @
e6d4e96d
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
#include "f1ap_cu_task.h"
#include "f1ap_cu_task.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include <openair3/ocp-gtpu/gtp_itf.h>
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t
CUuniqInstance
=
0
;
instance_t
CUuniqInstance
=
0
;
...
@@ -127,9 +128,10 @@ void cu_register_xn(uint32_t gnb_id_num,f1ap_served_cell_info_t *cell , xnap_net
...
@@ -127,9 +128,10 @@ void cu_register_xn(uint32_t gnb_id_num,f1ap_served_cell_info_t *cell , xnap_net
for
(
uint32_t
gnb_id
=
0
;
(
gnb_id
<
gnb_id_num
);
gnb_id
++
)
{
for
(
uint32_t
gnb_id
=
0
;
(
gnb_id
<
gnb_id_num
);
gnb_id
++
)
{
msg
=
itti_alloc_new_message
(
TASK_CU_F1
,
0
,
XNAP_REGISTER_GNB_REQ
);
msg
=
itti_alloc_new_message
(
TASK_CU_F1
,
0
,
XNAP_REGISTER_GNB_REQ
);
LOG_I
(
XNAP
,
"GNB_ID: %d
\n
"
,
gnb_id
);
LOG_I
(
XNAP
,
"GNB_ID: %d
\n
"
,
gnb_id
);
uint64_t
id
;
//
uint64_t id;
xnap_register_gnb_req_t
*
req
=
&
XNAP_REGISTER_GNB_REQ
(
msg
);
xnap_register_gnb_req_t
*
req
=
&
XNAP_REGISTER_GNB_REQ
(
msg
);
req
->
setup_req
.
info
.
tac
=
cell
->
tac
;
req
->
setup_req
.
info
.
tac
=
(
*
cell
->
tac
);
LOG_I
(
XNAP
,
"tac in cu_register %d
\n
"
,
req
->
setup_req
.
info
.
tac
);
req
->
setup_req
.
info
.
plmn
.
mcc
=
cell
->
plmn
.
mcc
;
req
->
setup_req
.
info
.
plmn
.
mcc
=
cell
->
plmn
.
mcc
;
req
->
setup_req
.
info
.
plmn
.
mnc
=
cell
->
plmn
.
mnc
;
req
->
setup_req
.
info
.
plmn
.
mnc
=
cell
->
plmn
.
mnc
;
req
->
setup_req
.
info
.
plmn
.
mnc_digit_length
=
cell
->
plmn
.
mnc_digit_length
;
req
->
setup_req
.
info
.
plmn
.
mnc_digit_length
=
cell
->
plmn
.
mnc_digit_length
;
...
@@ -155,13 +157,14 @@ void cu_register_xn(uint32_t gnb_id_num,f1ap_served_cell_info_t *cell , xnap_net
...
@@ -155,13 +157,14 @@ void cu_register_xn(uint32_t gnb_id_num,f1ap_served_cell_info_t *cell , xnap_net
req
->
setup_req
.
info
.
measurement_timing_information
=
cell
->
measurement_timing_information
;
req
->
setup_req
.
info
.
measurement_timing_information
=
cell
->
measurement_timing_information
;
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
req
->
setup_req
.
gNB_id
=
rrc
->
node_id
;
req
->
setup_req
.
gNB_id
=
rrc
->
node_id
;
req
->
setup_req
.
tai_support
=
cell
->
tac
;
req
->
setup_req
.
tai_support
=
*
cell
->
tac
;
req
->
setup_req
.
plmn_support
.
mcc
=
cell
->
plmn
.
mcc
;
req
->
setup_req
.
plmn_support
.
mcc
=
cell
->
plmn
.
mcc
;
req
->
setup_req
.
plmn_support
.
mnc
=
cell
->
plmn
.
mnc
;
req
->
setup_req
.
plmn_support
.
mnc
=
cell
->
plmn
.
mnc
;
req
->
setup_req
.
plmn_support
.
mnc_digit_length
=
cell
->
plmn
.
mnc_digit_length
;
req
->
setup_req
.
plmn_support
.
mnc_digit_length
=
cell
->
plmn
.
mnc_digit_length
;
req
->
net_config
=
nc
;
req
->
net_config
=
nc
;
req
->
gNB_name
=
rrc
->
node_name
;
req
->
gNB_name
=
rrc
->
node_name
;
void
updateXninst
(
instance_t
instanceP
,
xnap_setup_req_t
*
req
,
xnap_net_config_t
*
nc
);
updateXninst
(
0
,
&
req
->
setup_req
,
NULL
);
itti_send_msg_to_task
(
TASK_XNAP
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
),
msg
);
itti_send_msg_to_task
(
TASK_XNAP
,
GNB_MODULE_ID_TO_INSTANCE
(
gnb_id
),
msg
);
}
}
}
}
...
...
openair2/GNB_APP/gnb_app.c
View file @
e6d4e96d
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
#include "gnb_config.h"
#include "gnb_config.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/XNAP/xnap_gNB_task.h"
#include "openair2/XNAP/xnap_gNB_task.h"
#include "openair2/XNAP/xnap_gNB_management_procedures.h"
extern
unsigned
char
NB_gNB_INST
;
extern
unsigned
char
NB_gNB_INST
;
...
@@ -159,8 +160,11 @@ void *gNB_app_task(void *args_p)
...
@@ -159,8 +160,11 @@ void *gNB_app_task(void *args_p)
if
(
itti_create_task
(
TASK_XNAP
,
xnap_task
,
NULL
)
<
0
)
{
if
(
itti_create_task
(
TASK_XNAP
,
xnap_task
,
NULL
)
<
0
)
{
LOG_E
(
XNAP
,
"Create task for XNAP failed
\n
"
);
LOG_E
(
XNAP
,
"Create task for XNAP failed
\n
"
);
}
}
xnap_net_config_t
xn_net_config
=
Read_IPconfig_Xn
();
createXninst
(
0
,
NULL
,
&
xn_net_config
);
}
else
{
}
else
{
LOG_I
(
XNAP
,
"XNAP is disabled.
\n
"
);
LOG_I
(
XNAP
,
"XNAP is disabled.
\n
"
);
}
}
if
(
node_type
==
ngran_gNB_CUUP
)
{
if
(
node_type
==
ngran_gNB_CUUP
)
{
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
e6d4e96d
...
@@ -95,6 +95,7 @@
...
@@ -95,6 +95,7 @@
#define NR_UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define NR_UE_MODULE_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!!
#define NR_UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
#define NR_UE_INDEX_INVALID ((module_id_t) ~0) // FIXME attention! depends on type uint8_t!!! used to be -1
#define MAX_NUM_NR_NEIGH_CELLs 6
/* maximum neighbouring cells number */
typedef
enum
{
typedef
enum
{
NR_RRC_OK
=
0
,
NR_RRC_OK
=
0
,
NR_RRC_ConnSetup_failed
,
NR_RRC_ConnSetup_failed
,
...
@@ -389,6 +390,14 @@ typedef struct nr_rrc_cuup_container_t {
...
@@ -389,6 +390,14 @@ typedef struct nr_rrc_cuup_container_t {
sctp_assoc_t
assoc_id
;
sctp_assoc_t
assoc_id
;
}
nr_rrc_cuup_container_t
;
}
nr_rrc_cuup_container_t
;
typedef
struct
nr_rrc_neighcells_container_t
{
/* Tree-related data */
RB_ENTRY
(
nr_rrc_neighcells_container_t
)
entries
;
uint64_t
nr_cellid
;
sctp_assoc_t
assoc_id
;
}
nr_rrc_neighcells_container_t
;
//---NR---(completely change)---------------------
//---NR---(completely change)---------------------
typedef
struct
gNB_RRC_INST_s
{
typedef
struct
gNB_RRC_INST_s
{
...
@@ -411,6 +420,8 @@ typedef struct gNB_RRC_INST_s {
...
@@ -411,6 +420,8 @@ typedef struct gNB_RRC_INST_s {
char
*
uecap_file
;
char
*
uecap_file
;
// int num_nr_neigh_cells;
// uint32_t nr_neigh_cells_id[MAX_NUM_NR_NEIGH_CELLs];
// security configuration (preferred algorithms)
// security configuration (preferred algorithms)
nr_security_configuration_t
security
;
nr_security_configuration_t
security
;
...
@@ -423,6 +434,8 @@ typedef struct gNB_RRC_INST_s {
...
@@ -423,6 +434,8 @@ typedef struct gNB_RRC_INST_s {
RB_HEAD
(
rrc_cuup_tree
,
nr_rrc_cuup_container_t
)
cuups
;
// CU-UPs, indexed by assoc_id
RB_HEAD
(
rrc_cuup_tree
,
nr_rrc_cuup_container_t
)
cuups
;
// CU-UPs, indexed by assoc_id
size_t
num_cuups
;
size_t
num_cuups
;
RB_HEAD
(
rrc_neigh_cell_tree
,
nr_rrc_neighcells_container_t
)
neighs
;
// Neighbouring cells, indexed by assoc_id
size_t
num_neighs
;
}
gNB_RRC_INST
;
}
gNB_RRC_INST
;
#include "nr_rrc_proto.h" //should be put here otherwise compilation error
#include "nr_rrc_proto.h" //should be put here otherwise compilation error
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
e6d4e96d
...
@@ -99,6 +99,7 @@
...
@@ -99,6 +99,7 @@
#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
#include "openair2/SDAP/nr_sdap/nr_sdap_entity.h"
#include "openair2/E1AP/e1ap.h"
#include "openair2/E1AP/e1ap.h"
#include "cucp_cuup_if.h"
#include "cucp_cuup_if.h"
#include "openair2/XNAP/xnap_gNB_defs.h"
#include "BIT_STRING.h"
#include "BIT_STRING.h"
#include "assertions.h"
#include "assertions.h"
...
@@ -126,6 +127,18 @@ mui_t rrc_gNB_mui = 0;
...
@@ -126,6 +127,18 @@ mui_t rrc_gNB_mui = 0;
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
///---------------------------------------------------------------------------------------------------------------///
static
int
neigh_compare
(
const
nr_rrc_neighcells_container_t
*
a
,
const
nr_rrc_neighcells_container_t
*
b
)
{
if
(
a
->
assoc_id
>
b
->
assoc_id
)
return
1
;
if
(
a
->
assoc_id
==
b
->
assoc_id
)
return
0
;
return
-
1
;
/* a->assoc_id < b->assoc_id */
}
/* Tree management functions */
RB_GENERATE
(
rrc_neigh_cell_tree
,
nr_rrc_neighcells_container_t
,
entries
,
neigh_compare
);
static
void
clear_nas_pdu
(
ngap_pdu_t
*
pdu
)
static
void
clear_nas_pdu
(
ngap_pdu_t
*
pdu
)
{
{
DevAssert
(
pdu
!=
NULL
);
DevAssert
(
pdu
!=
NULL
);
...
@@ -2230,6 +2243,56 @@ void rrc_gNB_process_e1_bearer_context_release_cplt(const e1ap_bearer_release_cp
...
@@ -2230,6 +2243,56 @@ void rrc_gNB_process_e1_bearer_context_release_cplt(const e1ap_bearer_release_cp
LOG_I
(
RRC
,
"UE %d: received bearer release complete
\n
"
,
cplt
->
gNB_cu_cp_ue_id
);
LOG_I
(
RRC
,
"UE %d: received bearer release complete
\n
"
,
cplt
->
gNB_cu_cp_ue_id
);
}
}
void
rrc_gNB_process_xn_setup_request
(
sctp_assoc_t
assoc_id
,
xnap_setup_req_t
*
m
,
instance_t
instance
)
{
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
if
(
rrc
->
num_neighs
>
MAX_NUM_NR_NEIGH_CELLs
)
{
LOG_E
(
NR_RRC
,
"Error: number of neighbouring cells is exceeded
\n
"
);
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
XNAP_SETUP_FAILURE
);
msg
->
ittiMsgHeader
.
originInstance
=
assoc_id
;
xnap_setup_failure_t
*
xnap_msg
=
&
XNAP_SETUP_FAILURE
(
msg
);
xnap_msg
->
cause_type
=
XNAP_CAUSE_PROTOCOL
;
xnap_msg
->
cause_value
=
6
;
//XNAP_CauseProtocol_unspecified;
itti_send_msg_to_task
(
TASK_XNAP
,
0
,
msg
);
}
//RC.nrrrc[0]->num_nr_neigh_cells++;
//RC.nrrrc[0]->nr_neigh_cells_id[RC.nrrrc[0]->num_neighs - 1] = m->info.nr_pci;
nr_rrc_neighcells_container_t
*
neigh_cell
=
malloc
(
sizeof
(
*
neigh_cell
));
AssertFatal
(
neigh_cell
,
"out of memory
\n
"
);
neigh_cell
->
assoc_id
=
assoc_id
;
neigh_cell
->
nr_cellid
=
m
->
info
.
nr_cellid
;
RB_INSERT
(
rrc_neigh_cell_tree
,
&
rrc
->
neighs
,
neigh_cell
);
rrc
->
num_neighs
++
;
MessageDef
*
msg
=
itti_alloc_new_message
(
TASK_RRC_GNB
,
0
,
XNAP_SETUP_RESP
);
msg
->
ittiMsgHeader
.
originInstance
=
assoc_id
;
xnap_gNB_instance_t
*
xnap_gNB_get_instance
(
instance_t
instanceP
);
xnap_setup_resp_t
*
xnap_msg
=
&
XNAP_SETUP_RESP
(
msg
);
xnap_gNB_instance_t
*
instance_p
=
xnap_gNB_get_instance
(
instance
);
xnap_msg
->
gNB_id
=
instance_p
->
setup_req
.
gNB_id
;
xnap_msg
->
info
=
instance_p
->
setup_req
.
info
;
//xnap_msg->gNB_id = m->gNB_id;
//xnap_msg->info = m->info;
itti_send_msg_to_task
(
TASK_XNAP
,
0
,
msg
);
}
void
rrc_gNB_process_xn_setup_response
(
sctp_assoc_t
assoc_id
,
xnap_setup_resp_t
*
m
)
{
gNB_RRC_INST
*
rrc
=
RC
.
nrrrc
[
0
];
if
(
rrc
->
num_neighs
>
MAX_NUM_NR_NEIGH_CELLs
)
{
LOG_E
(
RRC
,
"Error: number of neighbouring cells is exceeded
\n
"
);
return
;
}
nr_rrc_neighcells_container_t
*
neigh_cell
=
malloc
(
sizeof
(
*
neigh_cell
));
AssertFatal
(
neigh_cell
,
"out of memory
\n
"
);
neigh_cell
->
assoc_id
=
assoc_id
;
neigh_cell
->
nr_cellid
=
m
->
info
.
nr_cellid
;
RB_INSERT
(
rrc_neigh_cell_tree
,
&
RC
.
nrrrc
[
0
]
->
neighs
,
neigh_cell
);
rrc
->
num_neighs
++
;
}
static
void
print_rrc_meas
(
FILE
*
f
,
const
NR_MeasResults_t
*
measresults
)
static
void
print_rrc_meas
(
FILE
*
f
,
const
NR_MeasResults_t
*
measresults
)
{
{
DevAssert
(
measresults
->
measResultServingMOList
.
list
.
count
>=
1
);
DevAssert
(
measresults
->
measResultServingMOList
.
list
.
count
>=
1
);
...
@@ -2455,6 +2518,16 @@ void *rrc_gnb_task(void *args_p) {
...
@@ -2455,6 +2518,16 @@ void *rrc_gnb_task(void *args_p) {
rrc_CU_process_f1_lost_connection
(
RC
.
nrrrc
[
0
],
&
F1AP_LOST_CONNECTION
(
msg_p
),
msg_p
->
ittiMsgHeader
.
originInstance
);
rrc_CU_process_f1_lost_connection
(
RC
.
nrrrc
[
0
],
&
F1AP_LOST_CONNECTION
(
msg_p
),
msg_p
->
ittiMsgHeader
.
originInstance
);
break
;
break
;
/*Messages from XNAP*/
case
XNAP_SETUP_RESP
:
rrc_gNB_process_xn_setup_response
(
ITTI_MSG_ORIGIN_INSTANCE
(
msg_p
),
&
XNAP_SETUP_RESP
(
msg_p
));
break
;
case
XNAP_SETUP_REQ
:
rrc_gNB_process_xn_setup_request
(
ITTI_MSG_ORIGIN_INSTANCE
(
msg_p
),
&
XNAP_SETUP_REQ
(
msg_p
),
instance
);
break
;
/* Messages from X2AP */
/* Messages from X2AP */
case
X2AP_ENDC_SGNB_ADDITION_REQ
:
case
X2AP_ENDC_SGNB_ADDITION_REQ
:
LOG_I
(
NR_RRC
,
"Received ENDC sgNB addition request from X2AP
\n
"
);
LOG_I
(
NR_RRC
,
"Received ENDC sgNB addition request from X2AP
\n
"
);
...
...
openair2/RRC/NR/rrc_gNB_du.c
View file @
e6d4e96d
...
@@ -181,6 +181,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id)
...
@@ -181,6 +181,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *req, sctp_assoc_t assoc_id)
xnap_gNB_instance_t
*
instance_xn
=
xnap_gNB_get_instance
(
0
);
xnap_gNB_instance_t
*
instance_xn
=
xnap_gNB_get_instance
(
0
);
if
(
instance_xn
!=
NULL
)
{
if
(
instance_xn
!=
NULL
)
{
LOG_D
(
NR_RRC
,
"XNAP is enabled, Triggering SCTP Association
\n
"
);
LOG_D
(
NR_RRC
,
"XNAP is enabled, Triggering SCTP Association
\n
"
);
void
cu_register_xn
(
uint32_t
gnb_id_num
,
f1ap_served_cell_info_t
*
cell
,
xnap_net_config_t
nc
);
//function prototype add
if
(
instance_xn
->
setup_req
.
gNB_id
==
0
)
{
if
(
instance_xn
->
setup_req
.
gNB_id
==
0
)
{
cu_register_xn
(
1
,
cell_info
,
instance_xn
->
net_config
);
cu_register_xn
(
1
,
cell_info
,
instance_xn
->
net_config
);
}
}
...
...
openair2/XNAP/xnap_gNB_generate_messages.c
View file @
e6d4e96d
...
@@ -88,7 +88,6 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
...
@@ -88,7 +88,6 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
0
],
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
0
],
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
1
],
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
1
],
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
2
]);
ie
->
value
.
choice
.
GlobalNG_RANNode_ID
.
choice
.
gNB
->
gnb_id
.
choice
.
gnb_ID
.
buf
[
2
]);
asn1cSeqAdd
(
&
out
->
protocolIEs
.
list
,
ie
);
asn1cSeqAdd
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
// TAI Support list
/* mandatory */
// TAI Support list
...
@@ -100,7 +99,7 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
...
@@ -100,7 +99,7 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
// for (int i=0;i<1;i++)
// for (int i=0;i<1;i++)
{
{
TAISupport_ItemIEs
=
(
XNAP_TAISupport_Item_t
*
)
calloc
(
1
,
sizeof
(
XNAP_TAISupport_Item_t
));
TAISupport_ItemIEs
=
(
XNAP_TAISupport_Item_t
*
)
calloc
(
1
,
sizeof
(
XNAP_TAISupport_Item_t
));
INT24_TO_OCTET_STRING
(
*
req
->
tai_support
,
&
TAISupport_ItemIEs
->
tac
);
INT24_TO_OCTET_STRING
(
req
->
tai_support
,
&
TAISupport_ItemIEs
->
tac
);
{
{
for
(
int
j
=
0
;
j
<
1
;
j
++
)
{
for
(
int
j
=
0
;
j
<
1
;
j
++
)
{
e_BroadcastPLMNinTAISupport_ItemIE
=
e_BroadcastPLMNinTAISupport_ItemIE
=
...
@@ -143,10 +142,10 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
...
@@ -143,10 +142,10 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
req
->
info
.
plmn
.
mnc
,
req
->
info
.
plmn
.
mnc
,
req
->
info
.
plmn
.
mnc_digit_length
,
req
->
info
.
plmn
.
mnc_digit_length
,
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
plmn_id
);
// octet string
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
plmn_id
);
// octet string
NR_CELL_ID_TO_BIT_STRING
(
req
->
gNB_
id
,
NR_CELL_ID_TO_BIT_STRING
(
req
->
info
.
nr_cell
id
,
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
nr_CI
);
// bit string
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
nr_CI
);
// bit string
INT24_TO_OCTET_STRING
(
*
req
->
tai_support
,
&
servedCellMember
->
served_cell_info_NR
.
tac
);
// octet string
INT24_TO_OCTET_STRING
(
req
->
tai_support
,
&
servedCellMember
->
served_cell_info_NR
.
tac
);
// octet string
for
(
int
k
=
0
;
k
<
1
;
k
++
)
{
for
(
int
k
=
0
;
k
<
1
;
k
++
)
{
plmn
=
(
XNAP_PLMN_Identity_t
*
)
calloc
(
1
,
sizeof
(
XNAP_PLMN_Identity_t
));
plmn
=
(
XNAP_PLMN_Identity_t
*
)
calloc
(
1
,
sizeof
(
XNAP_PLMN_Identity_t
));
{
{
...
@@ -308,7 +307,7 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
...
@@ -308,7 +307,7 @@ int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRSCS
=
XNAP_NRSCS_scs120
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRSCS
=
XNAP_NRSCS_scs120
;
break
;
break
;
}
}
switch
(
tdd
->
tbw
.
nrb
)
{
switch
(
tdd
->
tbw
.
nrb
)
{
case
11
:
case
11
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb11
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb11
;
break
;
break
;
...
@@ -559,7 +558,7 @@ int xnap_gNB_generate_xn_setup_response(sctp_assoc_t assoc_id, xnap_setup_resp_t
...
@@ -559,7 +558,7 @@ int xnap_gNB_generate_xn_setup_response(sctp_assoc_t assoc_id, xnap_setup_resp_t
resp
->
info
.
plmn
.
mnc
,
resp
->
info
.
plmn
.
mnc
,
resp
->
info
.
plmn
.
mnc_digit_length
,
resp
->
info
.
plmn
.
mnc_digit_length
,
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
plmn_id
);
// octet string
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
plmn_id
);
// octet string
NR_CELL_ID_TO_BIT_STRING
(
resp
->
gNB_
id
,
NR_CELL_ID_TO_BIT_STRING
(
resp
->
info
.
nr_cell
id
,
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
nr_CI
);
// bit string
&
servedCellMember
->
served_cell_info_NR
.
cellID
.
nr_CI
);
// bit string
INT24_TO_OCTET_STRING
(
resp
->
tai_support
,
&
servedCellMember
->
served_cell_info_NR
.
tac
);
// octet string
INT24_TO_OCTET_STRING
(
resp
->
tai_support
,
&
servedCellMember
->
served_cell_info_NR
.
tac
);
// octet string
...
@@ -702,33 +701,38 @@ int xnap_gNB_generate_xn_setup_response(sctp_assoc_t assoc_id, xnap_setup_resp_t
...
@@ -702,33 +701,38 @@ int xnap_gNB_generate_xn_setup_response(sctp_assoc_t assoc_id, xnap_setup_resp_t
break
;
break
;
}
}
switch
(
tdd
->
tbw
.
nrb
)
{
switch
(
tdd
->
tbw
.
nrb
)
{
case
0
:
case
11
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb11
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb11
;
break
;
break
;
case
1
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb18
;
case
18
:
break
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb18
;
case
2
:
break
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb24
;
break
;
case
24
:
case
11
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb24
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb78
;
break
;
break
;
case
14
:
case
78
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb106
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb78
;
break
;
break
;
case
21
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb162
;
case
106
:
break
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb106
;
case
24
:
break
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb217
;
break
;
case
162
:
case
28
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb162
;
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb273
;
break
;
break
;
case
217
:
default:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb217
;
AssertFatal
(
0
,
"Failed: Check value for N_RB_DL/N_RB_UL"
);
// TODO: Add all values or function to convert.
break
;
break
;
case
273
:
servedCellMember
->
served_cell_info_NR
.
nrModeInfo
.
choice
.
tdd
->
nrTransmissonBandwidth
.
nRNRB
=
XNAP_NRNRB_nrb273
;
break
;
default:
AssertFatal
(
0
,
"Failed: Check value for N_RB_DL/N_RB_UL"
);
break
;
}
}
}
}
// Setting MTC to 0 now. Will be handled later.
// Setting MTC to 0 now. Will be handled later.
...
...
openair2/XNAP/xnap_gNB_interface_management.c
View file @
e6d4e96d
...
@@ -93,7 +93,7 @@ int xnap_gNB_handle_xn_setup_request(instance_t instance, sctp_assoc_t assoc_id,
...
@@ -93,7 +93,7 @@ int xnap_gNB_handle_xn_setup_request(instance_t instance, sctp_assoc_t assoc_id,
return
-
1
;
return
-
1
;
}
else
{
}
else
{
OCTET_STRING_TO_INT24
(
&
ie
->
value
.
choice
.
TAISupport_List
.
list
.
array
[
0
]
->
tac
,
req
->
tai_support
);
OCTET_STRING_TO_INT24
(
&
ie
->
value
.
choice
.
TAISupport_List
.
list
.
array
[
0
]
->
tac
,
req
->
tai_support
);
LOG_I
(
XNAP
,
"tac %d
\n
"
,
*
req
->
tai_support
);
LOG_I
(
XNAP
,
"tac %d
\n
"
,
req
->
tai_support
);
}
}
LOG_D
(
XNAP
,
"req->gNB id: %lu
\n
"
,
req
->
gNB_id
);
LOG_D
(
XNAP
,
"req->gNB id: %lu
\n
"
,
req
->
gNB_id
);
...
...
openair2/XNAP/xnap_gNB_management_procedures.h
View file @
e6d4e96d
...
@@ -24,10 +24,10 @@
...
@@ -24,10 +24,10 @@
// void xnap_gNB_prepare_internal_data(void);
// void xnap_gNB_prepare_internal_data(void);
void
createXninst
(
instance_t
instanceP
,
xnap_setup_req_t
*
req
,
xnap_net_config_t
*
nc
);
void
createXninst
(
instance_t
instanceP
,
xnap_setup_req_t
*
req
,
xnap_net_config_t
*
nc
);
void
updateXninst
(
instance_t
instanceP
,
xnap_setup_req_t
*
req
,
xnap_net_config_t
*
nc
);
// void xnap_dump_trees(void);
// void xnap_dump_trees(void);
void
xnap_dump_trees
(
const
instance_t
instance
);
void
xnap_dump_trees
(
const
instance_t
instance
);
// void xnap_gNB_insert_new_instance(xnap_gNB_instance_t *new_instance_p);
// void xnap_gNB_insert_new_instance(xnap_gNB_instance_t *new_instance_p);
xnap_gNB_instance_t
*
xnap_gNB_get_instance
(
instance_t
instanceP
);
xnap_gNB_instance_t
*
xnap_gNB_get_instance
(
instance_t
instanceP
);
// uint16_t xnap_gNB_fetch_add_global_cnx_id(void);
// uint16_t xnap_gNB_fetch_add_global_cnx_id(void);
...
...
openair2/XNAP/xnap_gNB_task.c
View file @
e6d4e96d
...
@@ -211,9 +211,6 @@ void *xnap_task(void *arg)
...
@@ -211,9 +211,6 @@ void *xnap_task(void *arg)
int
result
;
int
result
;
LOG_D
(
XNAP
,
"Starting XNAP layer
\n
"
);
LOG_D
(
XNAP
,
"Starting XNAP layer
\n
"
);
itti_mark_task_ready
(
TASK_XNAP
);
itti_mark_task_ready
(
TASK_XNAP
);
const
int
instance
=
0
;
xnap_net_config_t
xn_net_config
=
Read_IPconfig_Xn
();
createXninst
(
instance
,
NULL
,
&
xn_net_config
);
while
(
1
)
{
while
(
1
)
{
itti_receive_msg
(
TASK_XNAP
,
&
received_msg
);
itti_receive_msg
(
TASK_XNAP
,
&
received_msg
);
...
@@ -226,7 +223,7 @@ void *xnap_task(void *arg)
...
@@ -226,7 +223,7 @@ void *xnap_task(void *arg)
case
XNAP_REGISTER_GNB_REQ
:
{
case
XNAP_REGISTER_GNB_REQ
:
{
xnap_net_config_t
*
xn_nc
=
&
XNAP_REGISTER_GNB_REQ
(
received_msg
).
net_config
;
xnap_net_config_t
*
xn_nc
=
&
XNAP_REGISTER_GNB_REQ
(
received_msg
).
net_config
;
xnap_gNB_init_sctp
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
xn_nc
);
xnap_gNB_init_sctp
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
xn_nc
);
}
break
;
}
break
;
case
XNAP_SETUP_FAILURE
:
// from rrc/xnap
case
XNAP_SETUP_FAILURE
:
// from rrc/xnap
...
...
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