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
d9661177
Commit
d9661177
authored
Sep 19, 2018
by
Navid Nikaein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better management of cu/du ue ids
Fix for some variables
parent
c8742f26
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
277 additions
and
51 deletions
+277
-51
openair2/COMMON/f1ap_messages_types.h
openair2/COMMON/f1ap_messages_types.h
+1
-0
openair2/F1AP/f1ap_common.c
openair2/F1AP/f1ap_common.c
+153
-2
openair2/F1AP/f1ap_common.h
openair2/F1AP/f1ap_common.h
+60
-1
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
+21
-30
openair2/F1AP/f1ap_du_rrc_message_transfer.c
openair2/F1AP/f1ap_du_rrc_message_transfer.c
+35
-12
openair2/F1AP/f1ap_du_rrc_message_transfer.h
openair2/F1AP/f1ap_du_rrc_message_transfer.h
+3
-3
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+1
-1
openair2/LAYER2/RLC/rlc.c
openair2/LAYER2/RLC/rlc.c
+1
-1
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+2
-1
No files found.
openair2/COMMON/f1ap_messages_types.h
View file @
d9661177
...
...
@@ -211,6 +211,7 @@ typedef struct f1ap_dl_rrc_message_s {
uint32_t
gNB_CU_ue_id
;
uint32_t
gNB_DU_ue_id
;
uint32_t
old_gNB_DU_ue_id
;
uint16_t
rnti
;
uint8_t
srb_id
;
uint8_t
execute_duplication
;
uint8_t
*
rrc_container
;
...
...
openair2/F1AP/f1ap_common.c
View file @
d9661177
...
...
@@ -209,9 +209,160 @@ uint8_t F1AP_get_next_transaction_identifier(module_id_t enb_mod_idP, module_id_
return
transaction_identifier
[
enb_mod_idP
+
cu_mod_idP
];
}
uint8
_t
F1AP_get_UE_identifier
(
module_id_t
enb_mod_idP
,
int
CC_idP
,
int
UE_id
)
{
static
uint8
_t
UE_identifier
[
NUMBER_OF_eNB_MAX
];
module_id
_t
F1AP_get_UE_identifier
(
module_id_t
enb_mod_idP
,
int
CC_idP
,
int
UE_id
)
{
static
module_id
_t
UE_identifier
[
NUMBER_OF_eNB_MAX
];
UE_identifier
[
enb_mod_idP
+
CC_idP
+
UE_id
]
=
(
UE_identifier
[
enb_mod_idP
+
CC_idP
+
UE_id
]
+
1
)
%
F1AP_UE_IDENTIFIER_NUMBER
;
//LOG_T(F1AP,"generated xid is %d\n",transaction_identifier[enb_mod_idP+du_mod_idP]);
return
UE_identifier
[
enb_mod_idP
+
CC_idP
+
UE_id
];
}
int
f1ap_add_ue
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
module_idP
,
int
CC_idP
,
int
UE_id
,
rnti_t
rntiP
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
rntiP
)
{
f1_ue_inst
->
f1ap_uid
[
i
]
=
i
;
f1_ue_inst
->
mac_uid
[
i
]
=
UE_id
;
LOG_I
(
F1AP
,
"Updating the index of UE with RNTI %x and du_ue_f1ap_id %d
\n
"
,
f1_ue_inst
->
rnti
[
i
],
f1_ue_inst
->
du_ue_f1ap_id
[
i
]);
return
i
;
}
}
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
0
){
f1_ue_inst
->
rnti
[
i
]
=
rntiP
;
f1_ue_inst
->
f1ap_uid
[
i
]
=
i
;
f1_ue_inst
->
mac_uid
[
i
]
=
UE_id
;
f1_ue_inst
->
du_ue_f1ap_id
[
i
]
=
F1AP_get_UE_identifier
(
module_idP
,
CC_idP
,
i
);
f1_ue_inst
->
cu_ue_f1ap_id
[
i
]
=
F1AP_get_UE_identifier
(
module_idP
,
CC_idP
,
i
);
f1_ue_inst
->
num_ues
++
;
LOG_I
(
F1AP
,
"Adding a new UE with RNTI %x and cu/du ue_f1ap_id %d
\n
"
,
f1_ue_inst
->
rnti
[
i
],
f1_ue_inst
->
du_ue_f1ap_id
[
i
]);
return
i
;
}
}
return
-
1
;
}
int
f1ap_remove_ue
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
rntiP
)
{
f1_ue_inst
->
rnti
[
i
]
=
0
;
break
;
}
}
return
0
;
}
int
f1ap_get_du_ue_f1ap_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
rntiP
)
{
return
f1_ue_inst
->
du_ue_f1ap_id
[
i
];
}
}
return
-
1
;
}
int
f1ap_get_cu_ue_f1ap_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
rntiP
)
{
return
f1_ue_inst
->
cu_ue_f1ap_id
[
i
];
}
}
return
-
1
;
}
int
f1ap_get_rnti_by_du_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
du_ue_f1ap_id
[
i
]
==
du_ue_f1ap_id
)
{
return
f1_ue_inst
->
rnti
[
i
];
}
}
return
-
1
;
}
int
f1ap_get_rnti_by_cu_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
cu_ue_f1ap_id
[
i
]
==
cu_ue_f1ap_id
)
{
return
f1_ue_inst
->
rnti
[
i
];
}
}
return
-
1
;
}
int
f1ap_get_du_uid
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
du_ue_f1ap_id
[
i
]
==
du_ue_f1ap_id
)
{
return
i
;
}
}
return
-
1
;
}
int
f1ap_get_cu_uid
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
cu_ue_f1ap_id
[
i
]
==
cu_ue_f1ap_id
)
{
return
i
;
}
}
return
-
1
;
}
int
f1ap_get_uid_by_rnti
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
){
int
i
;
for
(
i
=
0
;
i
<
MAX_MOBILES_PER_ENB
;
i
++
){
if
(
f1_ue_inst
->
rnti
[
i
]
==
rntiP
)
{
return
i
;
}
}
return
-
1
;
}
int
f1ap_du_add_cu_ue_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
,
module_id_t
cu_ue_f1ap_id
){
module_id_t
f1ap_uid
=
f1ap_get_du_uid
(
f1_ue_inst
,
du_ue_f1ap_id
);
if
(
f1ap_uid
<
0
)
return
-
1
;
f1_ue_inst
->
cu_ue_f1ap_id
[
f1ap_uid
]
=
cu_ue_f1ap_id
;
LOG_I
(
F1AP
,
"Adding cu_ue_f1ap_id %d for UE with RNTI %x
\n
"
,
cu_ue_f1ap_id
,
f1_ue_inst
->
rnti
[
f1ap_uid
]);
return
0
;
}
int
f1ap_cu_add_du_ue_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
,
module_id_t
du_ue_f1ap_id
){
module_id_t
f1ap_uid
=
f1ap_get_cu_uid
(
f1_ue_inst
,
cu_ue_f1ap_id
);
if
(
f1ap_uid
<
0
)
return
-
1
;
f1_ue_inst
->
du_ue_f1ap_id
[
f1ap_uid
]
=
du_ue_f1ap_id
;
LOG_I
(
F1AP
,
"Adding du_ue_f1ap_id %d for UE with RNTI %x
\n
"
,
du_ue_f1ap_id
,
f1_ue_inst
->
rnti
[
f1ap_uid
]);
return
0
;
}
\ No newline at end of file
openair2/F1AP/f1ap_common.h
View file @
d9661177
...
...
@@ -425,8 +425,67 @@ typedef int (*f1ap_message_decoded_callback)(
F1AP_F1AP_PDU_t
*
message_p
);
// instance and module_id are assumed to be the same
typedef
struct
f1ap_cudu_ue_inst_s
{
// used for eNB stats generation
rnti_t
rnti
[
MAX_MOBILES_PER_ENB
];
module_id_t
f1ap_uid
[
MAX_MOBILES_PER_ENB
];
module_id_t
mac_uid
[
MAX_MOBILES_PER_ENB
];
module_id_t
du_ue_f1ap_id
[
MAX_MOBILES_PER_ENB
];
module_id_t
cu_ue_f1ap_id
[
MAX_MOBILES_PER_ENB
];
uint16_t
num_ues
;
}
f1ap_cudu_ue_inst_t
;
uint8_t
F1AP_get_next_transaction_identifier
(
module_id_t
enb_mod_idP
,
module_id_t
cu_mod_idP
);
uint8_t
F1AP_get_UE_identifier
(
module_id_t
enb_mod_idP
,
int
CC_idP
,
int
UE_id
);
module_id_t
F1AP_get_UE_identifier
(
module_id_t
enb_mod_idP
,
int
CC_idP
,
int
UE_id
);
int
f1ap_add_ue
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
module_idP
,
int
CC_idP
,
int
UE_id
,
rnti_t
rntiP
);
int
f1ap_remove_ue
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
);
int
f1ap_get_du_ue_f1ap_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
);
int
f1ap_get_cu_ue_f1ap_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
);
int
f1ap_get_rnti_by_du_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
);
int
f1ap_get_rnti_by_cu_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
);
int
f1ap_get_du_uid
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
);
int
f1ap_get_cu_uid
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
);
int
f1ap_get_uid_by_rnti
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
rnti_t
rntiP
);
int
f1ap_du_add_cu_ue_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
du_ue_f1ap_id
,
module_id_t
cu_ue_f1ap_id
);
int
f1ap_cu_add_du_ue_id
(
f1ap_cudu_ue_inst_t
*
f1_ue_inst
,
module_id_t
cu_ue_f1ap_id
,
module_id_t
du_ue_f1ap_id
);
#endif
/* F1AP_COMMON_H_ */
openair2/F1AP/f1ap_cu_rrc_message_transfer.c
View file @
d9661177
...
...
@@ -44,10 +44,15 @@
// a compile error
#undef C_RNTI
// Bing Kai: create CU and DU context, and put all the information there.
uint64_t
du_ue_f1ap_id
=
0
;
uint32_t
f1ap_assoc_id
=
0
;
uint32_t
f1ap_stream
=
0
;
f1ap_cudu_ue_inst_t
f1ap_cu_ue
[
MAX_eNB
];
/*
Initial UL RRC Message Transfer
*/
...
...
@@ -132,6 +137,14 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
AssertFatal
(
rrc_inst
>=
0
,
"couldn't find an RRC instance for nr_cell %ll
\n
"
,
nr_cellid
);
int
f1ap_uid
=
f1ap_add_ue
(
&
f1ap_cu_ue
[
rrc_inst
],
rrc_inst
,
CC_id
,
0
,
rnti
);
if
(
f1ap_uid
<
0
)
{
LOG_E
(
CU_F1AP
,
"Failed to add UE
\n
"
);
return
-
1
;
}
f1ap_cu_ue
[
rrc_inst
].
du_ue_f1ap_id
[
f1ap_uid
]
=
du_ue_f1ap_id
;
RRC_MAC_CCCH_DATA_IND
(
message_p
).
frame
=
0
;
RRC_MAC_CCCH_DATA_IND
(
message_p
).
sub_frame
=
0
;
RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu_size
=
ccch_sdu_len
;
...
...
@@ -141,32 +154,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
itti_send_msg_to_task
(
TASK_RRC_ENB
,
instance
,
message_p
);
// OR creat the ctxt and srb_info struct required by rrc_eNB_decode_ccch
/*
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
instance, // to fix
ENB_FLAG_YES,
rnti,
0, // frame
0); // slot
CC_id = RRC_MAC_CCCH_DATA_IND(msg_p).CC_id;
srb_info_p = &RC.rrc[instance]->carrier[CC_id].Srb0;
if (ccch_sdu_len >= RRC_BUFFER_SIZE_MAX) {
LOG_E(RRC, "CCCH message has size %d > %d\n",ccch_sdu_len,RRC_BUFFER_SIZE_MAX);
break;
}
memcpy(srb_info_p->Rx_buffer.Payload,
ccch_sdu,
ccch_sdu_len);
srb_info->Rx_buffer.payload_size = ccch_sdu_len;
rrc_eNB_decode_ccch(&ctxt, srb_info, CC_id);
*/
// if size > 0
// CU_send_DL_RRC_MESSAGE_TRANSFER(C.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.Payload, RC.rrc[ctxt_pP->module_id]->carrier[CC_id].Srb0.Tx_buffer.payload_size)
return
0
;
}
...
...
@@ -204,8 +191,11 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_
dl_rrc
->
gNB_CU_ue_id
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_
get_cu_ue_f1ap_id
(
&
f1ap_cu_ue
[
instance
],
f1ap_dl_rrc
->
rnti
)
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
LOG_I
(
CU_F1AP
,
"Setting GNB_CU_UE_F1AP_ID %d associated with UE RNTI %x (instance %d)
\n
"
,
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
,
f1ap_dl_rrc
->
rnti
,
instance
);
/* mandatory */
/* c2. GNB_DU_UE_F1AP_ID */
...
...
@@ -213,8 +203,9 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
f1ap_dl_rrc
->
gNB_DU_ue_id
;
// TODO: f1ap_dl_rrc->gNB_DU_ue_id
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
f1ap_
get_du_ue_f1ap_id
(
&
f1ap_cu_ue
[
instance
],
f1ap_dl_rrc
->
rnti
);
//f1ap_
dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
LOG_I
(
CU_F1AP
,
"GNB_DU_UE_F1AP_ID %d associated with UE RNTI %x
\n
"
,
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
,
f1ap_dl_rrc
->
rnti
);
/* optional */
/* c3. oldgNB_DU_UE_F1AP_ID */
...
...
@@ -326,14 +317,14 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_ULRRCMessageTransferIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
,
true
);
cu_ue_f1ap_id
=
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
;
LOG_D
(
CU_F1AP
,
"cu_ue_f1ap_id %lu
\n
"
,
cu_ue_f1ap_id
);
LOG_D
(
CU_F1AP
,
"cu_ue_f1ap_id %lu
associated with RNTI %x
\n
"
,
cu_ue_f1ap_id
,
f1ap_get_rnti_by_cu_id
(
&
f1ap_cu_ue
[
instance
],
cu_ue_f1ap_id
)
);
/* GNB_DU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_ULRRCMessageTransferIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
du_ue_f1ap_id
=
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
;
LOG_D
(
CU_F1AP
,
"du_ue_f1ap_id %lu
\n
"
,
du_ue_f1ap_id
);
LOG_D
(
CU_F1AP
,
"du_ue_f1ap_id %lu
associated with RNTI %x
\n
"
,
du_ue_f1ap_id
,
f1ap_get_rnti_by_cu_id
(
&
f1ap_cu_ue
[
instance
],
du_ue_f1ap_id
)
);
/* mandatory */
...
...
openair2/F1AP/f1ap_du_rrc_message_transfer.c
View file @
d9661177
...
...
@@ -35,6 +35,7 @@
#include "f1ap_decoder.h"
#include "f1ap_itti_messaging.h"
#include "f1ap_du_rrc_message_transfer.h"
// undefine C_RNTI from
// openair1/PHY/LTE_TRANSPORT/transport_common.h which
// replaces in ie->value.choice.C_RNTI, causing
...
...
@@ -43,6 +44,11 @@
extern
f1ap_setup_req_t
*
f1ap_du_data
;
f1ap_cudu_ue_inst_t
f1ap_du_ue
[
MAX_eNB
];
/* DL RRC Message Transfer */
int
DU_handle_DL_RRC_MESSAGE_TRANSFER
(
instance_t
instance
,
uint32_t
assoc_id
,
...
...
@@ -88,8 +94,12 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_FIND_PROTOCOLIE_BY_ID
(
F1AP_DLRRCMessageTransferIEs_t
,
ie
,
container
,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
,
true
);
du_ue_f1ap_id
=
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
;
LOG_D
(
DU_F1AP
,
"du_ue_f1ap_id %lu
\n
"
,
du_ue_f1ap_id
);
LOG_D
(
DU_F1AP
,
"du_ue_f1ap_id %lu
\n
"
,
du_ue_f1ap_id
);
// this should be the one transmitted via initial ul rrc message transfer
if
(
f1ap_du_add_cu_ue_id
(
&
f1ap_du_ue
[
instance
],
du_ue_f1ap_id
,
cu_ue_f1ap_id
)
<
0
)
{
LOG_E
(
DU_F1AP
,
"Failed to find the F1AP UID
\n
"
);
//return -1;
}
/* optional */
/* oldgNB_DU_UE_F1AP_ID */
...
...
@@ -105,7 +115,6 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
srb_id
=
ie
->
value
.
choice
.
SRBID
;
LOG_D
(
DU_F1AP
,
"srb_id %lu
\n
"
,
srb_id
);
/* optional */
/* ExecuteDuplication */
if
(
0
)
{
...
...
@@ -122,7 +131,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_ProtocolIE_ID_id_RRCContainer
,
true
);
// BK: need check
// create an ITTI message and copy SDU
message_p
=
itti_alloc_new_message
(
TASK_
C
U_F1
,
RRC_MAC_CCCH_DATA_IND
);
message_p
=
itti_alloc_new_message
(
TASK_
D
U_F1
,
RRC_MAC_CCCH_DATA_IND
);
memset
(
RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
0
,
CCCH_SDU_SIZE
);
ccch_sdu_len
=
ie
->
value
.
choice
.
RRCContainer
.
size
;
memcpy
(
RRC_MAC_CCCH_DATA_IND
(
message_p
).
sdu
,
ie
->
value
.
choice
.
RRCContainer
.
buf
,
...
...
@@ -152,8 +161,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
}
//void DU_send_UL_RRC_MESSAGE_TRANSFER(F1AP_ULRRCMessageTransfer_t *ULRRCMessageTransfer) {
int
DU_send_UL_RRC_MESSAGE_TRANSFER
(
module_id_t
module_id
P
,
int
CC
_idP
,
int
DU_send_UL_RRC_MESSAGE_TRANSFER
(
protocol_ctxt_t
*
ctxt_p
P
,
rb_id_t
srb
_idP
,
uint8_t
*
sduP
,
sdu_size_t
sdu_lenP
)
{
...
...
@@ -182,7 +191,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
126L
;
ie
->
value
.
choice
.
GNB_CU_UE_F1AP_ID
=
f1ap_du_ue
[
ctxt_pP
->
module_id
].
cu_ue_f1ap_id
[
f1ap_get_uid_by_rnti
(
&
f1ap_du_ue
[
ctxt_pP
->
module_id
],
ctxt_pP
->
rnti
)]
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
...
...
@@ -191,7 +200,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
F1AP_get_UE_identifier
(
module_idP
,
CC_idP
,
0
)
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
f1ap_du_ue
[
ctxt_pP
->
module_id
].
du_ue_f1ap_id
[
f1ap_get_uid_by_rnti
(
&
f1ap_du_ue
[
ctxt_pP
->
module_id
],
ctxt_pP
->
rnti
)]
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
...
...
@@ -200,7 +209,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie
->
id
=
F1AP_ProtocolIE_ID_id_SRBID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_ULRRCMessageTransferIEs__value_PR_SRBID
;
ie
->
value
.
choice
.
SRBID
=
1
;
ie
->
value
.
choice
.
SRBID
=
srb_idP
;
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
// issue in here
...
...
@@ -236,6 +245,12 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
uint8_t
*
buffer
;
uint32_t
len
;
int
f1ap_uid
=
f1ap_add_ue
(
&
f1ap_du_ue
[
module_idP
],
module_idP
,
CC_idP
,
UE_id
,
rntiP
);
if
(
f1ap_uid
<
0
)
{
LOG_E
(
DU_F1AP
,
"Failed to add UE
\n
"
);
return
-
1
;
}
/* Create */
/* 0. Message Type */
...
...
@@ -254,7 +269,7 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
ie
->
id
=
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID
;
ie
->
criticality
=
F1AP_Criticality_reject
;
ie
->
value
.
present
=
F1AP_InitialULRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID
;
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
F1AP_get_UE_identifier
(
module_idP
,
CC_idP
,
UE_id
);
ie
->
value
.
choice
.
GNB_DU_UE_F1AP_ID
=
f1ap_du_ue
[
module_idP
].
du_ue_f1ap_id
[
f1ap_uid
];
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* mandatory */
...
...
@@ -311,3 +326,11 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
du_f1ap_itti_send_sctp_data_req
(
0
,
f1ap_du_data
->
assoc_id
,
buffer
,
len
,
0
);
return
0
;
}
void
init_f1ap_du_ue_inst
(
void
)
{
memset
(
f1ap_du_ue
,
0
,
sizeof
(
f1ap_du_ue
));
}
openair2/F1AP/f1ap_du_rrc_message_transfer.h
View file @
d9661177
...
...
@@ -39,8 +39,8 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t
stream
,
F1AP_F1AP_PDU_t
*
pdu
);
int
DU_send_UL_RRC_MESSAGE_TRANSFER
(
module_id_t
module_id
P
,
int
CC
_idP
,
int
DU_send_UL_RRC_MESSAGE_TRANSFER
(
protocol_ctxt_t
*
ctxt_p
P
,
rb_id_t
srb
_idP
,
uint8_t
*
sduP
,
sdu_size_t
sdu_lenP
);
...
...
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
d9661177
...
...
@@ -1135,7 +1135,7 @@ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){
pdcp_enb
[
ctxt_pP
->
module_id
].
rnti
[
i
]
=
ctxt_pP
->
rnti
;
pdcp_enb
[
ctxt_pP
->
module_id
].
uid
[
i
]
=
i
;
pdcp_enb
[
ctxt_pP
->
module_id
].
num_ues
++
;
printf
(
"add new uid is %d %x
\n\n
"
,
i
,
ctxt_pP
->
rnti
);
LOG_I
(
PDCP
,
"add new uid is %d %x
\n\n
"
,
i
,
ctxt_pP
->
rnti
);
// ret=1;
break
;
}
...
...
openair2/LAYER2/RLC/rlc.c
View file @
d9661177
...
...
@@ -707,7 +707,7 @@ void rlc_data_ind (
case
ngran_eNB_DU
:
case
ngran_gNB_DU
:
DU_send_UL_RRC_MESSAGE_TRANSFER
(
ctxt_pP
->
module_id
,
ctxt_pP
,
rb_idP
,
sdu_pP
,
sdu_sizeP
...
...
openair2/RRC/LTE/rrc_eNB.c
View file @
d9661177
...
...
@@ -5771,10 +5771,11 @@ rrc_eNB_generate_RRCConnectionSetup(
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_CU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
gNB_DU_ue_id
=
0
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
old_gNB_DU_ue_id
=
0xFFFFFFFF
;
// unknown
F1AP_DL_RRC_MESSAGE
(
message_p
).
rnti
=
ue_p
->
rnti
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
srb_id
=
CCCH
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
execute_duplication
=
1
;
F1AP_DL_RRC_MESSAGE
(
message_p
).
RAT_frequency_priority_information
.
en_dc
=
0
;
itti_send_msg_to_task
(
TASK_CU_F1
,
UE_MODULE_ID_TO_INSTANCE
(
ctxt_pP
->
module_id
)
,
message_p
);
itti_send_msg_to_task
(
TASK_CU_F1
,
ctxt_pP
->
module_id
,
message_p
);
LOG_D
(
RRC
,
"Send F1AP_DL_RRC_MESSAGE with ITTI
\n
"
);
break
;
case
ngran_eNB_DU
:
...
...
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