Commit 9dc22822 authored by Robert Schmidt's avatar Robert Schmidt

Remove 4G F1

parent ffecf830
...@@ -1581,7 +1581,7 @@ add_library(L2 ...@@ -1581,7 +1581,7 @@ add_library(L2
${ENB_APP_SRC} ${ENB_APP_SRC}
${MCE_APP_SRC} ${MCE_APP_SRC}
) )
target_link_libraries(L2 PRIVATE f1ap x2ap s1ap lte_rrc m2ap) target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_nr_rrc asn1_lte_rrc) target_link_libraries(L2 PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(MAC_NR ${MAC_NR_SRC}) add_library(MAC_NR ${MAC_NR_SRC})
...@@ -2193,7 +2193,6 @@ add_executable(lte-softmodem ...@@ -2193,7 +2193,6 @@ add_executable(lte-softmodem
${OPENAIR_DIR}/radio/COMMON/record_player.c ${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR2_DIR}/F1AP/dummy_enb.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
...@@ -2209,7 +2208,7 @@ add_dependencies(lte-softmodem oai_iqplayer) ...@@ -2209,7 +2208,7 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group -Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U f1ap SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${RAL_LIB} ${NAS_UE_LIB} ITTI SIMU ${RAL_LIB} ${NAS_UE_LIB} ITTI SIMU
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -2248,7 +2247,7 @@ add_dependencies(ocp-enb oai_iqplayer coding params_libconfig rfsimulator) ...@@ -2248,7 +2247,7 @@ add_dependencies(ocp-enb oai_iqplayer coding params_libconfig rfsimulator)
target_link_libraries (ocp-enb target_link_libraries (ocp-enb
-Wl,--start-group -Wl,--start-group
lte_rrc nr_rrc s1ap f1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
${RAL_LIB} ${NAS_UE_LIB} ITTI ${RAL_LIB} ${NAS_UE_LIB} ITTI
-Wl,--end-group z dl) -Wl,--end-group z dl)
...@@ -2277,7 +2276,7 @@ target_link_libraries(oairu PRIVATE asn1_nr_rrc asn1_lte_rrc) ...@@ -2277,7 +2276,7 @@ target_link_libraries(oairu PRIVATE asn1_nr_rrc asn1_lte_rrc)
# force the generation of ASN.1 so that we don't need to wait during the build # force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-softmodem PRIVATE target_link_libraries(lte-softmodem PRIVATE
asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap) asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap)
# lte-uesoftmodem is UE implementation # lte-uesoftmodem is UE implementation
...@@ -2322,7 +2321,7 @@ target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc) ...@@ -2322,7 +2321,7 @@ target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
# force the generation of ASN.1 so that we don't need to wait during the build # force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-uesoftmodem PRIVATE target_link_libraries(lte-uesoftmodem PRIVATE
asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap asn1_f1ap) asn1_lte_rrc asn1_s1ap asn1_m2ap asn1_m3ap asn1_x2ap)
# nr-softmodem # nr-softmodem
################################################### ###################################################
......
...@@ -1003,7 +1003,6 @@ INPUT = \ ...@@ -1003,7 +1003,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_task.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_task.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_interface_management.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_interface_management.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_ue_context_management.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_du_ue_context_management.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/dummy_enb.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_rrc_message_transfer.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_rrc_message_transfer.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_warning_message_transmission.c \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_warning_message_transmission.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_task.h \ @CMAKE_CURRENT_SOURCE_DIR@/../openair2/F1AP/f1ap_cu_task.h \
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
#include "lteRALenb.h" #include "lteRALenb.h"
#endif #endif
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
# include "f1ap_cu_task.h"
# include "f1ap_du_task.h"
# include "enb_app.h" # include "enb_app.h"
# include "openair2/LAYER2/MAC/mac_proto.h" # include "openair2/LAYER2/MAC/mac_proto.h"
#include <executables/split_headers.h> #include <executables/split_headers.h>
...@@ -45,7 +43,6 @@ extern RAN_CONTEXT_t RC; ...@@ -45,7 +43,6 @@ extern RAN_CONTEXT_t RC;
int create_tasks(uint32_t enb_nb) { int create_tasks(uint32_t enb_nb) {
LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_nb); LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_nb);
ngran_node_t type = RC.rrc[0]->node_type;
int rc; int rc;
if (enb_nb == 0) return 0; if (enb_nb == 0) return 0;
...@@ -60,7 +57,7 @@ int create_tasks(uint32_t enb_nb) { ...@@ -60,7 +57,7 @@ int create_tasks(uint32_t enb_nb) {
AssertFatal(rc >= 0, "Create task for SCTP failed\n"); AssertFatal(rc >= 0, "Create task for SCTP failed\n");
} }
if (EPC_MODE_ENABLED && !NODE_IS_DU(type) && ! ( split73==SPLIT73_DU ) ) { if (EPC_MODE_ENABLED && ! ( split73==SPLIT73_DU ) ) {
rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL); rc = itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL);
AssertFatal(rc >= 0, "Create task for S1AP failed\n"); AssertFatal(rc >= 0, "Create task for S1AP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
...@@ -74,17 +71,5 @@ int create_tasks(uint32_t enb_nb) { ...@@ -74,17 +71,5 @@ int create_tasks(uint32_t enb_nb) {
LOG_I(X2AP, "X2AP is disabled.\n"); LOG_I(X2AP, "X2AP is disabled.\n");
} }
if (NODE_IS_CU(type)) {
rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL);
AssertFatal(rc >= 0, "Create task for CU F1AP failed\n");
}
if (NODE_IS_DU(type)) {
rc = itti_create_task(TASK_DU_F1, F1AP_DU_task, NULL);
AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
}
return 0; return 0;
} }
...@@ -38,8 +38,6 @@ ...@@ -38,8 +38,6 @@
#include "lteRALenb.h" #include "lteRALenb.h"
#endif #endif
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
# include "f1ap_cu_task.h"
# include "f1ap_du_task.h"
# include "enb_app.h" # include "enb_app.h"
# include "mce_app.h" # include "mce_app.h"
# include "mme_app.h" # include "mme_app.h"
...@@ -49,7 +47,6 @@ ...@@ -49,7 +47,6 @@
int create_tasks_mbms(uint32_t enb_nb) { int create_tasks_mbms(uint32_t enb_nb) {
// LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_nb); // LOG_D(ENB_APP, "%s(enb_nb:%d\n", __FUNCTION__, enb_nb);
// ngran_node_t type = RC.rrc[0]->node_type;
AssertFatal(!get_softmodem_params()->nsa, "In NSA mode\n"); AssertFatal(!get_softmodem_params()->nsa, "In NSA mode\n");
int rc; int rc;
...@@ -80,17 +77,6 @@ int create_tasks_mbms(uint32_t enb_nb) { ...@@ -80,17 +77,6 @@ int create_tasks_mbms(uint32_t enb_nb) {
rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL); rc = itti_create_task(TASK_GTPV1_U, gtpv1uTask, NULL);
AssertFatal(rc >= 0, "Create task for GTPV1U failed\n"); AssertFatal(rc >= 0, "Create task for GTPV1U failed\n");
} }
///
// if (NODE_IS_CU(type)) {
// rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL);
// AssertFatal(rc >= 0, "Create task for CU F1AP failed\n");
// }
//
// if (NODE_IS_DU(type)) {
// rc = itti_create_task(TASK_DU_F1, F1AP_DU_task, NULL);
// AssertFatal(rc >= 0, "Create task for DU F1AP failed\n");
// }
//
if (is_m3ap_MCE_enabled()) { if (is_m3ap_MCE_enabled()) {
rc = itti_create_task(TASK_M3AP_MCE, m3ap_MCE_task, NULL); rc = itti_create_task(TASK_M3AP_MCE, m3ap_MCE_task, NULL);
......
...@@ -170,6 +170,24 @@ double cpuf; ...@@ -170,6 +170,24 @@ double cpuf;
int oaisim_flag=0; int oaisim_flag=0;
/* hardcoded into gtp_itf.cpp */
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const ue_id_t ue_id,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id)
{
abort();
}
/* forward declarations */ /* forward declarations */
void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]); void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]);
...@@ -383,26 +401,21 @@ void terminate_task(module_id_t mod_id, task_id_t from, task_id_t to) { ...@@ -383,26 +401,21 @@ void terminate_task(module_id_t mod_id, task_id_t from, task_id_t to) {
extern void free_transport(PHY_VARS_eNB *); extern void free_transport(PHY_VARS_eNB *);
extern void phy_free_RU(RU_t *); extern void phy_free_RU(RU_t *);
static void init_pdcp(void) { static void init_pdcp(void)
if (!NODE_IS_DU(RC.rrc[0]->node_type)) { {
pdcp_layer_init(); pdcp_layer_init();
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT; (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) if (IS_SOFTMODEM_NOS1)
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT;
pdcp_module_init(pdcp_initmask, 0); pdcp_module_init(pdcp_initmask, 0);
if (NODE_IS_CU(RC.rrc[0]->node_type)) { pdcp_set_rlc_data_req_func(rlc_data_req);
pdcp_set_rlc_data_req_func(cu_send_to_du); pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
} else {
pdcp_set_rlc_data_req_func(rlc_data_req);
pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
}
}
} }
static void wait_nfapi_init(char *thread_name) { static void wait_nfapi_init(char *thread_name) {
...@@ -420,7 +433,6 @@ int main ( int argc, char **argv ) ...@@ -420,7 +433,6 @@ int main ( int argc, char **argv )
{ {
int CC_id = 0; int CC_id = 0;
int ru_id; int ru_id;
int node_type = ngran_eNB;
start_background_system(); start_background_system();
...@@ -469,8 +481,7 @@ int main ( int argc, char **argv ) ...@@ -469,8 +481,7 @@ int main ( int argc, char **argv )
} }
if (RC.nb_inst > 0) { if (RC.nb_inst > 0) {
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks /* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks */
* for monolithic/F1 modes */
init_pdcp(); init_pdcp();
if (create_tasks(1) < 0) { if (create_tasks(1) < 0) {
...@@ -484,10 +495,9 @@ int main ( int argc, char **argv ) ...@@ -484,10 +495,9 @@ int main ( int argc, char **argv )
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
rrc_enb_process_itti_msg(NULL); rrc_enb_process_itti_msg(NULL);
} }
node_type = RC.rrc[0]->node_type;
} }
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) { if (RC.nb_inst > 0) {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
ctxt.module_id = 0 ; ctxt.module_id = 0 ;
ctxt.instance = 0; ctxt.instance = 0;
...@@ -498,54 +508,49 @@ int main ( int argc, char **argv ) ...@@ -498,54 +508,49 @@ int main ( int argc, char **argv )
pdcp_run(&ctxt); pdcp_run(&ctxt);
} }
/* start threads if only L1 or not a CU */ // init UE_PF_PO and mutex lock
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type) || NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { pthread_mutex_init(&ue_pf_po_mutex, NULL);
// init UE_PF_PO and mutex lock memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
pthread_mutex_init(&ue_pf_po_mutex, NULL); mlockall(MCL_CURRENT | MCL_FUTURE);
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs); pthread_cond_init(&sync_cond,NULL);
mlockall(MCL_CURRENT | MCL_FUTURE); pthread_mutex_init(&sync_mutex, NULL);
pthread_cond_init(&sync_cond,NULL);
pthread_mutex_init(&sync_mutex, NULL);
rt_sleep_ns(10*100000000ULL); rt_sleep_ns(10*100000000ULL);
if (NFAPI_MODE!=NFAPI_MONOLITHIC) { if (NFAPI_MODE!=NFAPI_MONOLITHIC) {
LOG_I(ENB_APP,"NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n"); LOG_I(ENB_APP,"NFAPI*** - mutex and cond created - will block shortly for completion of PNF connection\n");
pthread_cond_init(&sync_cond,NULL); pthread_cond_init(&sync_cond,NULL);
pthread_mutex_init(&sync_mutex, NULL); pthread_mutex_init(&sync_mutex, NULL);
} }
if (NFAPI_MODE==NFAPI_MODE_VNF) {// VNF if (NFAPI_MODE==NFAPI_MODE_VNF) {// VNF
#if defined(PRE_SCD_THREAD) #if defined(PRE_SCD_THREAD)
init_ru_vnf(); // ru pointer is necessary for pre_scd. init_ru_vnf(); // ru pointer is necessary for pre_scd.
#endif #endif
wait_nfapi_init("main?"); wait_nfapi_init("main?");
} }
LOG_I(ENB_APP,"START MAIN THREADS\n");
// start the main threads
number_of_cards = 1;
printf("RC.nb_L1_inst:%d\n", RC.nb_L1_inst);
if (RC.nb_L1_inst > 0) {
printf("Initializing eNB threads single_thread_flag:%d wait_for_sync:%d\n", get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
init_eNB(get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
}
for (int x=0; x < RC.nb_L1_inst; x++)
for (int CC_id=0; CC_id<RC.nb_L1_CC[x]; CC_id++) {
L1_rxtx_proc_t *L1proc= &RC.eNB[x][CC_id]->proc.L1_proc;
L1_rxtx_proc_t *L1proctx= &RC.eNB[x][CC_id]->proc.L1_proc_tx;
L1proc->threadPool = (tpool_t *)malloc(sizeof(tpool_t));
L1proc->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 )
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true);
else
initTpool("n", L1proc->threadPool, true);
initNotifiedFIFO(L1proc->respDecode);
L1proctx->threadPool = L1proc->threadPool;
}
LOG_I(ENB_APP,"START MAIN THREADS\n");
// start the main threads
number_of_cards = 1;
printf("RC.nb_L1_inst:%d\n", RC.nb_L1_inst);
if (RC.nb_L1_inst > 0) {
printf("Initializing eNB threads single_thread_flag:%d wait_for_sync:%d\n", get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
init_eNB(get_softmodem_params()->single_thread_flag,get_softmodem_params()->wait_for_sync);
}
for (int x=0; x < RC.nb_L1_inst; x++)
for (int CC_id=0; CC_id<RC.nb_L1_CC[x]; CC_id++) {
L1_rxtx_proc_t *L1proc= &RC.eNB[x][CC_id]->proc.L1_proc;
L1_rxtx_proc_t *L1proctx= &RC.eNB[x][CC_id]->proc.L1_proc_tx;
L1proc->threadPool = (tpool_t *)malloc(sizeof(tpool_t));
L1proc->respDecode=(notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
if ( strlen(get_softmodem_params()->threadPoolConfig) > 0 )
initTpool(get_softmodem_params()->threadPoolConfig, L1proc->threadPool, true);
else
initTpool("n", L1proc->threadPool, true);
initNotifiedFIFO(L1proc->respDecode);
L1proctx->threadPool = L1proc->threadPool;
} }
printf("wait_eNBs()\n"); printf("wait_eNBs()\n");
...@@ -627,7 +632,7 @@ int main ( int argc, char **argv ) ...@@ -627,7 +632,7 @@ int main ( int argc, char **argv )
// stop threads // stop threads
#if 0 //Disable clean up because this tends to crash (and unnecessary) #if 0 //Disable clean up because this tends to crash (and unnecessary)
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) { if (RC.nb_inst == 0) {
if(IS_SOFTMODEM_DOSCOPE) if(IS_SOFTMODEM_DOSCOPE)
end_forms(); end_forms();
......
...@@ -1027,27 +1027,20 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { ...@@ -1027,27 +1027,20 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) {
} }
void init_pdcp(void) { void init_pdcp(void) {
if (!NODE_IS_DU(RC.rrc[0]->node_type)) { pdcp_layer_init();
pdcp_layer_init(); uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ? (PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1) if (IS_SOFTMODEM_NOS1)
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT; pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_W_MBMS_BIT;
if ( split73!=SPLIT73_DU) if ( split73!=SPLIT73_DU)
pdcp_module_init(pdcp_initmask, 0); pdcp_module_init(pdcp_initmask, 0);
if (NODE_IS_CU(RC.rrc[0]->node_type)) { pdcp_set_rlc_data_req_func(rlc_data_req);
//pdcp_set_rlc_data_req_func(proto_agent_send_rlc_data_req); pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
} else {
pdcp_set_rlc_data_req_func(rlc_data_req);
pdcp_set_pdcp_data_ind_func(pdcp_data_ind);
}
} else {
//pdcp_set_pdcp_data_ind_func(proto_agent_send_pdcp_data_ind);
} }
} }
...@@ -1074,7 +1067,6 @@ int main ( int argc, char **argv ) { ...@@ -1074,7 +1067,6 @@ int main ( int argc, char **argv ) {
//mtrace(); //mtrace();
int i; int i;
int CC_id = 0; int CC_id = 0;
int node_type = ngran_eNB;
sf_ahead=4; // Bell Labs sf_ahead=4; // Bell Labs
AssertFatal(load_configmodule(argc,argv,0), "[SOFTMODEM] Error, configuration module init failed\n"); AssertFatal(load_configmodule(argc,argv,0), "[SOFTMODEM] Error, configuration module init failed\n");
logInit(); logInit();
...@@ -1137,8 +1129,7 @@ int main ( int argc, char **argv ) { ...@@ -1137,8 +1129,7 @@ int main ( int argc, char **argv ) {
if (RC.nb_inst > 0) { if (RC.nb_inst > 0) {
/* Start the agent. If it is turned off in the configuration, it won't start */ /* Start the agent. If it is turned off in the configuration, it won't start */
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks /* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks */
* for monolithic/F1 modes */
init_pdcp(); init_pdcp();
AssertFatal(create_tasks(1)==0,"cannot create ITTI tasks\n"); AssertFatal(create_tasks(1)==0,"cannot create ITTI tasks\n");
...@@ -1147,11 +1138,9 @@ int main ( int argc, char **argv ) { ...@@ -1147,11 +1138,9 @@ int main ( int argc, char **argv ) {
RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration; RRC_CONFIGURATION_REQ(msg_p) = RC.rrc[enb_id]->configuration;
itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); itti_send_msg_to_task (TASK_RRC_ENB, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
} }
node_type = RC.rrc[0]->node_type;
} }
if (RC.nb_inst > 0 && NODE_IS_CU(node_type)) { if (RC.nb_inst > 0) {
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
ctxt.module_id = 0 ; ctxt.module_id = 0 ;
ctxt.instance = 0; ctxt.instance = 0;
...@@ -1163,7 +1152,7 @@ int main ( int argc, char **argv ) { ...@@ -1163,7 +1152,7 @@ int main ( int argc, char **argv ) {
} }
/* start threads if only L1 or not a CU */ /* start threads if only L1 or not a CU */
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type) || NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) { if (RC.nb_inst == 0 || NFAPI_MODE == NFAPI_MODE_PNF || NFAPI_MODE == NFAPI_MODE_VNF) {
// init UE_PF_PO and mutex lock // init UE_PF_PO and mutex lock
pthread_mutex_init(&ue_pf_po_mutex, NULL); pthread_mutex_init(&ue_pf_po_mutex, NULL);
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs); memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
...@@ -1265,7 +1254,7 @@ int main ( int argc, char **argv ) { ...@@ -1265,7 +1254,7 @@ int main ( int argc, char **argv ) {
LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit); LOG_I(ENB_APP,"oai_exit=%d\n",oai_exit);
// stop threads // stop threads
if (RC.nb_inst == 0 || !NODE_IS_CU(node_type)) { if (RC.nb_inst == 0) {
if(IS_SOFTMODEM_DOSCOPE) if(IS_SOFTMODEM_DOSCOPE)
end_forms(); end_forms();
......
...@@ -269,24 +269,14 @@ typedef struct m2ap_setup_resp_s { ...@@ -269,24 +269,14 @@ typedef struct m2ap_setup_resp_s {
uint8_t num_mcch_config_per_mbsfn; uint8_t num_mcch_config_per_mbsfn;
// /// string holding gNB_CU_name
// char *gNB_CU_name;
// /// number of DU cells to activate
// uint16_t num_cells_to_activate; //0< num_cells_to_activate <= 512;
// /// mcc of DU cells
// //uint16_t mcc[M2AP_MAX_NB_CELLS];
uint16_t mcc;//[M2AP_MAX_NB_CELLS]; uint16_t mcc;//[M2AP_MAX_NB_CELLS];
/// mnc of DU cells
//uint16_t mnc[M2AP_MAX_NB_CELLS];
uint16_t mnc;//[M2AP_MAX_NB_CELLS]; uint16_t mnc;//[M2AP_MAX_NB_CELLS];
/// mnc digit length of DU cells
//uint8_t mnc_digit_length[M2AP_MAX_NB_CELLS];
uint8_t mnc_digit_length;//[M2AP_MAX_NB_CELLS]; uint8_t mnc_digit_length;//[M2AP_MAX_NB_CELLS];
// NR Global Cell Id // NR Global Cell Id
// uint64_t nr_cellid[M2AP_MAX_NB_CELLS]; // uint64_t nr_cellid[M2AP_MAX_NB_CELLS];
// /// NRPCI // /// NRPCI
// uint16_t nrpci[M2AP_MAX_NB_CELLS]; // uint16_t nrpci[M2AP_MAX_NB_CELLS];
// /// num SI messages per DU cell // /// num SI messages
// uint8_t num_SI[M2AP_MAX_NB_CELLS]; // uint8_t num_SI[M2AP_MAX_NB_CELLS];
// /// SI message containers (up to 21 messages per cell) // /// SI message containers (up to 21 messages per cell)
// uint8_t *SI_container[M2AP_MAX_NB_CELLS][21]; // uint8_t *SI_container[M2AP_MAX_NB_CELLS][21];
......
...@@ -85,7 +85,8 @@ extern RAN_CONTEXT_t RC; ...@@ -85,7 +85,8 @@ extern RAN_CONTEXT_t RC;
//} //}
//*****end M2AP ****/ //*****end M2AP ****/
static uint32_t eNB_app_register_m2(uint32_t enb_id_start, uint32_t enb_id_end) { static uint32_t eNB_app_register_m2(uint32_t enb_id_start, uint32_t enb_id_end)
{
uint32_t enb_id; uint32_t enb_id;
MessageDef *msg_p; MessageDef *msg_p;
uint32_t register_enb_m2_pending = 0; uint32_t register_enb_m2_pending = 0;
...@@ -142,38 +143,27 @@ static uint32_t eNB_app_handle_m2ap_mbms_session_update_req(instance_t instance) ...@@ -142,38 +143,27 @@ static uint32_t eNB_app_handle_m2ap_mbms_session_update_req(instance_t instance)
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static uint32_t eNB_app_register(ngran_node_t node_type,uint32_t enb_id_start, uint32_t enb_id_end) { static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)
{
uint32_t enb_id; uint32_t enb_id;
MessageDef *msg_p; MessageDef *msg_p;
uint32_t register_enb_pending = 0; uint32_t register_enb_pending = 0;
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) { for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
{ // S1AP registration
if (NODE_IS_DU(node_type)) { // F1AP registration /* note: there is an implicit relationship between the data structure and the message name */
// configure F1AP here for F1C msg_p = itti_alloc_new_message(TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n"); RCconfig_S1(msg_p, enb_id);
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SETUP_REQ);
RCconfig_DU_F1(msg_p, enb_id);
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
// configure GTPu here for F1U
}
else { // S1AP registration
/* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
RCconfig_S1(msg_p, enb_id);
if (enb_id == 0) RCconfig_gtpu(); if (enb_id == 0)
RCconfig_gtpu();
LOG_I(ENB_APP,"default drx %d\n",((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx)); LOG_I(ENB_APP, "default drx %d\n", ((S1AP_REGISTER_ENB_REQ(msg_p)).default_drx));
LOG_I(ENB_APP,"[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id)); LOG_I(ENB_APP, "[eNB %d] eNB_app_register via S1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
itti_send_msg_to_task (TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p); itti_send_msg_to_task(TASK_S1AP, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
}
register_enb_pending++; register_enb_pending++;
}
} }
return register_enb_pending; return register_enb_pending;
...@@ -220,19 +210,18 @@ void *eNB_app_task(void *args_p) { ...@@ -220,19 +210,18 @@ void *eNB_app_task(void *args_p) {
itti_mark_task_ready (TASK_ENB_APP); itti_mark_task_ready (TASK_ENB_APP);
/* Try to register each eNB */ /* Try to register each eNB */
// This assumes that node_type of all RRC instances is the same
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
register_enb_pending = eNB_app_register(RC.rrc[0]->node_type, enb_id_start, enb_id_end); register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
} }
/* Try to register each eNB with each other */ /* Try to register each eNB with each other */
if (is_x2ap_enabled() && !NODE_IS_DU(RC.rrc[0]->node_type)) { if (is_x2ap_enabled()) {
x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end); x2_register_enb_pending = eNB_app_register_x2 (enb_id_start, enb_id_end);
} }
/* Try to register each eNB with MCE each other */ /* Try to register each eNB with MCE each other */
if (is_m2ap_eNB_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) { if (is_m2ap_eNB_enabled()) {
//eNB_app_register_MBMS_STA(RC.rrc[0]->node_type, enb_id_start, enb_id_end); //eNB_app_register_MBMS_STA(enb_id_start, enb_id_end);
m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end); m2_register_enb_pending = eNB_app_register_m2 (enb_id_start, enb_id_end);
//if (timer_setup (5, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT, //if (timer_setup (5, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
...@@ -259,7 +248,6 @@ void *eNB_app_task(void *args_p) { ...@@ -259,7 +248,6 @@ void *eNB_app_task(void *args_p) {
break; break;
case S1AP_REGISTER_ENB_CNF: case S1AP_REGISTER_ENB_CNF:
AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
LOG_I(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), LOG_I(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
S1AP_REGISTER_ENB_CNF(msg_p).nb_mme); S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
...@@ -288,7 +276,7 @@ void *eNB_app_task(void *args_p) { ...@@ -288,7 +276,7 @@ void *eNB_app_task(void *args_p) {
sleep(ENB_REGISTER_RETRY_DELAY); sleep(ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */ /* Restart the registration process */
registered_enb = 0; registered_enb = 0;
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end); register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
} }
} }
} }
...@@ -296,50 +284,6 @@ void *eNB_app_task(void *args_p) { ...@@ -296,50 +284,6 @@ void *eNB_app_task(void *args_p) {
break; break;
case F1AP_SETUP_RESP:
AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
LOG_I(ENB_APP, "Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
DevAssert(register_enb_pending > 0);
register_enb_pending--;
/* Check if at least eNB is registered with one MME */
if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
registered_enb++;
}
/* Check if all register eNB requests have been processed */
if (register_enb_pending == 0) {
if (registered_enb == enb_nb) {
/* If all eNB cells are registered, start L2L1 task */
MessageDef *msg_init_p;
msg_init_p = itti_alloc_new_message (TASK_ENB_APP, 0, INITIALIZE_MESSAGE);
itti_send_msg_to_task (TASK_L2L1, INSTANCE_DEFAULT, msg_init_p);
} else {
LOG_W(ENB_APP, " %d eNB not associated with a MME, retrying registration in %d seconds ...\n",
enb_nb - registered_enb, ENB_REGISTER_RETRY_DELAY);
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
NULL, &enb_register_retry_timer_id) < 0) {
LOG_E(ENB_APP, " Can not start eNB register retry timer, use \"sleep\" instead!\n");
sleep(ENB_REGISTER_RETRY_DELAY);
/* Restart the registration process */
registered_enb = 0;
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p);
}
}
}
break;
case S1AP_DEREGISTERED_ENB_IND: case S1AP_DEREGISTERED_ENB_IND:
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
LOG_W(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), LOG_W(ENB_APP, "[eNB %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
...@@ -356,7 +300,7 @@ void *eNB_app_task(void *args_p) { ...@@ -356,7 +300,7 @@ void *eNB_app_task(void *args_p) {
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) { if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) {
/* Restart the registration process */ /* Restart the registration process */
registered_enb = 0; registered_enb = 0;
register_enb_pending = eNB_app_register (RC.rrc[0]->node_type, enb_id_start, enb_id_end); register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);
} }
if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) { if (TIMER_HAS_EXPIRED (msg_p).timer_id == x2_enb_register_retry_timer_id) {
...@@ -459,20 +403,6 @@ void *eNB_app_task(void *args_p) { ...@@ -459,20 +403,6 @@ void *eNB_app_task(void *args_p) {
case M2AP_SETUP_RESP: case M2AP_SETUP_RESP:
LOG_I(ENB_APP,"M2AP_SETUP_RESP RESPONSE received\n"); LOG_I(ENB_APP,"M2AP_SETUP_RESP RESPONSE received\n");
// AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/eNB\n");
// LOG_I(ENB_APP, "Received %s: associated ngran_eNB_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
// F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
//
// handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
// DevAssert(register_enb_pending > 0);
// register_enb_pending--;
// /* Check if at least eNB is registered with one MME */
// if (F1AP_SETUP_RESP(msg_p).num_cells_to_activate > 0) {
// registered_enb++;
// }
// /* Check if all register eNB requests have been processed */ // /* Check if all register eNB requests have been processed */
// if (register_enb_pending == 0) { // if (register_enb_pending == 0) {
...@@ -495,7 +425,7 @@ void *eNB_app_task(void *args_p) { ...@@ -495,7 +425,7 @@ void *eNB_app_task(void *args_p) {
// sleep(ENB_REGISTER_RETRY_DELAY); // sleep(ENB_REGISTER_RETRY_DELAY);
// /* Restart the registration process */ // /* Restart the registration process */
// registered_enb = 0; // registered_enb = 0;
// register_enb_pending = eNB_app_register (RC.rrc[0]->node_type,enb_id_start, enb_id_end);//, enb_properties_p); // register_enb_pending = eNB_app_register(enb_id_start, enb_id_end);//, enb_properties_p);
// } // }
// } // }
// } // }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -101,7 +101,7 @@ typedef struct ru_config_s { ...@@ -101,7 +101,7 @@ typedef struct ru_config_s {
} ru_config_t; } ru_config_t;
extern void RCconfig_L1(void); extern void RCconfig_L1(void);
extern void RCconfig_macrlc(int macrlc_has_f1[MAX_MAC_INST]); extern void RCconfig_macrlc(void);
extern void UE_config_stub_pnf(void); extern void UE_config_stub_pnf(void);
extern int RCconfig_gtpu(void ); extern int RCconfig_gtpu(void );
extern void RCConfig(void); extern void RCConfig(void);
...@@ -109,7 +109,7 @@ extern void RCConfig(void); ...@@ -109,7 +109,7 @@ extern void RCConfig(void);
void enb_config_display(void); void enb_config_display(void);
void ru_config_display(void); void ru_config_display(void);
int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1); int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc);
int RCconfig_S1(MessageDef *msg_p, uint32_t i); int RCconfig_S1(MessageDef *msg_p, uint32_t i);
void read_config_and_init(void); void read_config_and_init(void);
...@@ -119,8 +119,5 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i); ...@@ -119,8 +119,5 @@ int RCconfig_M2(MessageDef *msg_p, uint32_t i);
void fill_SL_configuration(RrcConfigurationReq *RRCcfg, ccparams_sidelink_t *SLconfig, int cell_idx, int cc_idx, char *config_fname); void fill_SL_configuration(RrcConfigurationReq *RRCcfg, ccparams_sidelink_t *SLconfig, int cell_idx, int cc_idx, char *config_fname);
void fill_eMTC_configuration(RrcConfigurationReq *RRCcfg, ccparams_eMTC_t *eMTCconfig, int cell_idx, int cc_idx, char *config_fname, char *brparamspath); void fill_eMTC_configuration(RrcConfigurationReq *RRCcfg, ccparams_eMTC_t *eMTCconfig, int cell_idx, int cc_idx, char *config_fname, char *brparamspath);
int RCconfig_DU_F1(MessageDef *msg_p, uint32_t i);
void handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
#endif /* ENB_CONFIG_H_ */ #endif /* ENB_CONFIG_H_ */
/** @} */ /** @} */
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "COMMON/platform_types.h"
#include "common/ran_context.h"
#include "common/utils/LOG/log.h"
#include "NR_BCCH-BCH-Message.h"
#include "NR_ServingCellConfigCommon.h"
#include "NR_MIB.h"
bool sdap_data_req(protocol_ctxt_t *ctxt_p,
const ue_id_t ue_id,
const srb_flag_t srb_flag,
const rb_id_t rb_id,
const mui_t mui,
const confirm_t confirm,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t pt_mode,
const uint32_t *sourceL2Id,
const uint32_t *destinationL2Id,
const uint8_t qfi,
const bool rqi,
const int pdusession_id) {
abort();
}
int dl_rrc_message(module_id_t module_id, const f1ap_dl_rrc_message_t *dl_rrc) {
abort();
}
int rrc_gNB_generate_pcch_msg(uint32_t tmsi,
uint8_t paging_drx,
instance_t instance,
uint8_t CC_id) {
abort();
}
...@@ -142,15 +142,9 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, ...@@ -142,15 +142,9 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
req->cell[i].nr_pci = servedCellInformation->nRPCI; req->cell[i].nr_pci = servedCellInformation->nRPCI;
LOG_D(F1AP, "req->nr_pci[%d] %d \n", i, req->cell[i].nr_pci); LOG_D(F1AP, "req->nr_pci[%d] %d \n", i, req->cell[i].nr_pci);
// LTS: FIXME data model failure: we don't KNOW if we receive a 4G or a 5G cell // LTS: FIXME cell_type is not a attribute of a cell in the data structure !!!!!!!!!!
// Furthermore, cell_type is not a attribute of a cell in the data structure !!!!!!!!!! f1ap_req(true, instance)->cell_type = CELL_MACRO_GNB;
if (RC.nrrrc &&
( RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CU ||
RC.nrrrc[GNB_INSTANCE_TO_MODULE_ID(instance)]->node_type == ngran_gNB_CUCP) )
f1ap_req(true, instance)->cell_type=CELL_MACRO_GNB;
else
f1ap_req(true, instance)->cell_type=CELL_MACRO_ENB;
// FDD Cells // FDD Cells
if (servedCellInformation->nR_Mode_Info.present==F1AP_NR_Mode_Info_PR_fDD) { if (servedCellInformation->nR_Mode_Info.present==F1AP_NR_Mode_Info_PR_fDD) {
struct fdd_s *FDDs=&req->nr_mode_info[i].fdd; struct fdd_s *FDDs=&req->nr_mode_info[i].fdd;
...@@ -558,198 +552,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu ...@@ -558,198 +552,6 @@ int CU_send_gNB_CU_CONFIGURATION_UPDATE(instance_t instance, f1ap_gnb_cu_configu
} }
} }
// c3. Cells_to_be_Deactivated_List
//
/*
if(!RC.nrrrc) {
// mandatory
// c3. Cells_to_be_Deactivated_List
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC3);
ieC3->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Deactivated_List;
ieC3->criticality = F1AP_Criticality_reject;
ieC3->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Deactivated_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC3->value.choice.Cells_to_be_Deactivated_List.list,
F1AP_Cells_to_be_Deactivated_List_ItemIEs_t, cells_to_be_deactivated);
cells_to_be_deactivated->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_deactivated->criticality = F1AP_Criticality_reject;
cells_to_be_deactivated->value.present = F1AP_Cells_to_be_Deactivated_List_ItemIEs__value_PR_Cells_to_be_Deactivated_List_Item;
// 3.1 cells to be Deactivated list item
F1AP_Cells_to_be_Deactivated_List_Item_t *cells_to_be_deactivated_list=
cells_to_be_deactivated->value.choice.Cells_to_be_Deactivated_List_Item;
addnRCGI(cells_to_be_deactivated_item->nRCGI, f1ap_setup_resp->cells_to_deactivate+i);
}
}
*/
// c4. GNB_CU_TNL_Association_To_Add_List
/*
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC4);
ieC4->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_List;
ieC4->criticality = F1AP_Criticality_reject;
ieC4->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Add_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC4->value.choice.GNB_CU_TNL_Association_To_Add_List.list,
F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs_t, gnb_cu_tnl_association_to_add;
gnb_cu_tnl_association_to_add->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Add_Item;
gnb_cu_tnl_association_to_add->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_add->value.present = F1AP_GNB_CU_TNL_Association_To_Add_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Add_Item;
// 4.1 GNB_CU_TNL_Association_To_Add_Item
F1AP_GNB_CU_TNL_Association_To_Add_Item_t *gnb_cu_tnl_association_to_add_item=
&gnb_cu_tnl_association_to_add_item_ies->value.choice.GNB_CU_TNL_Association_To_Add_Item;
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t *transportLayerAddress=;
gnb_cu_tnl_association_to_add->value.choice.GNB_CU_TNL_Association_To_Add_Item;
transportLayerAddress->present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress->choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
// 4.1.2 tNLAssociationUsage
gnb_cu_tnl_association_to_add_item->tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
}
*/
/*
// c5. GNB_CU_TNL_Association_To_Remove_List
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC5);
ieC5->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_List;
ieC5->criticality = F1AP_Criticality_reject;
ieC5->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Remove_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC5->value.choice.GNB_CU_TNL_Association_To_Remove_List.list,
F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs_t, gnb_cu_tnl_association_to_remove);
gnb_cu_tnl_association_to_remove->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Remove_Item;
gnb_cu_tnl_association_to_remove->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_remove->value.present = F1AP_GNB_CU_TNL_Association_To_Remove_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Remove_Item;
// 4.1 GNB_CU_TNL_Association_To_Remove_Item
F1AP_GNB_CU_TNL_Association_To_Remove_Item_t *gnb_cu_tnl_association_to_remove_item=
&gnb_cu_tnl_association_to_remove->value.choice.GNB_CU_TNL_Association_To_Remove_Item;
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t *transportLayerAddress=
&gnb_cu_tnl_association_to_remove_item->tNLAssociationTransportLayerAddress;
transportLayerAddress->present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress->choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
}
*/
/*
//mandatory
// c6. GNB_CU_TNL_Association_To_Update_List
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC6);
ieC6->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_List;
ieC6->criticality = F1AP_Criticality_reject;
ieC6->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_GNB_CU_TNL_Association_To_Update_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC3->value.choice.GNB_CU_TNL_Association_To_Update_List.list,
F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs_t, gnb_cu_tnl_association_to_update);
gnb_cu_tnl_association_to_update->id = F1AP_ProtocolIE_ID_id_GNB_CU_TNL_Association_To_Update_Item;
gnb_cu_tnl_association_to_update->criticality = F1AP_Criticality_reject;
gnb_cu_tnl_association_to_update->value.present = F1AP_GNB_CU_TNL_Association_To_Update_ItemIEs__value_PR_GNB_CU_TNL_Association_To_Update_Item;
// 4.1 GNB_CU_TNL_Association_To_Update_Item
F1AP_GNB_CU_TNL_Association_To_Update_Item_t *gnb_cu_tnl_association_to_update_item=
&gnb_cu_tnl_association_to_update->value.choice.GNB_CU_TNL_Association_To_Update_Item;
// 4.1.1 tNLAssociationTransportLayerAddress
F1AP_CP_TransportLayerAddress_t *transportLayerAddress=
&gnb_cu_tnl_association_to_update_item.tNLAssociationTransportLayerAddress;
transportLayerAddress->present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address;
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress->choice.endpoint_IP_address);
// memset((void *)&transportLayerAddress, 0, sizeof(F1AP_CP_TransportLayerAddress_t));
// transportLayerAddress.present = F1AP_CP_TransportLayerAddress_PR_endpoint_IP_address_and_port;
// transportLayerAddress.choice.endpoint_IP_address_and_port = (F1AP_Endpoint_IP_address_and_port_t *)calloc(1, sizeof(F1AP_Endpoint_IP_address_and_port_t));
// TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(1234, &transportLayerAddress.choice.endpoint_IP_address_and_port.endpoint_IP_address);
// 4.1.2 tNLAssociationUsage
if (1) {
gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = (F1AP_TNLAssociationUsage_t *)calloc(1, sizeof(F1AP_TNLAssociationUsage_t));
*gnb_cu_tnl_association_to_update_item.tNLAssociationUsage = F1AP_TNLAssociationUsage_non_ue;
}
}
*/
/*
// c7. Cells_to_be_Barred_List
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC7);
ieC7->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Barred_List;
ieC7->criticality = F1AP_Criticality_reject;
ieC7->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Cells_to_be_Barred_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC7->value.choice.Cells_to_be_Barred_List.list,
F1AP_Cells_to_be_Barred_ItemIEs_t,cells_to_be_barred);
cells_to_be_barred->id = F1AP_ProtocolIE_ID_id_Cells_to_be_Activated_List_Item;
cells_to_be_barred->criticality = F1AP_Criticality_reject;
cells_to_be_barred->value.present = F1AP_Cells_to_be_Barred_ItemIEs__value_PR_Cells_to_be_Barred_Item;
// 7.1 cells to be Deactivated list item
F1AP_Cells_to_be_Barred_Item_t *cells_to_be_barred_item=
&cells_to_be_barred_item_ies->value.choice.Cells_to_be_Barred_Item;
// - nRCGI
addnRCGI(cells_to_be_barred_item->nRCGI, f1ap_gnb_cu_configuration_update->cells_to_activate+i);
// 7.2 cellBarred
cells_to_be_barred_item->cellBarred = F1AP_CellBarred_not_barred;
}
*/
/*
// c8. Protected_EUTRA_Resources_List
asn1cSequenceAdd(cfgUpdate->protocolIEs.list, F1AP_GNBCUConfigurationUpdateIEs_t, ieC8);
ieC8->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
ieC8->criticality = F1AP_Criticality_reject;
ieC8->value.present = F1AP_GNBCUConfigurationUpdateIEs__value_PR_Protected_EUTRA_Resources_List;
for (int i=0; i<1; i++) {
asn1cSequenceAdd(ieC8->value.choice.Protected_EUTRA_Resources_List.list,
F1AP_Protected_EUTRA_Resources_ItemIEs_t, protected_eutra_resources);
// 8.1 SpectrumSharingGroupID
protected_eutra_resources->id = F1AP_ProtocolIE_ID_id_Protected_EUTRA_Resources_List;
protected_eutra_resources->criticality = F1AP_Criticality_reject;
protected_eutra_resources->value.present = F1AP_Protected_EUTRA_Resources_ItemIEs__value_PR_Protected_EUTRA_Resources_Item;
((F1AP_Protected_EUTRA_Resources_Item_t *)&protected_eutra_resources->value.choice.Protected_EUTRA_Resources_Item)->spectrumSharingGroupID = 123L;
memset(&protected_eutra_resources->value.choice.Protected_EUTRA_Resources_Item,0,
sizeof(F1AP_Protected_EUTRA_Resources_Item_t));
asn1cSequenceAdd(protected_eutra_resources->value.choice.ListofEUTRACellsinGNBDUCoordination.list,
F1AP_Served_EUTRA_Cells_Information_t, served_eutra_cells_information);
memset((void *)&served_eutra_cells_information, 0, sizeof(F1AP_Served_EUTRA_Cells_Information_t));
F1AP_EUTRA_Mode_Info_t *eUTRA_Mode_Info=
&served_eutra_cells_information.eUTRA_Mode_Info;
// eUTRAFDD
eUTRA_Mode_Info->present = F1AP_EUTRA_Mode_Info_PR_eUTRAFDD;
F1AP_EUTRA_FDD_Info_t *eutra_fdd_info = (F1AP_EUTRA_FDD_Info_t *)calloc(1, sizeof(F1AP_EUTRA_FDD_Info_t));
eutra_fdd_info->uL_offsetToPointA = 123L;
eutra_fdd_info->dL_offsetToPointA = 456L;
eUTRA_Mode_Info.choice.eUTRAFDD = eutra_fdd_info;
// eUTRATDD
// eUTRA_Mode_Info.present = F1AP_EUTRA_Mode_Info_PR_eUTRATDD;
// F1AP_EUTRA_TDD_Info_t *eutra_tdd_info;
// eutra_tdd_info = (F1AP_EUTRA_TDD_Info_t *)calloc(1, sizeof(F1AP_EUTRA_TDD_Info_t));
// eutra_tdd_info->uL_offsetToPointA = 123L;
// eutra_tdd_info->dL_offsetToPointA = 456L;
// eUTRA_Mode_Info.choice.eUTRATDD = eutra_tdd_info;
OCTET_STRING_fromBuf(&served_eutra_cells_information.protectedEUTRAResourceIndication, "asdsa1d32sa1d31asd31as",
strlen("asdsa1d32sa1d31asd31as"));
}
*/
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n"); LOG_E(F1AP, "Failed to encode F1 gNB-CU CONFIGURATION UPDATE\n");
......
...@@ -123,12 +123,7 @@ void *F1AP_CU_task(void *arg) { ...@@ -123,12 +123,7 @@ void *F1AP_CU_task(void *arg) {
eth_params_t *IPaddrs; eth_params_t *IPaddrs;
// Hardcoded instance id! // Hardcoded instance id!
if (RC.nrrrc && IPaddrs = &RC.nrrrc[0]->eth_params_s;
(RC.nrrrc[0]->node_type == ngran_gNB_CU ||
RC.nrrrc[0]->node_type == ngran_gNB_CUCP ) )
IPaddrs=&RC.nrrrc[0]->eth_params_s;
else
IPaddrs=&RC.rrc[0]->eth_params_s;
cu_task_send_sctp_init_req(0, IPaddrs->my_addr); cu_task_send_sctp_init_req(0, IPaddrs->my_addr);
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "rrc_extern.h" #include "rrc_extern.h"
#include "rrc_eNB_UE_context.h" #include "rrc_eNB_UE_context.h"
#include "openair2/RRC/NR/rrc_gNB_UE_context.h"
#include "rrc_eNB_S1AP.h" #include "rrc_eNB_S1AP.h"
#include "rrc_eNB_GTPV1U.h" #include "rrc_eNB_GTPV1U.h"
#include "openair2/RRC/NR/rrc_gNB_NGAP.h" #include "openair2/RRC/NR/rrc_gNB_NGAP.h"
...@@ -959,49 +958,15 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, ...@@ -959,49 +958,15 @@ int CU_handle_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, instance, ENB_FLAG_YES, rnti, 0, 0, instance); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, instance, ENB_FLAG_YES, rnti, 0, 0, instance);
if (f1ap_req(true, instance)->cell_type==CELL_MACRO_GNB) { struct rrc_gNB_ue_context_s *ue_context_p = rrc_gNB_get_ue_context(RC.nrrrc[instance], rnti);
struct rrc_gNB_ue_context_s *ue_context_p =
rrc_gNB_get_ue_context(RC.nrrrc[instance], rnti);
if (ue_context_p) {
MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE);
NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = ue_context_p->ue_context.gNB_ue_ngap_id;
itti_send_msg_to_task(TASK_NGAP, instance, msg);
rrc_gNB_remove_ue_context(&ctxt, RC.nrrrc[instance], ue_context_p);
} else {
LOG_E(F1AP, "could not find ue_context of UE RNTI %x\n", rnti);
}
if (ue_context_p) {
MessageDef *msg = itti_alloc_new_message(TASK_CU_F1, 0, NGAP_UE_CONTEXT_RELEASE_COMPLETE);
NGAP_UE_CONTEXT_RELEASE_COMPLETE(msg).gNB_ue_ngap_id = ue_context_p->ue_context.gNB_ue_ngap_id;
itti_send_msg_to_task(TASK_NGAP, instance, msg);
rrc_gNB_remove_ue_context(&ctxt, RC.nrrrc[instance], ue_context_p);
} else { } else {
struct rrc_eNB_ue_context_s *ue_context_p = LOG_E(F1AP, "could not find ue_context of UE RNTI %x\n", rnti);
rrc_eNB_get_ue_context(RC.rrc[instance], rnti);
if (ue_context_p) {
/* The following is normally done in the function rrc_rx_tx() */
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(instance,
ue_context_p->ue_context.eNB_ue_s1ap_id);
rrc_eNB_send_GTPV1U_ENB_DELETE_TUNNEL_REQ(instance, ue_context_p);
// erase data of GTP tunnels in UE context
for (int e_rab = 0; e_rab < ue_context_p->ue_context.nb_of_e_rabs; e_rab++) {
ue_context_p->ue_context.enb_gtp_teid[e_rab] = 0;
memset(&ue_context_p->ue_context.enb_gtp_addrs[e_rab],
0, sizeof(ue_context_p->ue_context.enb_gtp_addrs[e_rab]));
ue_context_p->ue_context.enb_gtp_ebi[e_rab] = 0;
}
struct rrc_ue_s1ap_ids_s *rrc_ue_s1ap_ids =
rrc_eNB_S1AP_get_ue_ids(RC.rrc[instance], 0,
ue_context_p->ue_context.eNB_ue_s1ap_id);
if (rrc_ue_s1ap_ids)
rrc_eNB_S1AP_remove_ue_ids(RC.rrc[instance], rrc_ue_s1ap_ids);
/* trigger UE release in RRC */
rrc_eNB_remove_ue_context(&ctxt, RC.rrc[instance], ue_context_p);
} else {
LOG_E(F1AP, "could not find ue_context of UE RNTI %x\n", rnti);
}
} }
pdcp_remove_UE(&ctxt); pdcp_remove_UE(&ctxt);
......
...@@ -58,38 +58,19 @@ ...@@ -58,38 +58,19 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h" #include "openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.h"
int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu);
/* DL RRC Message Transfer */ /* DL RRC Message Transfer */
int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id, uint32_t assoc_id,
uint32_t stream, uint32_t stream,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu) {
if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) {
LOG_I(F1AP, "node is gNB DU, call DU_handle_DL_NR_RRC_MESSAGE_TRANSFER \n");
return DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance, assoc_id, stream, pdu);
}
LOG_W(F1AP, "DU_handle_DL_RRC_MESSAGE_TRANSFER is a big race condition with rrc \n");
F1AP_DLRRCMessageTransfer_t *container; F1AP_DLRRCMessageTransfer_t *container;
F1AP_DLRRCMessageTransferIEs_t *ie; F1AP_DLRRCMessageTransferIEs_t *ie;
uint64_t cu_ue_f1ap_id; uint64_t cu_ue_f1ap_id;
uint64_t du_ue_f1ap_id; uint64_t du_ue_f1ap_id;
int executeDuplication; int executeDuplication;
sdu_size_t rrc_dl_sdu_len;
//uint64_t subscriberProfileIDforRFP; //uint64_t subscriberProfileIDforRFP;
//uint64_t rAT_FrequencySelectionPriority; //uint64_t rAT_FrequencySelectionPriority;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
if (stream != 0) {
LOG_E(F1AP, "[SCTP %d] Received F1 on stream != 0 (%d)\n",
assoc_id, stream);
return -1;
}
container = &pdu->choice.initiatingMessage->value.choice.DLRRCMessageTransfer; container = &pdu->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
/* GNB_CU_UE_F1AP_ID */ /* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
...@@ -102,8 +83,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -102,8 +83,7 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID; du_ue_f1ap_id = ie->value.choice.GNB_DU_UE_F1AP_ID;
LOG_D(F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n", LOG_D(F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n",
du_ue_f1ap_id, du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id)); f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id)); // this should be the one transmitted via initial ul rrc message transfer
// this should be the one transmitted via initial ul rrc message transfer
if (f1ap_du_add_cu_ue_id(instance,du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) { if (f1ap_du_add_cu_ue_id(instance,du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) {
LOG_E(F1AP, "Failed to find the F1AP UID \n"); LOG_E(F1AP, "Failed to find the F1AP UID \n");
...@@ -138,8 +118,6 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -138,8 +118,6 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
/* RRC Container */ /* RRC Container */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, true); F1AP_ProtocolIE_ID_id_RRCContainer, true);
rrc_dl_sdu_len = ie->value.choice.RRCContainer.size;
/* optional */ /* optional */
/* RAT_FrequencyPriorityInformation */ /* RAT_FrequencyPriorityInformation */
if (0) { if (0) {
...@@ -161,359 +139,25 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -161,359 +139,25 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
} }
} }
f1ap_dl_rrc_message_t dl_rrc = {
.rrc_container_length = ie->value.choice.RRCContainer.size,
.rrc_container = ie->value.choice.RRCContainer.buf,
.rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id),
.srb_id = srb_id
};
int rc = dl_rrc_message(instance, &dl_rrc);
if (rc == 0)
return 0; /* has been handled, otherwise continue below */
// decode RRC Container and act on the message type // decode RRC Container and act on the message type
AssertFatal(srb_id<3,"illegal srb_id\n"); AssertFatal(srb_id<3,"illegal srb_id\n");
protocol_ctxt_t ctxt; MessageDef *msg = itti_alloc_new_message(TASK_DU_F1, 0, NR_DU_RRC_DL_INDICATION);
ctxt.rntiMaybeUEid = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id); NRDuDlReq_t *req=&NRDuDlReq(msg);
ctxt.instance = instance; req->rnti=f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
ctxt.module_id = instance; req->srb_id=srb_id;
ctxt.enb_flag = 1; req->buf= get_free_mem_block( ie->value.choice.RRCContainer.size, __func__);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rntiMaybeUEid); memcpy(req->buf->data, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg);
if (srb_id == 0) {
LTE_DL_CCCH_Message_t *dl_ccch_msg=NULL;
asn_dec_rval_t dec_rval;
dec_rval = uper_decode(NULL,
&asn_DEF_LTE_DL_CCCH_Message,
(void **)&dl_ccch_msg,
ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len,0,0);
AssertFatal(dec_rval.code == RC_OK, "could not decode F1AP message\n");
switch (dl_ccch_msg->message.choice.c1.present) {
case LTE_DL_CCCH_MessageType__c1_PR_NOTHING:
LOG_I(F1AP, "Received PR_NOTHING on DL-CCCH-Message\n");
break;
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment:
LOG_I(F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n");
break;
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject:
LOG_I(F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n");
break;
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionReject:
LOG_I(F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n");
break;
case LTE_DL_CCCH_MessageType__c1_PR_rrcConnectionSetup: {
LOG_I(F1AP,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id));
// Get configuration
LTE_RRCConnectionSetup_t *rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n");
LTE_RadioResourceConfigDedicated_t *radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated;
// get SRB logical channel information
LTE_SRB_ToAddModList_t *SRB_configList = radioResourceConfigDedicated->srb_ToAddModList;
AssertFatal(SRB_configList!=NULL,"SRB_configList is null\n");
LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig = NULL;
for (int cnt = 0; cnt < (SRB_configList)->list.count; cnt++) {
if ((SRB_configList)->list.array[cnt]->srb_Identity == 1) {
LTE_SRB_ToAddMod_t * SRB1_config = (SRB_configList)->list.array[cnt];
if (SRB1_config->logicalChannelConfig) {
if (SRB1_config->logicalChannelConfig->present ==
LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
} else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
} else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
}
} // for
rrc_rlc_config_asn1_req(&ctxt,
SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL
, (LTE_PMCH_InfoList_r9_t *) NULL,
0,0
);
// This should be somewhere in the f1ap_cudu_ue_inst_t
/*int macrlc_instance = 0;
rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
*/
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
memcpy((void *)ue_p->Srb0.Tx_buffer.Payload,
(void *)ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len); // ie->value.choice.RRCContainer.size
ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
if (radioResourceConfigDedicated->mac_MainConfig)
mac_MainConfig = &radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
rrc_mac_config_req_eNB_t tmp = {0};
tmp.rnti = ctxt.rntiMaybeUEid;
tmp.physicalConfigDedicated = radioResourceConfigDedicated->physicalConfigDedicated;
tmp.mac_MainConfig = mac_MainConfig;
tmp.logicalChannelIdentity = 1;
tmp.logicalChannelConfig = SRB1_logicalChannelConfig;
rrc_mac_config_req_eNB(ctxt.instance, &tmp);
break;
} // case
default:
AssertFatal(1==0,
"Unknown message\n");
break;
}// switch case
return(0);
} else if (srb_id == 1) {
LTE_DL_DCCH_Message_t *dl_dcch_msg=NULL;
asn_dec_rval_t dec_rval;
dec_rval = uper_decode(NULL,
&asn_DEF_LTE_DL_DCCH_Message,
(void **)&dl_dcch_msg,
&ie->value.choice.RRCContainer.buf[1], // buf[0] includes the pdcp header
rrc_dl_sdu_len,0,0);
if ((dec_rval.code != RC_OK) && (dec_rval.consumed == 0))
LOG_E(F1AP," Failed to decode DL-DCCH (%zu bytes)\n",dec_rval.consumed);
else
LOG_D(F1AP, "Received message: present %d and c1 present %d\n",
dl_dcch_msg->message.present, dl_dcch_msg->message.choice.c1.present);
if (dl_dcch_msg->message.present == LTE_DL_DCCH_MessageType_PR_c1) {
switch (dl_dcch_msg->message.choice.c1.present) {
case LTE_DL_DCCH_MessageType__c1_PR_NOTHING:
LOG_I(F1AP, "Received PR_NOTHING on DL-DCCH-Message\n");
return 0;
case LTE_DL_DCCH_MessageType__c1_PR_dlInformationTransfer:
LOG_I(F1AP,"Received NAS DL Information Transfer\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_csfbParametersResponseCDMA2000:
LOG_I(F1AP,"Received NAS sfbParametersResponseCDMA2000\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_handoverFromEUTRAPreparationRequest:
LOG_I(F1AP,"Received NAS andoverFromEUTRAPreparationRequest\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_mobilityFromEUTRACommand:
LOG_I(F1AP,"Received NAS mobilityFromEUTRACommand\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionReconfiguration:
// handle RRCConnectionReconfiguration
LOG_I(F1AP,
"Logical Channel DL-DCCH (SRB1), Received RRCConnectionReconfiguration DU_ID %lx/RNTI %x\n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id));
LTE_RRCConnectionReconfiguration_t *rrcConnectionReconfiguration = &dl_dcch_msg->message.choice.c1.choice.rrcConnectionReconfiguration;
if (rrcConnectionReconfiguration->criticalExtensions.present == LTE_RRCConnectionReconfiguration__criticalExtensions_PR_c1) {
if (rrcConnectionReconfiguration->criticalExtensions.choice.c1.present ==
LTE_RRCConnectionReconfiguration__criticalExtensions__c1_PR_rrcConnectionReconfiguration_r8) {
LTE_RRCConnectionReconfiguration_r8_IEs_t *rrcConnectionReconfiguration_r8 =
&rrcConnectionReconfiguration->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r8;
if (rrcConnectionReconfiguration_r8->mobilityControlInfo) {
LOG_I(F1AP, "Mobility Control Information is present\n");
AssertFatal(1==0,"Can't handle this yet in DU\n");
}
if (rrcConnectionReconfiguration_r8->measConfig != NULL) {
LOG_I(F1AP, "Measurement Configuration is present\n");
}
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated) {
LOG_I(F1AP, "Radio Resource Configuration is present\n");
uint8_t DRB2LCHAN[8];
long drb_id;
int i;
LTE_DRB_ToAddModList_t *DRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToAddModList;
LTE_SRB_ToAddModList_t *SRB_configList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->srb_ToAddModList;
LTE_DRB_ToReleaseList_t *DRB_ReleaseList = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->drb_ToReleaseList;
LTE_MAC_MainConfig_t *mac_MainConfig = NULL;
for (i = 0; i< 8; i++) {
DRB2LCHAN[i] = 0;
}
if (rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig) {
LOG_D(F1AP, "MAC Main Configuration is present\n");
mac_MainConfig = &rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->mac_MainConfig->choice.explicitValue;
/* CDRX Configuration */
if (mac_MainConfig->drx_Config == NULL) {
LOG_W(F1AP, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else {
rrc_mac_drx_config_req_t req = {.rnti = ctxt.rntiMaybeUEid, .drx_Configuration = mac_MainConfig->drx_Config};
/* Send DRX configuration to MAC task to configure timers of local UE context */
eNB_Config_Local_DRX(instance, &req);
LOG_D(F1AP, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
}
/* End of CDRX configuration */
}
LTE_MeasGapConfig_t *measGapConfig = NULL;
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated = rrcConnectionReconfiguration_r8->radioResourceConfigDedicated->physicalConfigDedicated;
rrc_rlc_config_asn1_req(
&ctxt,
SRB_configList, // NULL, //LG-RK 14/05/2014 SRB_configList,
DRB_configList,
DRB_ReleaseList, (LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
);
if (SRB_configList != NULL) {
for (i = 0; (i < SRB_configList->list.count) && (i < 3); i++) {
if (SRB_configList->list.array[i]->srb_Identity == 1 ) {
ue_context_p->ue_context.Srb1.Active=1;
} else if (SRB_configList->list.array[i]->srb_Identity == 2 ) {
ue_context_p->ue_context.Srb2.Active=1;
ue_context_p->ue_context.Srb2.Srb_info.Srb_id=2;
LOG_I(F1AP, "[DU %ld] SRB2 is now active\n",ctxt.instance);
} else {
LOG_W(F1AP, "[DU %ld] invalid SRB identity %ld\n",ctxt.instance,
SRB_configList->list.array[i]->srb_Identity);
}
}
}
if (DRB_configList != NULL) {
for (i = 0; i < DRB_configList->list.count; i++) { // num max DRB (11-3-8)
if (DRB_configList->list.array[i]) {
drb_id = (int)DRB_configList->list.array[i]->drb_Identity;
LOG_I(F1AP,
"[DU %ld] Logical Channel UL-DCCH, Received RRCConnectionReconfiguration for UE rnti %lx, reconfiguring DRB %d/LCID %d\n",
ctxt.instance,
ctxt.rntiMaybeUEid,
(int)DRB_configList->list.array[i]->drb_Identity,
(int)*DRB_configList->list.array[i]->logicalChannelIdentity);
if (ue_context_p->ue_context.DRB_active[drb_id] == 0) {
ue_context_p->ue_context.DRB_active[drb_id] = 1;
if (DRB_configList->list.array[i]->logicalChannelIdentity) {
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
}
rrc_mac_config_req_eNB_t tmp = {0};
tmp.rnti = ue_context_p->ue_context.rnti;
tmp.physicalConfigDedicated = physicalConfigDedicated;
tmp.mac_MainConfig = mac_MainConfig;
tmp.logicalChannelIdentity = DRB2LCHAN[i];
tmp.logicalChannelConfig = DRB_configList->list.array[i]->logicalChannelConfig;
tmp.measGapConfig = measGapConfig;
rrc_mac_config_req_eNB(ctxt.instance, &tmp);
}
} else { // remove LCHAN from MAC/PHY
AssertFatal(1==0,"Can't handle this yet in DU\n");
}
}
}
}
}
}
break;
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionRelease:
// handle RRCConnectionRelease
LOG_I(F1AP, "Received RRCConnectionRelease\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_securityModeCommand:
LOG_I(F1AP, "Received securityModeCommand\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_ueCapabilityEnquiry:
LOG_I(F1AP, "Received ueCapabilityEnquiry\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_counterCheck:
case LTE_DL_DCCH_MessageType__c1_PR_loggedMeasurementConfiguration_r10:
case LTE_DL_DCCH_MessageType__c1_PR_rnReconfiguration_r10:
case LTE_DL_DCCH_MessageType__c1_PR_spare1:
case LTE_DL_DCCH_MessageType__c1_PR_spare2:
case LTE_DL_DCCH_MessageType__c1_PR_spare3:
break;
case LTE_DL_DCCH_MessageType__c1_PR_ueInformationRequest_r9:
LOG_I(F1AP, "Received ueInformationRequest_r9\n");
break;
case LTE_DL_DCCH_MessageType__c1_PR_rrcConnectionResume_r13:
LOG_I(F1AP, "Received rrcConnectionResume_r13\n");
}
}
} else if (srb_id == 2) {
}
LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", srb_id);
rlc_op_status_t rlc_status;
bool ret = true;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
//LOG_I(F1AP, "PRRCContainer size %lu:", ie->value.choice.RRCContainer.size);
//for (int i = 0; i < ie->value.choice.RRCContainer.size; i++)
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
//printf (", PDCP PDU size %d:", rrc_dl_sdu_len);
//for (int i=0;i<rrc_dl_sdu_len;i++) printf("%2x ",pdcp_pdu_p->data[i]);
//printf("\n");
if (pdcp_pdu_p != NULL) {
memset(pdcp_pdu_p->data, 0, rrc_dl_sdu_len);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len);
rlc_status = rlc_data_req(&ctxt
, 1
, MBMS_FLAG_NO
, srb_id
, 0
, 0
, rrc_dl_sdu_len
, pdcp_pdu_p
,NULL
,NULL
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
//LOG_I(F1AP, "Data sending request over RLC succeeded!\n");
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= false;
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= false;
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= false;
break;
default:
LOG_W(F1AP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= false;
break;
} // switch case
return ret;
} // if pdcp_pdu_p
return 0; return 0;
} }
...@@ -839,119 +483,3 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -839,119 +483,3 @@ int DU_send_UL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(DUtype, instance)->default_sctp_stream_id); f1ap_itti_send_sctp_data_req(false, instance, buffer, len, getCxt(DUtype, instance)->default_sctp_stream_id);
return 0; return 0;
} }
/* DL NR RRC Message Transfer */
int DU_handle_DL_NR_RRC_MESSAGE_TRANSFER(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
LOG_D(F1AP, "DU_handle_DL_NR_RRC_MESSAGE_TRANSFER \n");
F1AP_DLRRCMessageTransfer_t *container;
F1AP_DLRRCMessageTransferIEs_t *ie;
uint64_t cu_ue_f1ap_id;
uint64_t du_ue_f1ap_id;
int executeDuplication;
//uint64_t subscriberProfileIDforRFP;
//uint64_t rAT_FrequencySelectionPriority;
DevAssert(pdu != NULL);
container = &pdu->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
/* GNB_CU_UE_F1AP_ID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_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(F1AP, "cu_ue_f1ap_id %lu \n", cu_ue_f1ap_id);
/* GNB_DU_UE_F1AP_ID */
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(F1AP, "du_ue_f1ap_id %lu associated with UE RNTI %x \n",
du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id)); // this should be the one transmitted via initial ul rrc message transfer
if (f1ap_du_add_cu_ue_id(instance,du_ue_f1ap_id, cu_ue_f1ap_id) < 0 ) {
LOG_E(F1AP, "Failed to find the F1AP UID \n");
//return -1;
}
/* optional */
/* oldgNB_DU_UE_F1AP_ID */
if (0) {
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_oldgNB_DU_UE_F1AP_ID, true);
}
/* mandatory */
/* SRBID */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_SRBID, true);
uint64_t srb_id = ie->value.choice.SRBID;
LOG_D(F1AP, "srb_id %lu \n", srb_id);
/* optional */
/* ExecuteDuplication */
if (0) {
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_ExecuteDuplication, true);
executeDuplication = ie->value.choice.ExecuteDuplication;
LOG_D(F1AP, "ExecuteDuplication %d \n", executeDuplication);
}
// issue in here
/* mandatory */
/* RRC Container */
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, true);
// BK: need check
// create an ITTI message and copy SDU
// message_p = itti_alloc_new_message (TASK_CU_F1, RRC_MAC_CCCH_DATA_IND);
// memset (RRC_MAC_CCCH_DATA_IND (message_p).sdu, 0, CCCH_SDU_SIZE);
// memcpy(RRC_MAC_CCCH_DATA_IND (message_p).sdu, ie->value.choice.RRCContainer.buf,
// ccch_sdu_len);
//LOG_I(F1AP, "%s() RRCContainer size %lu: ", __func__, ie->value.choice.RRCContainer.size);
//for (int i = 0;i < ie->value.choice.RRCContainer.size; i++)
// printf("%02x ", ie->value.choice.RRCContainer.buf[i]);
//printf("\n");
/* optional */
/* RAT_FrequencyPriorityInformation */
if (0) {
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_DLRRCMessageTransferIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RAT_FrequencyPriorityInformation, true);
switch(ie->value.choice.RAT_FrequencyPriorityInformation.present) {
case F1AP_RAT_FrequencyPriorityInformation_PR_eNDC:
//subscriberProfileIDforRFP = ie->value.choice.RAT_FrequencyPriorityInformation.choice.subscriberProfileIDforRFP;
break;
case F1AP_RAT_FrequencyPriorityInformation_PR_nGRAN:
//rAT_FrequencySelectionPriority = ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority;
break;
default:
LOG_W(F1AP, "unhandled IE RAT_FrequencyPriorityInformation.present\n");
break;
}
}
f1ap_dl_rrc_message_t dl_rrc = {
.rrc_container_length = ie->value.choice.RRCContainer.size,
.rrc_container = ie->value.choice.RRCContainer.buf,
.rnti = f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id),
.srb_id = srb_id
};
int rc = dl_rrc_message(instance, &dl_rrc);
if (rc == 0)
return 0; /* has been handled, otherwise continue below */
// decode RRC Container and act on the message type
AssertFatal(srb_id<3,"illegal srb_id\n");
MessageDef *msg = itti_alloc_new_message(TASK_DU_F1, 0, NR_DU_RRC_DL_INDICATION);
NRDuDlReq_t *req=&NRDuDlReq(msg);
req->rnti=f1ap_get_rnti_by_du_id(DUtype, instance, du_ue_f1ap_id);
req->srb_id=srb_id;
req->buf= get_free_mem_block( ie->value.choice.RRCContainer.size, __func__);
memcpy(req->buf->data, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg);
return 0;
}
...@@ -150,14 +150,7 @@ void *F1AP_DU_task(void *arg) { ...@@ -150,14 +150,7 @@ void *F1AP_DU_task(void *arg) {
} break; } break;
case F1AP_UL_RRC_MESSAGE: // to rrc case F1AP_UL_RRC_MESSAGE: // to rrc
if (RC.nrrrc && RC.nrrrc[0]->node_type == ngran_gNB_DU) { DU_send_UL_NR_RRC_MESSAGE_TRANSFER(myInstance, &F1AP_UL_RRC_MESSAGE(msg));
DU_send_UL_NR_RRC_MESSAGE_TRANSFER(myInstance,
&F1AP_UL_RRC_MESSAGE(msg));
} else {
DU_send_UL_RRC_MESSAGE_TRANSFER(myInstance,
&F1AP_UL_RRC_MESSAGE(msg));
}
break; break;
case F1AP_UE_CONTEXT_SETUP_RESP: case F1AP_UE_CONTEXT_SETUP_RESP:
......
...@@ -182,23 +182,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -182,23 +182,6 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
drb_p->rlc_mode = RLC_MODE_TM; drb_p->rlc_mode = RLC_MODE_TM;
break; break;
} }
if (!(RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU)) {
transport_layer_addr_t addr;
memcpy(addr.buffer, &drb_p->up_ul_tnl[0].tl_address, sizeof(drb_p->up_ul_tnl[0].tl_address));
addr.length=sizeof(drb_p->up_ul_tnl[0].tl_address)*8;
drb_p->up_dl_tnl[0].teid = newGtpuCreateTunnel(INSTANCE_DEFAULT,
f1ap_ue_context_setup_req->rnti,
drb_p->drb_id,
drb_p->drb_id,
drb_p->up_ul_tnl[0].teid,
-1, // no qfi
addr,
drb_p->up_ul_tnl[0].port,
lteDURecvCb,
NULL);
drb_p->up_dl_tnl_length++;
}
} }
} }
...@@ -242,11 +225,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -242,11 +225,7 @@ int DU_handle_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
LOG_W(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer); LOG_W(F1AP, "can't find RRCContainer in UEContextSetupRequestIEs by id %ld \n", F1AP_ProtocolIE_ID_id_RRCContainer);
} }
if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
else
// in 4G, race conditon is to fix
DU_send_UE_CONTEXT_SETUP_RESPONSE(instance, f1ap_ue_context_setup_req);
return 0; return 0;
} }
...@@ -670,146 +649,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance, ...@@ -670,146 +649,6 @@ int DU_send_UE_CONTEXT_RELEASE_REQUEST(instance_t instance,
getCxt(false, instance)->default_sctp_stream_id); getCxt(false, instance)->default_sctp_stream_id);
return 0; return 0;
} }
/*int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
uint32_t assoc_id,
uint32_t stream,
F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseCommand_t *container;
F1AP_UEContextReleaseCommandIEs_t *ie;
protocol_ctxt_t ctxt;
DevAssert(pdu);
container = &pdu->choice.initiatingMessage->value.choice.UEContextReleaseCommand;
// GNB_CU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
ctxt.rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.instance = instance;
ctxt.module_id = instance;
ctxt.enb_flag = 1;
// GNB_DU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance,
ie->value.choice.GNB_DU_UE_F1AP_ID);
AssertFatal(ctxt.rnti == rnti,
"RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti, ctxt.rnti);
int UE_out_of_sync = 0;
if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) {
UE_iterator(RC.nrmac[instance]->UE_info.list, UE) {
if (UE->rnti == rnti) {
UE_out_of_sync = 0;
break;
}
}
if (!UE)
LOG_E(F1AP,"Not found rnti: %x\n", rnti);
} else {
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[instance]->UE_info.active[n] == true
&& rnti == UE_RNTI(instance, n)) {
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
break;
}
}
}
// We don't need the Cause
// Optional RRC Container: if present, send to UE
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie && !UE_out_of_sync) {
// RRC message and UE is reachable, send message
const sdu_size_t sdu_len = ie->value.choice.RRCContainer.size;
mem_block_t *pdu_p = NULL;
pdu_p = get_free_mem_block(sdu_len, __func__);
memcpy(&pdu_p->data[0], ie->value.choice.RRCContainer.buf, sdu_len);
rlc_op_status_t rlc_status = rlc_data_req(&ctxt
, 1
, MBMS_FLAG_NO
, 1 // SRB 1 correct?
, 0
, 0
, sdu_len
, pdu_p
,NULL
,NULL
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
break;
default:
LOG_W(F1AP, "RLC returned an unknown status code after F1AP placed "
"the order to send some data (Status Code:%d)\n", rlc_status);
break;
}
}
if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) {
// struct rrc_gNB_ue_context_s *ue_context_p;
f1ap_ue_context_release_cplt_t cplt;
cplt.rnti = ctxt.rnti;
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
return 0;
} else {
struct rrc_eNB_ue_context_s *ue_context_p;
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rnti);
if (ue_context_p && !UE_out_of_sync) {
// UE exists and is in sync so we start a timer before releasing the
// connection
pthread_mutex_lock(&rrc_release_freelist);
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 0) {
if (ue_context_p->ue_context.ue_release_timer_s1 > 0)
rrc_release_info.RRC_release_ctrl[release_num].flag = 1;
else
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rnti;
LOG_D(F1AP, "add rrc_release_info RNTI %x\n", ctxt.rnti);
// TODO: how to provide the correct MUI?
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0;
rrc_release_info.num_UEs++;
LOG_D(RRC,"Generate DLSCH Release send: index %d rnti %x mui %d flag %d \n",release_num,
ctxt.rnti, 0, rrc_release_info.RRC_release_ctrl[release_num].flag);
break;
}
}
pthread_mutex_unlock(&rrc_release_freelist);
ue_context_p->ue_context.ue_release_timer_s1 = 0;
} else if (ue_context_p && UE_out_of_sync) {
// UE exists and is out of sync, drop the connection
mac_eNB_rrc_ul_failure(instance, 0, 0, 0, rnti);
} else {
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti);
}
// TODO send this once the connection has really been released
f1ap_ue_context_release_cplt_t cplt;
cplt.rnti = ctxt.rnti;
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
return 0;
}
}*/
int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
uint32_t assoc_id, uint32_t assoc_id,
...@@ -817,7 +656,6 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -817,7 +656,6 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
F1AP_F1AP_PDU_t *pdu) { F1AP_F1AP_PDU_t *pdu) {
F1AP_UEContextReleaseCommand_t *container; F1AP_UEContextReleaseCommand_t *container;
F1AP_UEContextReleaseCommandIEs_t *ie; F1AP_UEContextReleaseCommandIEs_t *ie;
protocol_ctxt_t ctxt;
/* ITTI message to NR-RRC for the case of gNB-DU */ /* ITTI message to NR-RRC for the case of gNB-DU */
MessageDef *msg_p; // message to NR-RRC MessageDef *msg_p; // message to NR-RRC
...@@ -830,159 +668,48 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance, ...@@ -830,159 +668,48 @@ int DU_handle_UE_CONTEXT_RELEASE_COMMAND(instance_t instance,
// GNB_CU_UE_F1AP_ID // GNB_CU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_CU_UE_F1AP_ID, true);
if(RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU){ f1ap_ue_context_release_cmd->rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
f1ap_ue_context_release_cmd->rnti = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
}
else{
ctxt.rntiMaybeUEid = f1ap_get_rnti_by_cu_id(DUtype, instance, ie->value.choice.GNB_CU_UE_F1AP_ID);
ctxt.instance = instance;
ctxt.module_id = instance;
ctxt.enb_flag = 1;
}
// GNB_DU_UE_F1AP_ID // GNB_DU_UE_F1AP_ID
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true); F1AP_ProtocolIE_ID_id_gNB_DU_UE_F1AP_ID, true);
const rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance, const rnti_t rnti = f1ap_get_rnti_by_du_id(DUtype, instance,
ie->value.choice.GNB_DU_UE_F1AP_ID); ie->value.choice.GNB_DU_UE_F1AP_ID);
if(RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU){ AssertFatal(f1ap_ue_context_release_cmd->rnti == rnti, "RNTI obtained through DU ID (%x) is different from CU ID (%x)\n", rnti, f1ap_ue_context_release_cmd->rnti);
AssertFatal(f1ap_ue_context_release_cmd->rnti == rnti,
"RNTI obtained through DU ID (%x) is different from CU ID (%x)\n",
rnti, f1ap_ue_context_release_cmd->rnti);
}
else{
AssertFatal(ctxt.rntiMaybeUEid == rnti, "RNTI obtained through DU ID (%x) is different from CU ID (%lx)\n", rnti, ctxt.rntiMaybeUEid);
}
int UE_out_of_sync = 0;
if(RC.rrc && RC.rrc[instance]->node_type == ngran_eNB_DU){
for (int n = 0; n < MAX_MOBILES_PER_ENB; ++n) {
if (RC.mac[instance]->UE_info.active[n] == true
&& rnti == UE_RNTI(instance, n)) {
UE_out_of_sync = RC.mac[instance]->UE_info.UE_sched_ctrl[n].ul_out_of_sync;
break;
}
}
}
// We don't need the Cause // We don't need the Cause
// Optional RRC Container: if present, send to UE // Optional RRC Container: if present, send to UE
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
F1AP_ProtocolIE_ID_id_RRCContainer, false); F1AP_ProtocolIE_ID_id_RRCContainer, false);
if (ie && !UE_out_of_sync && RC.rrc && RC.rrc[instance]->node_type == ngran_eNB_DU) { f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size);
// RRC message and UE is reachable, send message memcpy(f1ap_ue_context_release_cmd->rrc_container, ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size);
const sdu_size_t sdu_len = ie->value.choice.RRCContainer.size;
mem_block_t *pdu_p = NULL;
pdu_p = get_free_mem_block(sdu_len, __func__);
memcpy(&pdu_p->data[0], ie->value.choice.RRCContainer.buf, sdu_len);
rlc_op_status_t rlc_status = rlc_data_req(&ctxt
, 1
, MBMS_FLAG_NO
, 1 // SRB 1 correct?
, 0
, 0
, sdu_len
, pdu_p
,NULL
,NULL
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(F1AP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(F1AP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container,
LOG_W(F1AP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); F1AP_ProtocolIE_ID_id_Cause, true);
break; switch (ie->value.choice.Cause.present){
case F1AP_Cause_PR_radioNetwork:
default: LOG_W (F1AP, "UE context release command cause is due to radioNetwork with specific code: %ld\n",ie->value.choice.Cause.choice.radioNetwork);
LOG_W(F1AP, "RLC returned an unknown status code after F1AP placed " f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
"the order to send some data (Status Code:%d)\n", rlc_status); break;
break; case F1AP_Cause_PR_transport:
} LOG_W (F1AP, "UE context release command cause is due to transport with specific code: %ld\n",ie->value.choice.Cause.choice.transport);
} f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_TRANSPORT;
else if(ie && RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) { break;
f1ap_ue_context_release_cmd->rrc_container = malloc(ie->value.choice.RRCContainer.size); case F1AP_Cause_PR_protocol:
memcpy(f1ap_ue_context_release_cmd->rrc_container, LOG_W (F1AP, "UE context release command cause is due to protocol with specific code: %ld\n",ie->value.choice.Cause.choice.protocol);
ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.size); f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_PROTOCOL;
} break;
case F1AP_Cause_PR_misc:
if (RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU) { LOG_W (F1AP, "UE context release command cause is misc with specific code: %ld \n",ie->value.choice.Cause.choice.misc);
F1AP_FIND_PROTOCOLIE_BY_ID(F1AP_UEContextReleaseCommandIEs_t, ie, container, f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_MISC;
F1AP_ProtocolIE_ID_id_Cause, true); break;
switch (ie->value.choice.Cause.present){ default:
case F1AP_Cause_PR_radioNetwork: LOG_W(F1AP, "Unknown cause for UE context release command\n");
LOG_W (F1AP, "UE context release command cause is due to radioNetwork with specific code: %ld\n",ie->value.choice.Cause.choice.radioNetwork); break;
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_RADIO_NETWORK;
break;
case F1AP_Cause_PR_transport:
LOG_W (F1AP, "UE context release command cause is due to transport with specific code: %ld\n",ie->value.choice.Cause.choice.transport);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_TRANSPORT;
break;
case F1AP_Cause_PR_protocol:
LOG_W (F1AP, "UE context release command cause is due to protocol with specific code: %ld\n",ie->value.choice.Cause.choice.protocol);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_PROTOCOL;
break;
case F1AP_Cause_PR_misc:
LOG_W (F1AP, "UE context release command cause is misc with specific code: %ld \n",ie->value.choice.Cause.choice.misc);
f1ap_ue_context_release_cmd->cause = F1AP_CAUSE_MISC;
break;
default:
LOG_W(F1AP, "Unknown cause for UE context release command\n");
break;
}
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
return 0;
} else {
struct rrc_eNB_ue_context_s *ue_context_p;
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[ctxt.instance], ctxt.rntiMaybeUEid);
if (ue_context_p && !UE_out_of_sync) {
// UE exists and is in sync so we start a timer before releasing the
// connection
pthread_mutex_lock(&rrc_release_freelist);
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 0) {
if (ue_context_p->ue_context.ue_release_timer_s1 > 0)
rrc_release_info.RRC_release_ctrl[release_num].flag = 1;
else
rrc_release_info.RRC_release_ctrl[release_num].flag = 2;
rrc_release_info.RRC_release_ctrl[release_num].rnti = ctxt.rntiMaybeUEid;
LOG_D(F1AP, "add rrc_release_info RNTI %lx\n", ctxt.rntiMaybeUEid);
// TODO: how to provide the correct MUI?
rrc_release_info.RRC_release_ctrl[release_num].rrc_eNB_mui = 0;
rrc_release_info.num_UEs++;
LOG_D(RRC, "Generate DLSCH Release send: index %d rnti %lx mui %d flag %d \n", release_num, ctxt.rntiMaybeUEid, 0, rrc_release_info.RRC_release_ctrl[release_num].flag);
break;
}
}
pthread_mutex_unlock(&rrc_release_freelist);
ue_context_p->ue_context.ue_release_timer_s1 = 0;
} else if (ue_context_p && UE_out_of_sync) {
// UE exists and is out of sync, drop the connection
mac_eNB_rrc_ul_failure(instance, 0, 0, 0, rnti);
} else {
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", rnti);
}
// TODO send this once the connection has really been released
f1ap_ue_context_release_cplt_t cplt;
cplt.rnti = ctxt.rntiMaybeUEid;
DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance, &cplt);
return 0;
} }
itti_send_msg_to_task(TASK_RRC_GNB, instance, msg_p);
return 0;
} }
int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance, int DU_send_UE_CONTEXT_RELEASE_COMPLETE(instance_t instance,
...@@ -1199,22 +926,6 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance, ...@@ -1199,22 +926,6 @@ int DU_handle_UE_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
drb_p->rlc_mode = RLC_MODE_TM; drb_p->rlc_mode = RLC_MODE_TM;
break; break;
} }
if (!(RC.nrrrc && RC.nrrrc[instance]->node_type == ngran_gNB_DU)) {
transport_layer_addr_t addr;
memcpy(addr.buffer, &drb_p->up_ul_tnl[0].tl_address, sizeof(drb_p->up_ul_tnl[0].tl_address));
addr.length=sizeof(drb_p->up_ul_tnl[0].tl_address)*8;
drb_p->up_dl_tnl[0].teid = newGtpuCreateTunnel(INSTANCE_DEFAULT,
f1ap_ue_context_modification_req->rnti,
drb_p->drb_id,
drb_p->drb_id,
drb_p->up_ul_tnl[0].teid,
-1, // no qfi
addr,
drb_p->up_ul_tnl[0].port,
lteDURecvCb,
NULL);
drb_p->up_dl_tnl_length++;
}
} }
} }
/* RRC Reconfiguration Complete indicator */ /* RRC Reconfiguration Complete indicator */
......
...@@ -469,25 +469,9 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id, ...@@ -469,25 +469,9 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
// check threshold // check threshold
if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) { if (UE_info->UE_sched_ctrl[UE_id].ul_failure_timer > 4000) {
// note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311) // note: probably ul_failure_timer should be less than UE radio link failure time(see T310/N310/N311)
if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) { // inform RRC of failure and clear timer
MessageDef *m = itti_alloc_new_message(TASK_PHY_ENB, 0, F1AP_UE_CONTEXT_RELEASE_REQ); LOG_I(MAC, "UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n", UE_id, rnti);
F1AP_UE_CONTEXT_RELEASE_REQ(m).rnti = rnti; mac_eNB_rrc_ul_failure(module_idP, CC_id, frameP, subframeP, rnti);
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_REQ(m).cause_value = 1; // 1 = F1AP_CauseRadioNetwork_rl_failure
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_REQ(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_DU_F1, module_idP, m);
} else {
// inform RRC of failure and clear timer
LOG_I(MAC, "UE %d rnti %x: UL Failure after repeated PDCCH orders: Triggering RRC \n",
UE_id,
rnti);
mac_eNB_rrc_ul_failure(module_idP,
CC_id,
frameP,
subframeP,
rnti);
}
UE_info->UE_sched_ctrl[UE_id].ul_failure_timer = 0; UE_info->UE_sched_ctrl[UE_id].ul_failure_timer = 0;
UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync = 1; UE_info->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
...@@ -974,14 +958,12 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -974,14 +958,12 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
} // end for loop on UE_id } // end for loop on UE_id
#if (!defined(PRE_SCD_THREAD)) #if (!defined(PRE_SCD_THREAD))
if (!NODE_IS_DU(RC.rrc[module_idP]->node_type)) { void rlc_tick(int, int);
void rlc_tick(int, int); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP, module_idP);
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP, module_idP); rlc_tick(frameP, subframeP);
rlc_tick(frameP, subframeP); pdcp_run(&ctxt);
pdcp_run(&ctxt); pdcp_mbms_run(&ctxt);
pdcp_mbms_run(&ctxt); rrc_rx_tx(&ctxt, CC_id);
rrc_rx_tx(&ctxt, CC_id);
}
#endif #endif
int do_fembms_si=0; int do_fembms_si=0;
......
...@@ -138,35 +138,6 @@ extern int oai_exit; ...@@ -138,35 +138,6 @@ extern int oai_exit;
pthread_t pdcp_stats_thread_desc; pthread_t pdcp_stats_thread_desc;
bool cu_f1u_data_req(
protocol_ctxt_t *ctxt_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_id,
const mui_t muiP,
const confirm_t confirmP,
const sdu_size_t sdu_buffer_size,
unsigned char *const sdu_buffer,
const pdcp_transmission_mode_t mode,
const uint32_t *const sourceL2Id,
const uint32_t *const destinationL2Id
) {
mem_block_t *memblock = get_free_mem_block(sdu_buffer_size, __func__);
if (memblock == NULL) {
LOG_E(RLC, "%s:%d:%s: ERROR: get_free_mem_block failed\n", __FILE__, __LINE__, __FUNCTION__);
exit(1);
}
memcpy(memblock->data,sdu_buffer, sdu_buffer_size);
// weird rb id management in 4G, not fully understand (looks bad design)
// overcomplex: if i understand, on the interface DRB start at 4 because there can be SRB 0..3
// but it would be much simpler to use absolute numbering
// instead of this "srb flag" associated to these +/-4
int ret=pdcp_data_ind(ctxt_pP,srb_flagP, false, rb_id-4, sdu_buffer_size, memblock, NULL, NULL);
if (!ret) {
LOG_E(RLC, "%s:%d:%s: ERROR: pdcp_data_ind failed\n", __FILE__, __LINE__, __FUNCTION__);
/* what to do in case of failure? for the moment: nothing */
}
return ret;
}
void *pdcp_stats_thread(void *param) { void *pdcp_stats_thread(void *param) {
FILE *fd; FILE *fd;
...@@ -204,31 +175,6 @@ uint64_t get_pdcp_optmask(void) { ...@@ -204,31 +175,6 @@ uint64_t get_pdcp_optmask(void) {
return pdcp_params.optmask; return pdcp_params.optmask;
} }
rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt,
const srb_flag_t srb_flag, const MBMS_flag_t MBMS_flag,
const rb_id_t rb_id, const mui_t mui,
confirm_t confirm, sdu_size_t size, mem_block_t *sdu,
const uint32_t *const sourceID, const uint32_t *const destID) {
MessageDef *message_p = itti_alloc_new_message_sized(TASK_PDCP_ENB, 0, GTPV1U_TUNNEL_DATA_REQ,
sizeof(gtpv1u_tunnel_data_req_t) +
size + GTPU_HEADER_OVERHEAD_MAX );
AssertFatal(message_p != NULL, "OUT OF MEMORY");
gtpv1u_tunnel_data_req_t *req=&GTPV1U_TUNNEL_DATA_REQ(message_p);
req->buffer = (uint8_t*)(req+1);
memcpy(req->buffer + GTPU_HEADER_OVERHEAD_MAX,
sdu->data,
size );
req->length = size;
req->offset = GTPU_HEADER_OVERHEAD_MAX;
req->ue_id = ctxt->rntiMaybeUEid;
req->bearer_id = rb_id+4;
LOG_D(PDCP, "%s() (drb %ld) sending message to gtp size %d\n",
__func__, rb_id, size);
extern instance_t CUuniqInstance;
itti_send_msg_to_task(TASK_GTPV1_U, CUuniqInstance, message_p);
return true;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/* /*
* If PDCP_UNIT_TEST is set here then data flow between PDCP and RLC is broken * If PDCP_UNIT_TEST is set here then data flow between PDCP and RLC is broken
...@@ -326,7 +272,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP, ...@@ -326,7 +272,7 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP); LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %ld \n", srb_flagP, rb_idP);
} }
rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)?MBMS_FLAG_NO:MBMS_FLAG_YES, rb_idP, muiP, rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP,
confirmP, sdu_buffer_sizeP, pdcp_pdu_p,NULL,NULL); confirmP, sdu_buffer_sizeP, pdcp_pdu_p,NULL,NULL);
} else { } else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES; rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
...@@ -488,98 +434,73 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP, ...@@ -488,98 +434,73 @@ bool pdcp_data_req(protocol_ctxt_t *ctxt_pP,
"[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP); "[MSG] PDCP DL %s PDU on rb_id %ld\n",(srb_flagP)? "CONTROL" : "DATA", rb_idP);
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) { if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) {
LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %lx, node_type %d \n", rb_idP, pdcp_pdu_size, ctxt_pP->rntiMaybeUEid, RC.rrc ? RC.rrc[ctxt_pP->module_id]->node_type : -1); LOG_D(PDCP, "pdcp data req on drb %ld, size %d, rnti %lx\n", rb_idP, pdcp_pdu_size, ctxt_pP->rntiMaybeUEid);
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) { rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
LOG_E(PDCP, "Can't be DU, bad node type %d \n", RC.rrc[ctxt_pP->module_id]->node_type); confirmP, pdcp_pdu_size, pdcp_pdu_p,sourceL2Id,
ret = false; destinationL2Id);
} else { ret = false;
rlc_status = pdcp_params.send_rlc_data_req_func(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, switch (rlc_status) {
confirmP, pdcp_pdu_size, pdcp_pdu_p,sourceL2Id, case RLC_OP_STATUS_OK:
destinationL2Id); LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret = false; ret=true;
switch (rlc_status) { break;
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER: case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
break; break;
case RLC_OP_STATUS_INTERNAL_ERROR: case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
break; break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
break; break;
default: default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
break; break;
} // switch case } // switch case
} /* end if node_type is not DU */
} else { // SRB } else { // SRB
if (ctxt_pP->enb_flag == ENB_FLAG_YES && NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rlc_status = rlc_data_req(ctxt_pP
// DL transfer , srb_flagP
MessageDef *message_p; , MBMS_FLAG_NO
// Note: the acyual task must be TASK_PDCP_ENB, but this task is not created , rb_idP
message_p = itti_alloc_new_message (TASK_PDCP_ENB, 0, F1AP_DL_RRC_MESSAGE); , muiP
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = &pdcp_pdu_p->data[0] ; , confirmP
F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = pdcp_pdu_size; , pdcp_pdu_size
F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0; , pdcp_pdu_p
F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0; ,NULL
F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown ,NULL
F1AP_DL_RRC_MESSAGE(message_p).rnti = ctxt_pP->rntiMaybeUEid; );
F1AP_DL_RRC_MESSAGE (message_p).srb_id = rb_idP;
F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1; switch (rlc_status) {
F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0; case RLC_OP_STATUS_OK:
itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p); LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
//CU_send_DL_RRC_MESSAGE_TRANSFER(ctxt_pP->module_id, message_p); ret=true;
LOG_I(PDCP, "Send F1AP_DL_RRC_MESSAGE with ITTI\n"); break;
ret=true;
} else {
rlc_status = rlc_data_req(ctxt_pP
, srb_flagP
, MBMS_FLAG_NO
, rb_idP
, muiP
, confirmP
, pdcp_pdu_size
, pdcp_pdu_p
,NULL
,NULL
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=true;
break;
case RLC_OP_STATUS_BAD_PARAMETER: case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= false; ret= false;
break; break;
case RLC_OP_STATUS_INTERNAL_ERROR: case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= false; ret= false;
break; break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= false; ret= false;
break; break;
default: default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= false; ret= false;
break; break;
} // switch case } // switch case
}
} }
} }
......
...@@ -420,10 +420,6 @@ pdcp_data_ind_func_t get_pdcp_data_ind_func(void); ...@@ -420,10 +420,6 @@ pdcp_data_ind_func_t get_pdcp_data_ind_func(void);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
int pdcp_fifo_flush_mbms_sdus ( const protocol_ctxt_t *const ctxt_pP); int pdcp_fifo_flush_mbms_sdus ( const protocol_ctxt_t *const ctxt_pP);
int pdcp_fifo_read_input_mbms_sdus_fromtun ( const protocol_ctxt_t *const ctxt_pP); int pdcp_fifo_read_input_mbms_sdus_fromtun ( const protocol_ctxt_t *const ctxt_pP);
rlc_op_status_t cu_send_to_du(const protocol_ctxt_t *const ctxt_pP,
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
const rb_id_t rb_idP, const mui_t muiP,
confirm_t confirmP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP, const uint32_t *const, const uint32_t *const);
/* /*
* Following two types are utilized between NAS driver and PDCP * Following two types are utilized between NAS driver and PDCP
......
...@@ -412,37 +412,6 @@ rb_found: ...@@ -412,37 +412,6 @@ rb_found:
T(T_ENB_RLC_UL, T(T_ENB_RLC_UL,
T_INT(0 /*ctxt_pP->module_id*/), T_INT(0 /*ctxt_pP->module_id*/),
T_INT(ue->rnti), T_INT(rb_id), T_INT(size)); T_INT(ue->rnti), T_INT(rb_id), T_INT(size));
const ngran_node_t type = RC.rrc[0 /*ctxt_pP->module_id*/]->node_type;
AssertFatal(!NODE_IS_CU(type),
"Can't be CU, bad node type %d\n", type);
if (NODE_IS_DU(type)) {
if (is_srb == 1) {
MessageDef *msg = itti_alloc_new_message_sized(TASK_RLC_ENB, 0, F1AP_UL_RRC_MESSAGE, sizeof(*msg) + size);
F1AP_UL_RRC_MESSAGE(msg).rrc_container = (uint8_t*)(msg+1);
memcpy(F1AP_UL_RRC_MESSAGE(msg).rrc_container, buf, size);
F1AP_UL_RRC_MESSAGE(msg).rnti = ue->rnti;
F1AP_UL_RRC_MESSAGE(msg).srb_id = rb_id;
F1AP_UL_RRC_MESSAGE(msg).rrc_container_length = size;
itti_send_msg_to_task(TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(0 /*ctxt_pP->module_id*/), msg);
return;
} else {
// Fixme: very dirty workaround of incomplete F1-U implementation
instance_t DUuniqInstance=0;
MessageDef *msg = itti_alloc_new_message_sized(TASK_RLC_ENB, 0, GTPV1U_TUNNEL_DATA_REQ, sizeof(gtpv1u_tunnel_data_req_t) + size);
gtpv1u_tunnel_data_req_t *req=&GTPV1U_TUNNEL_DATA_REQ(msg);
req->buffer=(uint8_t*)(req+1);
memcpy(req->buffer,buf,size);
req->length=size;
req->offset=0;
req->ue_id=ue->rnti;
req->bearer_id=rb_id+4;
LOG_D(RLC, "Received uplink user-plane traffic at RLC-DU to be sent to the CU, size %d \n", size);
itti_send_msg_to_task(TASK_GTPV1_U, DUuniqInstance, msg);
return;
}
}
} }
memblock = get_free_mem_block(size, __func__); memblock = get_free_mem_block(size, __func__);
......
...@@ -111,9 +111,7 @@ void m2ap_MCE_handle_sctp_association_resp(instance_t instance, sctp_new_associa ...@@ -111,9 +111,7 @@ void m2ap_MCE_handle_sctp_association_resp(instance_t instance, sctp_new_associa
sctp_new_association_resp->ulp_cnx_id); sctp_new_association_resp->ulp_cnx_id);
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN) if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN)
//proto_agent_stop(instance); return;
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
return; // exit -1 for debugging
} }
// go to an init func // go to an init func
......
...@@ -75,7 +75,7 @@ int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id ...@@ -75,7 +75,7 @@ int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStartRequest_Ies__value_PR_MCE_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStartRequest_Ies__value_PR_MCE_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -140,7 +140,7 @@ int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id ...@@ -140,7 +140,7 @@ int MCE_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id
// ie->id = M2AP_ProtocolIE_ID_id_TNL_Information_1; // ie->id = M2AP_ProtocolIE_ID_id_TNL_Information_1;
// ie->criticality = M2AP_Criticality_reject; // ie->criticality = M2AP_Criticality_reject;
// ie->value.present = M2AP_SessionStartRequest_Ies__value_PR_TNL_Information_1; // ie->value.present = M2AP_SessionStartRequest_Ies__value_PR_TNL_Information_1;
// //asn_int642INTEGER(&ie->value.choice.MBMS_Session_ID, f1ap_du_data->MBMS_Session_ID); //? // //asn_int642INTEGER(&ie->value.choice.MBMS_Session_ID, 0);
// asn1cSeqAdd(&out->protocolIEs.list, ie); // asn1cSeqAdd(&out->protocolIEs.list, ie);
} }
...@@ -258,7 +258,7 @@ int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m2ap_session_stop_re ...@@ -258,7 +258,7 @@ int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m2ap_session_stop_re
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStopRequest_Ies__value_PR_MCE_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStopRequest_Ies__value_PR_MCE_MBMS_M2AP_ID;
ie->value.choice.MCE_MBMS_M2AP_ID = 0; /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -267,7 +267,7 @@ int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m2ap_session_stop_re ...@@ -267,7 +267,7 @@ int MCE_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m2ap_session_stop_re
ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStopRequest_Ies__value_PR_ENB_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStopRequest_Ies__value_PR_ENB_MBMS_M2AP_ID;
ie->value.choice.ENB_MBMS_M2AP_ID = 0;/*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? ie->value.choice.ENB_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -1437,7 +1437,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d ...@@ -1437,7 +1437,7 @@ int MCE_handle_MBMS_SESSION_COUNTING_FAILURE(instance_t instance, module_id_t d
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID; ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID; ie->value.present = M2AP_MbmsServiceCountingRequest_Ies__value_PR_MBSFN_Area_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
// //ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID; // //ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID;
// //ie->criticality = M2AP_Criticality_reject; // //ie->criticality = M2AP_Criticality_reject;
// //ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID; // //ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID;
// //asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, f1ap_du_data->gNB_eNB_id); // //asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, 0);
// //asn1cSeqAdd(&out->protocolIEs.list, ie); // //asn1cSeqAdd(&out->protocolIEs.list, ie);
// //
// /* optional */ // /* optional */
......
...@@ -234,7 +234,7 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms ...@@ -234,7 +234,7 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms
// ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; // ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
// ie->criticality = M2AP_Criticality_reject; // ie->criticality = M2AP_Criticality_reject;
// ie->value.present = M2AP_MbmsSchedulingInformationResponse_Ies__value_PR_MCE_MBMS_M2AP_ID; // ie->value.present = M2AP_MbmsSchedulingInformationResponse_Ies__value_PR_MCE_MBMS_M2AP_ID;
// //ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? // //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
// asn1cSeqAdd(&out->protocolIEs.list, ie); // asn1cSeqAdd(&out->protocolIEs.list, ie);
// //
// /* mandatory */ // /* mandatory */
...@@ -243,7 +243,7 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms ...@@ -243,7 +243,7 @@ int eNB_send_MBMS_SCHEDULING_INFORMATION_RESPONSE(instance_t instance, m2ap_mbms
// ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID; // ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
// ie->criticality = M2AP_Criticality_reject; // ie->criticality = M2AP_Criticality_reject;
// ie->value.present = M2AP_MbmsSchedulingInformationResponse_Ies__value_PR_ENB_MBMS_M2AP_ID; // ie->value.present = M2AP_MbmsSchedulingInformationResponse_Ies__value_PR_ENB_MBMS_M2AP_ID;
// //ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? // //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
// asn1cSeqAdd(&out->protocolIEs.list, ie); // asn1cSeqAdd(&out->protocolIEs.list, ie);
// //
...@@ -329,7 +329,7 @@ int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start ...@@ -329,7 +329,7 @@ int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStartResponse_Ies__value_PR_MCE_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStartResponse_Ies__value_PR_MCE_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -338,7 +338,7 @@ int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start ...@@ -338,7 +338,7 @@ int eNB_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m2ap_session_start
ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStartResponse_Ies__value_PR_ENB_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStartResponse_Ies__value_PR_ENB_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -395,7 +395,7 @@ int eNB_send_MBMS_SESSION_START_FAILURE(instance_t instance, m2ap_session_start_ ...@@ -395,7 +395,7 @@ int eNB_send_MBMS_SESSION_START_FAILURE(instance_t instance, m2ap_session_start_
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStartFailure_Ies__value_PR_MCE_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStartFailure_Ies__value_PR_MCE_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -493,7 +493,7 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r ...@@ -493,7 +493,7 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStopResponse_Ies__value_PR_MCE_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStopResponse_Ies__value_PR_MCE_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -502,7 +502,7 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r ...@@ -502,7 +502,7 @@ int eNB_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m2ap_session_stop_r
ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_SessionStopResponse_Ies__value_PR_ENB_MBMS_M2AP_ID; ie->value.present = M2AP_SessionStopResponse_Ies__value_PR_ENB_MBMS_M2AP_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -579,7 +579,7 @@ int eNB_send_M2_SETUP_REQUEST(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t* ...@@ -579,7 +579,7 @@ int eNB_send_M2_SETUP_REQUEST(m2ap_eNB_instance_t *instance_p, m2ap_eNB_data_t*
//ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID; //ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID;
//ie->criticality = M2AP_Criticality_reject; //ie->criticality = M2AP_Criticality_reject;
//ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID; //ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID;
//asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, f1ap_du_data->gNB_eNB_id); //asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, 0);
//asn1cSeqAdd(&out->protocolIEs.list, ie); //asn1cSeqAdd(&out->protocolIEs.list, ie);
/* optional */ /* optional */
...@@ -1290,7 +1290,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service ...@@ -1290,7 +1290,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service
ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID; ie->id = M2AP_ProtocolIE_ID_id_MBSFN_Area_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBSFN_Area_ID; ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBSFN_Area_ID;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -1299,7 +1299,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service ...@@ -1299,7 +1299,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_REPORT(instance_t instance, m2ap_mbms_service
ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Result_List; ie->id = M2AP_ProtocolIE_ID_id_MBMS_Counting_Result_List;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBMS_Counting_Result_List; ie->value.present = M2AP_MbmsServiceCountingResultsReport_Ies__value_PR_MBMS_Counting_Result_List;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
M2AP_MBMS_Counting_Result_List_t * m2ap_mbms_counting_result_list = &ie->value.choice.MBMS_Counting_Result_List; M2AP_MBMS_Counting_Result_List_t * m2ap_mbms_counting_result_list = &ie->value.choice.MBMS_Counting_Result_List;
M2AP_MBMS_Counting_Result_Item_t * m2ap_mbms_counting_result_item = (M2AP_MBMS_Counting_Result_Item_t*)calloc(1,sizeof(M2AP_MBMS_Counting_Result_Item_t)); M2AP_MBMS_Counting_Result_Item_t * m2ap_mbms_counting_result_item = (M2AP_MBMS_Counting_Result_Item_t*)calloc(1,sizeof(M2AP_MBMS_Counting_Result_Item_t));
...@@ -1356,7 +1356,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_RESP(instance_t instance, m2ap_mbms_service_c ...@@ -1356,7 +1356,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_RESP(instance_t instance, m2ap_mbms_service_c
ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_MCE_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingResponse_Ies__value_PR_CriticalityDiagnostics; ie->value.present = M2AP_MbmsServiceCountingResponse_Ies__value_PR_CriticalityDiagnostics;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (m2ap_encode_pdu(&pdu, &buffer, &len) < 0) {
...@@ -1395,7 +1395,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_FAILURE(instance_t instance, m2ap_mbms_servic ...@@ -1395,7 +1395,7 @@ int eNB_send_MBMS_SERVICE_COUNTING_FAILURE(instance_t instance, m2ap_mbms_servic
ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID; ie->id = M2AP_ProtocolIE_ID_id_ENB_MBMS_M2AP_ID;
ie->criticality = M2AP_Criticality_reject; ie->criticality = M2AP_Criticality_reject;
ie->value.present = M2AP_MbmsServiceCountingFailure_Ies__value_PR_CriticalityDiagnostics; ie->value.present = M2AP_MbmsServiceCountingFailure_Ies__value_PR_CriticalityDiagnostics;
//ie->value.choice.MCE_MBMS_M2AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M2AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
......
...@@ -67,7 +67,7 @@ static m2ap_setup_req_t * m2ap_setup_req_local = NULL; ...@@ -67,7 +67,7 @@ static m2ap_setup_req_t * m2ap_setup_req_local = NULL;
/*------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------*/
static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, uint32_t mce_id_end) { static uint32_t MCE_app_register(uint32_t mce_id_start, uint32_t mce_id_end) {
uint32_t mce_id; uint32_t mce_id;
MessageDef *msg_p; MessageDef *msg_p;
uint32_t register_mce_pending = 0; uint32_t register_mce_pending = 0;
...@@ -87,17 +87,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u ...@@ -87,17 +87,7 @@ static uint32_t MCE_app_register(ngran_node_t node_type,uint32_t mce_id_start, u
LOG_I(ENB_APP,"[MCE %d] MCE_app_register via M3AP for instance %d\n", mce_id, ENB_MODULE_ID_TO_INSTANCE(mce_id)); LOG_I(ENB_APP,"[MCE %d] MCE_app_register via M3AP for instance %d\n", mce_id, ENB_MODULE_ID_TO_INSTANCE(mce_id));
itti_send_msg_to_task (TASK_M3AP, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p); itti_send_msg_to_task (TASK_M3AP, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p);
//if (NODE_IS_DU(node_type)) { // F1AP registration //{ // S1AP registration
// // configure F1AP here for F1C
// LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SETUP_REQ);
// RCconfig_DU_F1(msg_p, enb_id);
// LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
// itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
// // configure GTPu here for F1U
//}
//else { // S1AP registration
// /* note: there is an implicit relationship between the data structure and the message name */ // /* note: there is an implicit relationship between the data structure and the message name */
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ); // msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
// RCconfig_S1(msg_p, enb_id); // RCconfig_S1(msg_p, enb_id);
...@@ -340,39 +330,37 @@ void *MCE_app_task(void *args_p) { ...@@ -340,39 +330,37 @@ void *MCE_app_task(void *args_p) {
itti_mark_task_ready (TASK_MCE_APP); itti_mark_task_ready (TASK_MCE_APP);
/* Try to register each MCE */ /* Try to register each MCE */
// This assumes that node_type of all RRC instances is the same
if ( EPC_MODE_ENABLED && RC.rrc == NULL ) if ( EPC_MODE_ENABLED && RC.rrc == NULL )
LOG_E(RRC, "inconsistent global variables\n"); LOG_E(RRC, "inconsistent global variables\n");
if (EPC_MODE_ENABLED && RC.rrc ) { if (EPC_MODE_ENABLED && RC.rrc ) {
register_mce_pending = MCE_app_register(RC.rrc[0]->node_type, mce_id_start, mce_id_end); register_mce_pending = MCE_app_register(mce_id_start, mce_id_end);
} }
/* Try to register each MCE with each other */ /* Try to register each MCE with each other */
// if (is_x2ap_enabled() && !NODE_IS_DU(RC.rrc[0]->node_type)) { // if (is_x2ap_enabled()) {
// x2_register_enb_pending = MCE_app_register_x2 (enb_id_start, enb_id_end); // x2_register_enb_pending = MCE_app_register_x2 (enb_id_start, enb_id_end);
// } // }
// MCE_app_send_MME_APP2(0); // MCE_app_send_MME_APP2(0);
if (is_m2ap_MCE_enabled()) {
RCconfig_MCE();
if (is_m2ap_MCE_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) { if (!m2ap_mbms_scheduling_information_local)
RCconfig_MCE(); m2ap_mbms_scheduling_information_local = (m2ap_mbms_scheduling_information_t *)calloc(1, sizeof(m2ap_mbms_scheduling_information_t));
if (m2ap_mbms_scheduling_information_local)
if(!m2ap_mbms_scheduling_information_local) RCconfig_m2_scheduling(m2ap_mbms_scheduling_information_local, 0);
m2ap_mbms_scheduling_information_local = (m2ap_mbms_scheduling_information_t*)calloc(1,sizeof(m2ap_mbms_scheduling_information_t));
if(m2ap_mbms_scheduling_information_local)
RCconfig_m2_scheduling(m2ap_mbms_scheduling_information_local,0);
if(!m2ap_setup_resp_local) if (!m2ap_setup_resp_local)
m2ap_setup_resp_local = (m2ap_setup_resp_t*)calloc(1,sizeof(m2ap_setup_resp_t)); m2ap_setup_resp_local = (m2ap_setup_resp_t *)calloc(1, sizeof(m2ap_setup_resp_t));
if(m2ap_setup_resp_local) if (m2ap_setup_resp_local)
RCconfig_m2_mcch(m2ap_setup_resp_local,0); RCconfig_m2_mcch(m2ap_setup_resp_local, 0);
} }
// /* Try to register each MCE with MCE each other */ // /* Try to register each MCE with MCE each other */
if (is_m3ap_MCE_enabled() /*&& !NODE_IS_DU(RC.rrc[0]->node_type)*/) { if (is_m3ap_MCE_enabled()) {
///*m3_register_mce_pending =*/ ///*m3_register_mce_pending =*/
MCE_app_register_m3 (mce_id_start, mce_id_end); MCE_app_register_m3(mce_id_start, mce_id_end);
} }
do { do {
// Wait for a message // Wait for a message
...@@ -390,7 +378,6 @@ void *MCE_app_task(void *args_p) { ...@@ -390,7 +378,6 @@ void *MCE_app_task(void *args_p) {
break; break;
case M3AP_REGISTER_MCE_CNF: case M3AP_REGISTER_MCE_CNF:
//AssertFatal(!NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received S1AP_REGISTER_ENB_CNF\n");
LOG_I(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p), LOG_I(MCE_APP, "[MCE %ld] Received %s: associated MME %d\n", instance, ITTI_MSG_NAME (msg_p),
M3AP_REGISTER_MCE_CNF(msg_p).nb_mme); M3AP_REGISTER_MCE_CNF(msg_p).nb_mme);
DevAssert(register_mce_pending > 0); DevAssert(register_mce_pending > 0);
...@@ -451,12 +438,7 @@ void *MCE_app_task(void *args_p) { ...@@ -451,12 +438,7 @@ void *MCE_app_task(void *args_p) {
case M3AP_SETUP_RESP: case M3AP_SETUP_RESP:
LOG_I(MCE_APP, "Received M3AP_SETUP_RESP message %s\n", ITTI_MSG_NAME (msg_p)); LOG_I(MCE_APP, "Received M3AP_SETUP_RESP message %s\n", ITTI_MSG_NAME (msg_p));
// //AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/MCE\n");
// //LOG_I(MCE_APP, "Received %s: associated ngran_MCE_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
// //F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
//
// //handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
// handle_m3ap_setup_resp(&M3AP_SETUP_RESP(msg_p)); // handle_m3ap_setup_resp(&M3AP_SETUP_RESP(msg_p));
// DevAssert(register_mce_pending > 0); // DevAssert(register_mce_pending > 0);
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "f1ap_messages_types.h"
#include "LTE_SystemInformationBlockType2.h" #include "LTE_SystemInformationBlockType2.h"
#include "rrc_messages_types.h" #include "rrc_messages_types.h"
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "intertask_interface.h" #include "intertask_interface.h"
#include "openair2/F1AP/f1ap_du_rrc_message_transfer.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
...@@ -302,28 +301,6 @@ mac_rrc_data_ind( ...@@ -302,28 +301,6 @@ mac_rrc_data_ind(
) )
//-------------------------------------------------------------------------- //--------------------------------------------------------------------------
{ {
if (NODE_IS_DU(RC.rrc[module_idP]->node_type)) {
LOG_W(RRC,"[DU %d][RAPROC] Received SDU for CCCH on SRB %ld length %d for UE id %d RNTI %x \n",
module_idP, srb_idP, sdu_lenP, UE_id, rntiP);
/* do ITTI message */
DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(
module_idP,
CC_id,
UE_id,
rntiP,
sduP,
sdu_lenP,
NULL,
0);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_allocate_new_UE_context(RC.rrc[module_idP]);
ue_context_p->ue_id_rnti = rntiP;
ue_context_p->ue_context.rnti = rntiP;
ue_context_p->ue_context.random_ue_identity = rntiP;
ue_context_p->ue_context.Srb0.Active = 1;
RB_INSERT(rrc_ue_tree_s, &RC.rrc[module_idP]->rrc_ue_head, ue_context_p);
return(0);
}
//SRB_INFO *Srb_info; //SRB_INFO *Srb_info;
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
sdu_size_t sdu_size = 0; sdu_size_t sdu_size = 0;
......
...@@ -88,12 +88,6 @@ rrc_data_req( ...@@ -88,12 +88,6 @@ rrc_data_req(
message_p); message_p);
LOG_I(RRC,"sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB\n"); LOG_I(RRC,"sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB\n");
/* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads
* Ideally, PDCP would not neet to be triggered like this but react to ITTI
* messages automatically */
if (ctxt_pP->enb_flag && NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type))
pdcp_run(ctxt_pP);
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway. return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
} }
......
...@@ -742,7 +742,6 @@ typedef struct { ...@@ -742,7 +742,6 @@ typedef struct {
typedef struct eNB_RRC_INST_s { typedef struct eNB_RRC_INST_s {
/// southbound midhaul configuration /// southbound midhaul configuration
ngran_node_t node_type;
eth_params_t eth_params_s; eth_params_t eth_params_s;
char *node_name; char *node_name;
uint32_t node_id; uint32_t node_id;
......
...@@ -237,193 +237,161 @@ init_SI( ...@@ -237,193 +237,161 @@ init_SI(
carrier->SIB1 = (uint8_t *) malloc16(32); carrier->SIB1 = (uint8_t *) malloc16(32);
AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n", AssertFatal(carrier->SIB1!=NULL,PROTOCOL_RRC_CTXT_FMT" init_SI: FATAL, no memory for SIB1 allocated\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
LOG_I(RRC,"[eNB %d] Node type %d \n ", ctxt_pP->module_id, rrc->node_type);
if (NODE_IS_DU(rrc->node_type) || NODE_IS_MONOLITHIC(rrc->node_type)) {
// copy basic Cell parameters
carrier->physCellId = configuration->Nid_cell[CC_id];
carrier->p_eNB = configuration->nb_antenna_ports[CC_id];
carrier->Ncp = configuration->prefix_type[CC_id];
carrier->dl_CarrierFreq = configuration->downlink_frequency[CC_id];
carrier->ul_CarrierFreq = configuration->downlink_frequency[CC_id]+ configuration->uplink_frequency_offset[CC_id];
carrier->eutra_band = configuration->eutra_band[CC_id];
carrier->N_RB_DL = configuration->N_RB_DL[CC_id];
carrier->pbch_repetition = configuration->pbch_repetition[CC_id];
LOG_I(RRC, "configuration->schedulingInfoSIB1_BR_r13[CC_id] %d\n",(int)configuration->schedulingInfoSIB1_BR_r13[CC_id]);
LOG_A(RRC, "Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
(int)configuration->N_RB_DL[CC_id],
(int)configuration->radioresourceconfig[CC_id].phich_resource,
(int)configuration->radioresourceconfig[CC_id].phich_duration);
carrier->sizeof_MIB = do_MIB(&rrc->carrier[CC_id],
configuration->N_RB_DL[CC_id],
configuration->radioresourceconfig[CC_id].phich_resource,
configuration->radioresourceconfig[CC_id].phich_duration,
0,
configuration->schedulingInfoSIB1_BR_r13[CC_id]
);
carrier->sizeof_SIB1 = do_SIB1(&rrc->carrier[CC_id],
ctxt_pP->module_id,
CC_id,
false,
configuration
);
AssertFatal(carrier->sizeof_SIB1 != 255,"FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = 0;
if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) {
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *) malloc16(32);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id],
ctxt_pP->module_id,
CC_id, true, configuration);
}
}
if (!NODE_IS_DU(rrc->node_type)) { // copy basic Cell parameters
carrier->SIB23 = (uint8_t *) malloc16(64); carrier->physCellId = configuration->Nid_cell[CC_id];
AssertFatal(carrier->SIB23!=NULL,"cannot allocate memory for SIB"); carrier->p_eNB = configuration->nb_antenna_ports[CC_id];
carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id, carrier->Ncp = configuration->prefix_type[CC_id];
CC_id, carrier->dl_CarrierFreq = configuration->downlink_frequency[CC_id];
false, carrier->ul_CarrierFreq = configuration->downlink_frequency[CC_id] + configuration->uplink_frequency_offset[CC_id];
configuration carrier->eutra_band = configuration->eutra_band[CC_id];
); carrier->N_RB_DL = configuration->N_RB_DL[CC_id];
LOG_I(RRC,"do_SIB23, size %d \n ", carrier->sizeof_SIB23); carrier->pbch_repetition = configuration->pbch_repetition[CC_id];
AssertFatal(carrier->sizeof_SIB23 != 255,"FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255"); LOG_I(RRC, "configuration->schedulingInfoSIB1_BR_r13[CC_id] %d\n", (int)configuration->schedulingInfoSIB1_BR_r13[CC_id]);
carrier->sizeof_SIB23_BR = 0; LOG_A(RRC,
"Configuring MIB (N_RB_DL %d,phich_Resource %d,phich_Duration %d)\n",
if (configuration->schedulingInfoSIB1_BR_r13[CC_id]>0) { (int)configuration->N_RB_DL[CC_id],
carrier->SIB23_BR = (uint8_t *) malloc16(64); (int)configuration->radioresourceconfig[CC_id].phich_resource,
AssertFatal(carrier->SIB23_BR!=NULL,"cannot allocate memory for SIB"); (int)configuration->radioresourceconfig[CC_id].phich_duration);
carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, true, configuration); carrier->sizeof_MIB = do_MIB(&rrc->carrier[CC_id],
configuration->N_RB_DL[CC_id],
configuration->radioresourceconfig[CC_id].phich_resource,
configuration->radioresourceconfig[CC_id].phich_duration,
0,
configuration->schedulingInfoSIB1_BR_r13[CC_id]);
carrier->sizeof_SIB1 = do_SIB1(&rrc->carrier[CC_id], ctxt_pP->module_id, CC_id, false, configuration);
AssertFatal(carrier->sizeof_SIB1 != 255, "FATAL, RC.rrc[enb_mod_idP].carrier[CC_id].sizeof_SIB1 == 255");
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = 0;
if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) {
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].SIB1_BR = (uint8_t *)malloc16(32);
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB1_BR = do_SIB1(&RC.rrc[ctxt_pP->module_id]->carrier[CC_id], ctxt_pP->module_id, CC_id, true, configuration);
}
carrier->SIB23 = (uint8_t *)malloc16(64);
AssertFatal(carrier->SIB23 != NULL, "cannot allocate memory for SIB");
carrier->sizeof_SIB23 = do_SIB23(ctxt_pP->module_id, CC_id, false, configuration);
LOG_I(RRC, "do_SIB23, size %d \n ", carrier->sizeof_SIB23);
AssertFatal(carrier->sizeof_SIB23 != 255, "FATAL, RC.rrc[mod].carrier[CC_id].sizeof_SIB23 == 255");
carrier->sizeof_SIB23_BR = 0;
if (configuration->schedulingInfoSIB1_BR_r13[CC_id] > 0) {
carrier->SIB23_BR = (uint8_t *)malloc16(64);
AssertFatal(carrier->SIB23_BR != NULL, "cannot allocate memory for SIB");
carrier->sizeof_SIB23_BR = do_SIB23(ctxt_pP->module_id, CC_id, true, configuration);
}
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT " SIB2/3 Contents (partial)\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT " pusch_config_common.n_SB = %ld\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.hoppingMode = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.pusch_HoppingOffset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.enable64QAM = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.groupHoppingEnabled = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.groupAssignmentPUSCH = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.sequenceHoppingEnabled = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
LOG_T(RRC,
PROTOCOL_RRC_CTXT_FMT " pusch_config_common.cyclicShift = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift);
if (carrier->MBMS_flag > 0) {
for (i = 0; i < carrier->sib2->mbsfn_SubframeConfigList->list.count; i++) {
// SIB 2
// LOG_D(RRC, "[eNB %ld] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT " SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), i, carrier->sib2->mbsfn_SubframeConfigList->list.count);
LOG_D(RRC,
PROTOCOL_RRC_CTXT_FMT " mbsfn_Subframe_pattern is = %x\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0);
LOG_D(RRC,
PROTOCOL_RRC_CTXT_FMT " radioframe_allocation_period = %ld (just index number, not the real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2)
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT " radioframe_allocation_offset = %ld\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
} }
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" SIB2/3 Contents (partial)\n", // SIB13
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); for (i = 0; i < carrier->sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.n_SB = %ld\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT " SIB13 contents for MBSFN sync area %d/%d (partial)\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), i, carrier->sib13->mbsfn_AreaInfoList_r9.list.count);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_D(RRC,
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.n_SB); PROTOCOL_RRC_CTXT_FMT " MCCH Repetition Period: %ld (just index number, not real value)\n",
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.hoppingMode = %ld\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.hoppingMode); LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT " MCCH Offset: %ld\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.pusch_HoppingOffset = %ld\n", }
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), } else
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.pusch_HoppingOffset); memset((void *)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13, 0, sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13));
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.enable64QAM = %d\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), // TTN - SIB 18
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM); if (configuration->SL_configured > 0) {
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupHoppingEnabled = %d\n", for (int j = 0; j < carrier->sib18->commConfig_r12->commRxPool_r12.list.count; j++) {
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " Contents of SIB18 %d/%d \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), j + 1, carrier->sib18->commConfig_r12->commRxPool_r12.list.count);
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupHoppingEnabled); LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB18 rxPool_sc_CP_Len: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_CP_Len_r12);
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.groupAssignmentPUSCH = %ld\n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB18 sc_Period_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_Period_r12);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB18 data_CP_Len_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->data_CP_Len_r12);
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH); LOG_I(
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.sequenceHoppingEnabled = %d\n", RRC, PROTOCOL_RRC_CTXT_FMT " SIB18 prb_Num_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Num_r12);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC,
(int)carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled); PROTOCOL_RRC_CTXT_FMT " SIB18 prb_Start_r12: %ld \n",
LOG_T(RRC, PROTOCOL_RRC_CTXT_FMT" pusch_config_common.cyclicShift = %ld\n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Start_r12);
carrier->sib2->radioResourceConfigCommon.pusch_ConfigCommon.ul_ReferenceSignalsPUSCH.cyclicShift); LOG_I(
RRC, PROTOCOL_RRC_CTXT_FMT " SIB18 prb_End_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_End_r12);
if (carrier->MBMS_flag > 0) { LOG_I(RRC,
for (i = 0; i < carrier->sib2->mbsfn_SubframeConfigList->list.count; i++) { PROTOCOL_RRC_CTXT_FMT " SIB18 offsetIndicator: %ld \n",
// SIB 2 PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
// LOG_D(RRC, "[eNB %ld] mbsfn_SubframeConfigList.list.count = %ld\n", enb_mod_idP, RC.rrc[enb_mod_idP].sib2->mbsfn_SubframeConfigList->list.count); carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN subframe allocation %d/%d(partial)\n", LOG_I(RRC,
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_FMT " SIB18 subframeBitmap_choice_bs_buf: %s \n",
i, PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.count); carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" mbsfn_Subframe_pattern is = %x\n", }
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->subframeAllocation.choice.oneFrame.buf[0] >> 0);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_period = %ld (just index number, not the real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationPeriod); // need to display the real value, using array of char (like in dumping SIB2)
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" radioframe_allocation_offset = %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib2->mbsfn_SubframeConfigList->list.array[i]->radioframeAllocationOffset);
}
// SIB13
for (i = 0; i < carrier->sib13->mbsfn_AreaInfoList_r9.list.count; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" SIB13 contents for MBSFN sync area %d/%d (partial)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
i,
carrier->sib13->mbsfn_AreaInfoList_r9.list.count);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Repetition Period: %ld (just index number, not real value)\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
LOG_D(RRC, PROTOCOL_RRC_CTXT_FMT" MCCH Offset: %ld\n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib13->mbsfn_AreaInfoList_r9.list.array[i]->mcch_Config_r9.mcch_Offset_r9);
}
} else memset((void *)&RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13,0,sizeof(RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sib13));
//TTN - SIB 18
if (configuration->SL_configured > 0) {
for (int j = 0; j < carrier->sib18->commConfig_r12->commRxPool_r12.list.count; j++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB18 %d/%d \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
j+1,
carrier->sib18->commConfig_r12->commRxPool_r12.list.count);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 rxPool_sc_CP_Len: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_CP_Len_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 sc_Period_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_Period_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 data_CP_Len_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->data_CP_Len_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_Num_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Num_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_Start_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 prb_End_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.prb_End_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 offsetIndicator: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB18 subframeBitmap_choice_bs_buf: %s \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib18->commConfig_r12->commRxPool_r12.list.array[j]->sc_TF_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
}
//TTN - SIB 19 // TTN - SIB 19
for (int j = 0; j < carrier->sib19->discConfig_r12->discRxPool_r12.list.count; j++) { for (int j = 0; j < carrier->sib19->discConfig_r12->discRxPool_r12.list.count; j++) {
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" Contents of SIB19 %d/%d \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " Contents of SIB19 %d/%d \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), j + 1, carrier->sib19->discConfig_r12->discRxPool_r12.list.count);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB19 cp_Len_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->cp_Len_r12);
j+1, LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB19 discPeriod_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->discPeriod_r12);
carrier->sib19->discConfig_r12->discRxPool_r12.list.count); LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB19 numRetx_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRetx_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 cp_Len_r12: %ld \n", LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT " SIB19 numRepetition_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRepetition_r12);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC,
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->cp_Len_r12); PROTOCOL_RRC_CTXT_FMT " SIB19 tf_ResourceConfig_r12 prb_Num_r12: %ld \n",
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 discPeriod_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Num_r12);
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->discPeriod_r12); LOG_I(RRC,
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 numRetx_r12: %ld \n", PROTOCOL_RRC_CTXT_FMT " SIB19 tf_ResourceConfig_r12 prb_Start_r12: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRetx_r12); carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Start_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 numRepetition_r12: %ld \n", LOG_I(RRC,
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_FMT " SIB19 tf_ResourceConfig_r12 prb_End_r12: %ld \n",
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->numRepetition_r12); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_Num_r12: %ld \n", carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_End_r12);
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), LOG_I(RRC,
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Num_r12); PROTOCOL_RRC_CTXT_FMT " SIB19 tf_ResourceConfig_r12 offsetIndicator: %ld \n",
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_Start_r12: %ld \n", PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_Start_r12); LOG_I(RRC,
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 prb_End_r12: %ld \n", PROTOCOL_RRC_CTXT_FMT " SIB19 tf_ResourceConfig_r12 subframeBitmap_choice_bs_buf: %s \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.prb_End_r12); carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 offsetIndicator: %ld \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.offsetIndicator_r12.choice.small_r12);
LOG_I(RRC, PROTOCOL_RRC_CTXT_FMT" SIB19 tf_ResourceConfig_r12 subframeBitmap_choice_bs_buf: %s \n",
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP),
carrier->sib19->discConfig_r12->discRxPool_r12.list.array[j]->tf_ResourceConfig_r12.subframeBitmap_r12.choice.bs16_r12.buf);
}
} }
} }
...@@ -432,72 +400,61 @@ init_SI( ...@@ -432,72 +400,61 @@ init_SI(
PROTOCOL_RRC_CTXT_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_ARGS(ctxt_pP));
// LTE-M stuff here (take out CU-DU for now) // LTE-M stuff here (take out CU-DU for now)
if (NODE_IS_MONOLITHIC(rrc->node_type)) { if ((carrier->mib.message.schedulingInfoSIB1_BR_r13 > 0) && (carrier->sib1_BR != NULL)) {
if ((carrier->mib.message.schedulingInfoSIB1_BR_r13>0) && AssertFatal(carrier->sib1_BR->nonCriticalExtension != NULL, "sib2_br->nonCriticalExtension is null (v8.9)\n");
(carrier->sib1_BR!=NULL)) { AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension != NULL, "sib2_br->nonCriticalExtension is null (v9.2)\n");
AssertFatal(carrier->sib1_BR->nonCriticalExtension!=NULL, AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension != NULL, "sib2_br->nonCriticalExtension is null (v11.3)\n");
"sib2_br->nonCriticalExtension is null (v8.9)\n"); AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension != NULL, "sib2_br->nonCriticalExtension is null (v12.5)\n");
AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension!=NULL, AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension != NULL,
"sib2_br->nonCriticalExtension is null (v9.2)\n"); "sib2_br->nonCriticalExtension is null (v13.10)\n");
AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL, sib1_v13ext = carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension;
"sib2_br->nonCriticalExtension is null (v11.3)\n"); // Basic Asserts for CE_level0 PRACH configuration
AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL, LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR = &carrier[CC_id].sib2_BR->radioResourceConfigCommon;
"sib2_br->nonCriticalExtension is null (v12.5)\n"); struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
AssertFatal(carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension!=NULL, LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
"sib2_br->nonCriticalExtension is null (v13.10)\n"); AssertFatal(prach_ParametersListCE_r13->list.count > 0, "prach_ParametersListCE_r13 is empty\n");
sib1_v13ext = carrier->sib1_BR->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension->nonCriticalExtension; LTE_PRACH_ParametersCE_r13_t *p = prach_ParametersListCE_r13->list.array[0];
// Basic Asserts for CE_level0 PRACH configuration AssertFatal(p->prach_StartingSubframe_r13 != NULL, "prach_StartingSubframe_r13 celevel0 is null\n");
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR = &carrier[CC_id].sib2_BR->radioResourceConfigCommon; AssertFatal((1 << p->numRepetitionPerPreambleAttempt_r13) <= (2 << *p->prach_StartingSubframe_r13),
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach=radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310; "prachce0->numReptitionPerPreambleAttempt_r13 %d > prach_StartingSubframe_r13 %d\n",
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13; 1 << p->numRepetitionPerPreambleAttempt_r13,
AssertFatal(prach_ParametersListCE_r13->list.count>0,"prach_ParametersListCE_r13 is empty\n"); 2 << *p->prach_StartingSubframe_r13);
LTE_PRACH_ParametersCE_r13_t *p = prach_ParametersListCE_r13->list.array[0]; }
AssertFatal(p->prach_StartingSubframe_r13 != NULL, "prach_StartingSubframe_r13 celevel0 is null\n");
AssertFatal((1<<p->numRepetitionPerPreambleAttempt_r13)<=(2<<*p->prach_StartingSubframe_r13), LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB\n");
"prachce0->numReptitionPerPreambleAttempt_r13 %d > prach_StartingSubframe_r13 %d\n", rrc_mac_config_req_eNB_t tmp = {
1<<p->numRepetitionPerPreambleAttempt_r13, .CC_id = CC_id,
2<<*p->prach_StartingSubframe_r13); .physCellId = carrier->physCellId,
} .p_eNB = carrier->p_eNB,
} .Ncp = carrier->Ncp,
.eutra_band = carrier->sib1->freqBandIndicator,
if (NODE_IS_MONOLITHIC(rrc->node_type)) { .dl_CarrierFreq = carrier->dl_CarrierFreq,
LOG_D(RRC, "About to call rrc_mac_config_req_eNB for ngran_eNB\n"); .pbch_repetition = carrier->pbch_repetition,
rrc_mac_config_req_eNB_t tmp = { .mib = &carrier->mib,
.CC_id = CC_id, .radioResourceConfigCommon = &carrier->sib2->radioResourceConfigCommon,
.physCellId = carrier->physCellId, .tdd_Config = carrier->sib1->tdd_Config,
.p_eNB = carrier->p_eNB, .schedulingInfoList = &carrier->sib1->schedulingInfoList,
.Ncp = carrier->Ncp, .ul_CarrierFreq = carrier->ul_CarrierFreq,
.eutra_band = carrier->sib1->freqBandIndicator, .ul_Bandwidth = carrier->sib2->freqInfo.ul_Bandwidth,
.dl_CarrierFreq = carrier->dl_CarrierFreq, .additionalSpectrumEmission = &carrier->sib2->freqInfo.additionalSpectrumEmission,
.pbch_repetition = carrier->pbch_repetition, .mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList,
.mib = &carrier->mib, .MBMS_Flag = carrier->MBMS_flag,
.radioResourceConfigCommon = &carrier->sib2->radioResourceConfigCommon, .sib1_ext_r13 = sib1_v13ext,
.tdd_Config = carrier->sib1->tdd_Config, .FeMBMS_Flag = RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag,
.schedulingInfoList = &carrier->sib1->schedulingInfoList, .mib_fembms = &carrier->siblock1_MBMS,
.ul_CarrierFreq = carrier->ul_CarrierFreq, };
.ul_Bandwidth = carrier->sib2->freqInfo.ul_Bandwidth, if (carrier->sib2_BR)
.additionalSpectrumEmission = &carrier->sib2->freqInfo.additionalSpectrumEmission, tmp.LTE_radioResourceConfigCommon_BR = &carrier->sib2_BR->radioResourceConfigCommon;
.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList, if (carrier->sib13)
.MBMS_Flag = carrier->MBMS_flag, tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9;
.sib1_ext_r13 = sib1_v13ext, if (carrier->sib1_MBMS) {
.FeMBMS_Flag = RC.rrc[ctxt_pP->module_id]->carrier[CC_id].FeMBMS_flag, tmp.nonMBSFN_SubframeConfig = carrier->sib1_MBMS->nonMBSFN_SubframeConfig_r14;
.mib_fembms = &carrier->siblock1_MBMS, tmp.sib1_mbms_r14_fembms = carrier->sib1_MBMS->systemInformationBlockType13_r14;
}; if (carrier->sib1_MBMS->systemInformationBlockType13_r14)
if (carrier->sib2_BR) tmp.mbsfn_AreaInfoList_fembms = &carrier->sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9;
tmp.LTE_radioResourceConfigCommon_BR = &carrier->sib2_BR->radioResourceConfigCommon;
if (carrier->sib13)
tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9;
if (carrier->sib1_MBMS) {
tmp.nonMBSFN_SubframeConfig = carrier->sib1_MBMS->nonMBSFN_SubframeConfig_r14;
tmp.sib1_mbms_r14_fembms = carrier->sib1_MBMS->systemInformationBlockType13_r14;
if (carrier->sib1_MBMS->systemInformationBlockType13_r14)
tmp.mbsfn_AreaInfoList_fembms = &carrier->sib1_MBMS->systemInformationBlockType13_r14->mbsfn_AreaInfoList_r9;
}
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
} }
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
/* set flag to indicate that cell information is configured. This is required
* in DU to trigger F1AP_SETUP procedure */
pthread_mutex_lock(&rrc->cell_info_mutex); pthread_mutex_lock(&rrc->cell_info_mutex);
rrc->cell_info_configured=1; rrc->cell_info_configured=1;
pthread_mutex_unlock(&rrc->cell_info_mutex); pthread_mutex_unlock(&rrc->cell_info_mutex);
...@@ -512,8 +469,6 @@ init_MCCH( ...@@ -512,8 +469,6 @@ init_MCCH(
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
int sync_area = 0; int sync_area = 0;
// initialize RRC_eNB_INST MCCH entry
eNB_RRC_INST *rrc = RC.rrc[enb_mod_idP];
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE = RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *)); malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
...@@ -546,19 +501,10 @@ init_MCCH( ...@@ -546,19 +501,10 @@ init_MCCH(
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS[sync_area].Active = 1; RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS[sync_area].Active = 1;
} }
//Set the RC.rrc[enb_mod_idP]->MCCH_MESS.Active to 1 (allow to transfer MCCH message RRC->MAC in function mac_rrc_data_req) rrc_mac_config_req_eNB_t tmp = {0};
// ??Configure MCCH logical channel tmp.CC_id = CC_id;
// call mac_config_req with appropriate structure from ASN.1 description tmp.pmch_InfoList = &RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9;
// LOG_I(RRC, "DUY: serviceID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->tmgi_r9.serviceId_r9.buf[2]); rrc_mac_config_req_eNB(enb_mod_idP, &tmp);
// LOG_I(RRC, "DUY: session ID is %d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->sessionId_r9->buf[0]);
if (NODE_IS_MONOLITHIC(rrc->node_type)) {
rrc_mac_config_req_eNB_t tmp = {0};
tmp.CC_id = CC_id;
tmp.pmch_InfoList = &RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9;
rrc_mac_config_req_eNB(enb_mod_idP, &tmp);
}
//LOG_I(RRC,"DUY: lcid after rrc_mac_config_req is %02d\n",RC.rrc[enb_mod_idP]->mcch_message->pmch_InfoList_r9.list.array[0]->mbms_SessionInfoList_r9.list.array[0]->logicalChannelIdentity_r9);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -587,14 +533,12 @@ static void init_MBMS( ...@@ -587,14 +533,12 @@ static void init_MBMS(
, &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) , &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
,NULL); ,NULL);
if (!NODE_IS_CU(RC.rrc[enb_mod_idP]->node_type)) { rrc_rlc_config_asn1_req(&ctxt,
rrc_rlc_config_asn1_req(&ctxt, NULL, // LTE_SRB_ToAddModList
NULL, // LTE_SRB_ToAddModList NULL, // LTE_DRB_ToAddModList
NULL, // LTE_DRB_ToAddModList NULL, // DRB_ToReleaseList
NULL, // DRB_ToReleaseList &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),0, 0
&(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9),0, 0 );
);
}
//rrc_mac_config_req(); //rrc_mac_config_req();
} }
...@@ -897,35 +841,24 @@ rrc_eNB_free_UE( ...@@ -897,35 +841,24 @@ rrc_eNB_free_UE(
} }
if(EPC_MODE_ENABLED) { if(EPC_MODE_ENABLED) {
if (!NODE_IS_DU(RC.rrc[enb_mod_idP]->node_type)) { if ((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) {
if((ue_context_pP->ue_context.ul_failure_timer >= 20000) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)) { LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n", enb_mod_idP, rnti);
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 21, radio connection with ue lost\n", rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK,
enb_mod_idP, 21); // send cause 21: radio connection with ue lost
rnti); /* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered)
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, * If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before
ue_context_pP, * triggering the S1 UE Context Release Request procedure in order to allow the UE to perform the NAS recovery
S1AP_CAUSE_RADIO_NETWORK, * procedure, see TS 23.401 [17].
21); // send cause 21: radio connection with ue lost */
/* From 3GPP 36300v10 p129 : 19.2.2.2.2 S1 UE Context Release Request (eNB triggered) return;
* If the E-UTRAN internal reason is a radio link failure detected in the eNB, the eNB shall wait a sufficient time before }
* triggering the S1 UE Context Release Request procedure in order to allow the UE to perform the NAS recovery
* procedure, see TS 23.401 [17].
*/
return;
}
if((ue_context_pP->ue_context.ue_rrc_inactivity_timer >= RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres) && if ((ue_context_pP->ue_context.ue_rrc_inactivity_timer >= RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres) && (mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED)
(mac_eNB_get_rrc_status(enb_mod_idP, rnti) >= RRC_CONNECTED) && && (RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres > 0)) {
(RC.rrc[enb_mod_idP]->configuration.rrc_inactivity_timer_thres > 0)) { LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 20, user inactivity\n", enb_mod_idP, rnti);
LOG_I(RRC, "[eNB %d] S1AP_UE_CONTEXT_RELEASE_REQ sent for RNTI %x, cause 20, user inactivity\n", rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP, ue_context_pP, S1AP_CAUSE_RADIO_NETWORK,
enb_mod_idP, 20); // send cause 20: user inactivity
rnti); return;
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ(enb_mod_idP,
ue_context_pP,
S1AP_CAUSE_RADIO_NETWORK,
20); // send cause 20: user inactivity
return;
}
} }
} }
...@@ -1023,20 +956,10 @@ void release_UE_in_freeList(module_id_t mod_id) { ...@@ -1023,20 +956,10 @@ void release_UE_in_freeList(module_id_t mod_id) {
} }
} }
if (!NODE_IS_CU(RC.rrc[mod_id]->node_type)) { if (!eNB_MAC->UE_free_ctrl[ue_num].raFlag)
if (!eNB_MAC->UE_free_ctrl[ue_num].raFlag) rrc_mac_remove_ue(mod_id, rnti);
rrc_mac_remove_ue(mod_id,rnti); rrc_rlc_remove_ue(&ctxt);
rrc_rlc_remove_ue(&ctxt); pdcp_remove_UE(&ctxt);
pdcp_remove_UE(&ctxt);
} else {
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = rnti;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_CU_F1, mod_id, m);
}
if(eNB_MAC->UE_free_ctrl[ue_num].removeContextFlg) { if(eNB_MAC->UE_free_ctrl[ue_num].removeContextFlg) {
struct rrc_eNB_ue_context_s *ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[mod_id],rnti); struct rrc_eNB_ue_context_s *ue_context_pP = rrc_eNB_get_ue_context(RC.rrc[mod_id],rnti);
...@@ -1141,16 +1064,8 @@ rrc_eNB_generate_SecurityModeCommand( ...@@ -1141,16 +1064,8 @@ rrc_eNB_generate_SecurityModeCommand(
rrc_eNB_mui, rrc_eNB_mui,
DCCH); DCCH);
if (!NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) { LOG_I(RRC, "calling rrc_data_req :securityModeCommand\n");
LOG_I(RRC,"calling rrc_data_req :securityModeCommand\n"); rrc_data_req(ctxt_pP, DCCH, rrc_eNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL);
rrc_data_req(ctxt_pP,
DCCH,
rrc_eNB_mui++,
SDU_CONFIRM_NO,
size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
}
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -1316,17 +1231,15 @@ rrc_eNB_generate_RRCConnectionReestablishment( ...@@ -1316,17 +1231,15 @@ rrc_eNB_generate_RRCConnectionReestablishment(
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = ue_context->primaryCC_id;
tmp.CC_id = ue_context->primaryCC_id; tmp.physicalConfigDedicated = ue_context->physicalConfigDedicated;
tmp.physicalConfigDedicated = ue_context->physicalConfigDedicated; tmp.mac_MainConfig = ue_context->mac_MainConfig;
tmp.mac_MainConfig = ue_context->mac_MainConfig; tmp.logicalChannelIdentity = 1;
tmp.logicalChannelIdentity = 1; tmp.logicalChannelConfig = SRB1_logicalChannelConfig;
tmp.logicalChannelConfig = SRB1_logicalChannelConfig; tmp.measGapConfig = ue_context->measGapConfig;
tmp.measGapConfig = ue_context->measGapConfig; rrc_mac_config_req_eNB(module_id, &tmp);
rrc_mac_config_req_eNB(module_id, &tmp); break;
break;
}
} // if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) } // if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1)
} // for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) } // for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++)
} // if (*SRB_configList != NULL) } // if (*SRB_configList != NULL)
...@@ -1891,15 +1804,13 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject( ...@@ -1891,15 +1804,13 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
) )
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
{ {
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
int UE_id = find_UE_id(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
if(UE_id != -1) { if(UE_id != -1) {
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 1;
RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20; RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer_thres = 20;
} else { } else {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %lx\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid); LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT " Generating LTE_RRCConnectionReestablishmentReject without UE_id(MAC) rnti %lx\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ctxt_pP->rntiMaybeUEid);
}
} }
T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid)); T(T_ENB_RRC_CONNECTION_REESTABLISHMENT_REJECT, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
...@@ -2003,23 +1914,13 @@ rrc_eNB_generate_RRCConnectionRelease( ...@@ -2003,23 +1914,13 @@ rrc_eNB_generate_RRCConnectionRelease(
pthread_mutex_unlock(&rrc_release_freelist); pthread_mutex_unlock(&rrc_release_freelist);
if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_data_req(ctxt_pP,
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD); DCCH,
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid; rrc_eNB_mui++,
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK; SDU_CONFIRM_NO,
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release size,
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = buffer; buffer,
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = size; PDCP_TRANSMISSION_MODE_CONTROL);
itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, m);
} else {
rrc_data_req(ctxt_pP,
DCCH,
rrc_eNB_mui++,
SDU_CONFIRM_NO,
size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
}
} }
uint8_t qci_to_priority[9]= {2,4,3,5,1,6,7,8,9}; uint8_t qci_to_priority[9]= {2,4,3,5,1,6,7,8,9};
...@@ -2806,17 +2707,15 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -2806,17 +2707,15 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n"); LOG_D(RRC, "Processing the DRX configuration in RRC Connection Reconfiguration\n");
/* Process the IE drx_Config */ /* Process the IE drx_Config */
if (NODE_IS_MONOLITHIC(rrc_inst->node_type)) { mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
mac_MainConfig->drx_Config = do_DrxConfig(cc_id, &rrc_inst->configuration, UEcap); // drx_Config IE
if (mac_MainConfig->drx_Config == NULL) { if (mac_MainConfig->drx_Config == NULL) {
LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n"); LOG_W(RRC, "drx_Configuration parameter is NULL, cannot configure local UE parameters or CDRX is deactivated\n");
} else { } else {
/* Send DRX configuration to MAC task to configure timers of local UE context */ /* Send DRX configuration to MAC task to configure timers of local UE context */
rrc_mac_drx_config_req_t req = {.rnti = rnti, .drx_Configuration = mac_MainConfig->drx_Config}; rrc_mac_drx_config_req_t req = {.rnti = rnti, .drx_Configuration = mac_MainConfig->drx_Config};
eNB_Config_Local_DRX(module_id, &req); eNB_Config_Local_DRX(module_id, &req);
LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n"); LOG_D(RRC, "DRX configured in MAC Main Configuration for RRC Connection Reconfiguration\n");
}
} }
/* End of CDRX configuration */ /* End of CDRX configuration */
...@@ -3319,16 +3218,13 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t ...@@ -3319,16 +3218,13 @@ void rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t
, NULL); , NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP,
rrc_rlc_config_asn1_req(ctxt_pP, *SRB_configList2, // NULL,
*SRB_configList2, // NULL, *DRB_configList,
*DRB_configList, NULL,
NULL (LTE_PMCH_InfoList_r9_t *)NULL,
, (LTE_PMCH_InfoList_r9_t *) NULL, 0,
0, 0);
0
);
}
free(Sparams); free(Sparams);
Sparams = NULL; Sparams = NULL;
...@@ -5213,16 +5109,13 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct ...@@ -5213,16 +5109,13 @@ rrc_eNB_generate_HO_RRCConnectionReconfiguration(const protocol_ctxt_t *const ct
, NULL); , NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP,
rrc_rlc_config_asn1_req(ctxt_pP, *SRB_configList2, // NULL,
*SRB_configList2, // NULL, *DRB_configList,
*DRB_configList, NULL,
NULL (LTE_PMCH_InfoList_r9_t *)NULL,
, (LTE_PMCH_InfoList_r9_t *) NULL, 0,
0, 0);
0
);
}
free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ); free(quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ);
quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL; quantityConfig->quantityConfigEUTRA->filterCoefficientRSRQ = NULL;
...@@ -5268,14 +5161,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc ...@@ -5268,14 +5161,7 @@ rrc_eNB_configure_rbs_handover(struct rrc_eNB_ue_context_s *ue_context_p, protoc
NULL, NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, NULL); (LTE_PMCH_InfoList_r9_t *) NULL, NULL);
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, (LTE_DRB_ToAddModList_t *)NULL, (LTE_DRB_ToReleaseList_t *)NULL, (LTE_PMCH_InfoList_r9_t *)NULL, 0, 0);
rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
);
}
if (EPC_MODE_ENABLED) { if (EPC_MODE_ENABLED) {
rrc_eNB_process_security ( rrc_eNB_process_security (
...@@ -5331,21 +5217,19 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5331,21 +5217,19 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
rnti_t rnti = ue_context_pP->ue_id_rnti; rnti_t rnti = ue_context_pP->ue_id_rnti;
module_id_t module_id = ctxt_pP->module_id; module_id_t module_id = ctxt_pP->module_id;
if (NODE_IS_MONOLITHIC(RC.rrc[module_id]->node_type)) { int UE_id_mac = find_UE_id(module_id, rnti);
int UE_id_mac = find_UE_id(module_id, rnti);
if (UE_id_mac == -1) { if (UE_id_mac == -1) {
LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", rnti); LOG_E(RRC, "Can't find UE_id(MAC) of UE rnti %x\n", rnti);
return; return;
} }
UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id_mac]); UE_sched_ctrl_t *UE_scheduling_control = &(RC.mac[module_id]->UE_info.UE_sched_ctrl[UE_id_mac]);
if (UE_scheduling_control->cdrx_waiting_ack == true) { if (UE_scheduling_control->cdrx_waiting_ack == true) {
UE_scheduling_control->cdrx_waiting_ack = false; UE_scheduling_control->cdrx_waiting_ack = false;
UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration is received UE_scheduling_control->cdrx_configured = true; // Set to TRUE when RRC Connection Reconfiguration is received
LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n"); LOG_I(RRC, "CDRX configuration activated after RRC Connection Reconfiguration Complete reception\n");
}
} }
/* End of CDRX processing */ /* End of CDRX processing */
...@@ -5377,16 +5261,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5377,16 +5261,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
NULL); NULL);
/* Refresh SRBs/DRBs */ /* Refresh SRBs/DRBs */
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP,
rrc_rlc_config_asn1_req(ctxt_pP, SRB_configList, // NULL,
SRB_configList, // NULL, DRB_configList,
DRB_configList, DRB_Release_configList2,
DRB_Release_configList2, (LTE_PMCH_InfoList_r9_t *)NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, 0,
0, 0);
0
);
}
/* Set the SRB active in UE context */ /* Set the SRB active in UE context */
if (SRB_configList != NULL) { if (SRB_configList != NULL) {
...@@ -5474,17 +5355,15 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5474,17 +5355,15 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity; DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
} }
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = ue_context_pP->ue_context.primaryCC_id;
tmp.CC_id = ue_context_pP->ue_context.primaryCC_id; tmp.rnti = ue_context_pP->ue_context.rnti;
tmp.rnti = ue_context_pP->ue_context.rnti; tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated;
tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated; tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig;
tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig; tmp.logicalChannelIdentity = DRB2LCHAN[i];
tmp.logicalChannelIdentity = DRB2LCHAN[i]; tmp.logicalChannelConfig = DRB_configList->list.array[i]->logicalChannelConfig;
tmp.logicalChannelConfig = DRB_configList->list.array[i]->logicalChannelConfig; tmp.measGapConfig = ue_context_pP->ue_context.measGapConfig;
tmp.measGapConfig = ue_context_pP->ue_context.measGapConfig; rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
}
} else { // remove LCHAN from MAC/PHY } else { // remove LCHAN from MAC/PHY
if (DRB_configList->list.array[i]->logicalChannelIdentity) { if (DRB_configList->list.array[i]->logicalChannelIdentity) {
DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity; DRB2LCHAN[i] = (uint8_t) * DRB_configList->list.array[i]->logicalChannelIdentity;
...@@ -5493,15 +5372,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete( ...@@ -5493,15 +5372,13 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n", LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (DRB) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = ue_context_pP->ue_context.primaryCC_id;
tmp.CC_id = ue_context_pP->ue_context.primaryCC_id; tmp.rnti = ue_context_pP->ue_context.rnti;
tmp.rnti = ue_context_pP->ue_context.rnti; tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated;
tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated; tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig;
tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig; tmp.logicalChannelIdentity = DRB2LCHAN[i];
tmp.logicalChannelIdentity = DRB2LCHAN[i]; rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
}
} // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0) } // end else of if (ue_context_pP->ue_context.DRB_active[drb_id] == 0)
} // end if (DRB_configList->list.array[i]) } // end if (DRB_configList->list.array[i])
} // end for (int i = 0; i < DRB_configList->list.count; i++) } // end for (int i = 0; i < DRB_configList->list.count; i++)
...@@ -5549,7 +5426,6 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -5549,7 +5426,6 @@ rrc_eNB_generate_RRCConnectionSetup(
LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig; LTE_LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig;
LTE_SRB_ToAddModList_t **SRB_configList; LTE_SRB_ToAddModList_t **SRB_configList;
LTE_SRB_ToAddMod_t *SRB1_config; LTE_SRB_ToAddMod_t *SRB1_config;
MessageDef *message_p;
T(T_ENB_RRC_CONNECTION_SETUP, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid)); T(T_ENB_RRC_CONNECTION_SETUP, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rntiMaybeUEid));
eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
SRB_configList = &ue_p->SRB_configList; SRB_configList = &ue_p->SRB_configList;
...@@ -5582,87 +5458,43 @@ rrc_eNB_generate_RRCConnectionSetup( ...@@ -5582,87 +5458,43 @@ rrc_eNB_generate_RRCConnectionSetup(
"[MSG] RRC Connection Setup\n"); "[MSG] RRC Connection Setup\n");
// configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE // configure SRB1/SRB2, PhysicalConfigDedicated, MAC_MainConfig for UE
switch (RC.rrc[ctxt_pP->module_id]->node_type) { if (*SRB_configList != NULL) {
case ngran_eNB_CU : for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) {
case ngran_ng_eNB_CU : if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) {
case ngran_gNB_CU : SRB1_config = (*SRB_configList)->list.array[cnt];
case ngran_gNB_CUCP :
// create an ITTI message
/* TODO: F1 IDs ar missing in RRC */
message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_DL_RRC_MESSAGE);
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = (uint8_t *)ue_p->Srb0.Tx_buffer.Payload;
F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
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, ctxt_pP->module_id, message_p);
LOG_D(RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
break;
case ngran_eNB_DU :
case ngran_gNB_DU :
// nothing to do for DU
AssertFatal(1==0,"nothing to do for DU\n");
break;
case ngran_eNB:
case ngran_ng_eNB :
case ngran_gNB :
if (*SRB_configList != NULL) {
for (int cnt = 0; cnt < (*SRB_configList)->list.count; cnt++) {
if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1) {
SRB1_config = (*SRB_configList)->list.array[cnt];
if (SRB1_config->logicalChannelConfig) {
if (SRB1_config->logicalChannelConfig->present ==
LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
} else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
} else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
LOG_D(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
if (RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB) { if (SRB1_config->logicalChannelConfig) {
rrc_mac_config_req_eNB_t tmp = {0}; if (SRB1_config->logicalChannelConfig->present == LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
tmp.CC_id = ue_context_pP->ue_context.primaryCC_id; SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
tmp.rnti = ue_context_pP->ue_context.rnti; } else {
tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated; SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig;
tmp.logicalChannelIdentity = 1;
tmp.logicalChannelConfig = SRB1_logicalChannelConfig;
tmp.measGapConfig = ue_context_pP->ue_context.measGapConfig;
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
break;
}
} }
} else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
} }
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT " RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
rrc_mac_config_req_eNB_t tmp = {0};
tmp.CC_id = ue_context_pP->ue_context.primaryCC_id;
tmp.rnti = ue_context_pP->ue_context.rnti;
tmp.physicalConfigDedicated = ue_context_pP->ue_context.physicalConfigDedicated;
tmp.mac_MainConfig = ue_context_pP->ue_context.mac_MainConfig;
tmp.logicalChannelIdentity = 1;
tmp.logicalChannelConfig = SRB1_logicalChannelConfig;
tmp.measGapConfig = ue_context_pP->ue_context.measGapConfig;
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
break; break;
default :
LOG_W(RRC, "Unknown node type %d\n", RC.rrc[ctxt_pP->module_id]->node_type);
} }
}
LOG_I(RRC, LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT " [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ue_p->Srb0.Tx_buffer.payload_size);
PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionSetup (bytes %d)\n", // activate release timer, if RRCSetupComplete not received after 100 frames, remove UE
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ue_context_pP->ue_context.ue_release_timer = 1;
ue_p->Srb0.Tx_buffer.payload_size); // remove UE after 10 frames after RRCConnectionRelease is triggered
// activate release timer, if RRCSetupComplete not received after 100 frames, remove UE ue_context_pP->ue_context.ue_release_timer_thres = 1000;
ue_context_pP->ue_context.ue_release_timer = 1; /* init timers */
// remove UE after 10 frames after RRCConnectionRelease is triggered ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
ue_context_pP->ue_context.ue_release_timer_thres = 1000;
/* init timers */
ue_context_pP->ue_context.ue_rrc_inactivity_timer = 0;
} }
} }
...@@ -5777,19 +5609,6 @@ char openair_rrc_eNB_configuration( ...@@ -5777,19 +5609,6 @@ char openair_rrc_eNB_configuration(
openair_rrc_on(&ctxt); openair_rrc_on(&ctxt);
/*
RC.rrc[ctxt.module_id]->mcc= rrc_configuration_req->mcc;
RC.rrc[ctxt.module_id]->mnc= rrc_configuration_req->mnc;
RC.rrc[ctxt.module_id]->mnc_digit_length= rrc_configuration_req->mnc_digit_length;
RC.rrc[ctxt.module_id]->tac= rrc_configuration_req->tac;
LOG_W(RRC, "[inst %d] RRC->MCC/MSG->MCC %d/%d \n", ctxt.module_id, RC.rrc[ctxt.module_id]->mcc, rrc_configuration_req->mcc);
*/
if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type))
// msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SCTP_REQ);
// RCconfig_CU_F1(msg_p, enb_id);
setup_ngran_CU(RC.rrc[ctxt.module_id]);
return 0; return 0;
} }
...@@ -6072,16 +5891,7 @@ rrc_eNB_decode_ccch( ...@@ -6072,16 +5891,7 @@ rrc_eNB_decode_ccch(
, (LTE_PMCH_InfoList_r9_t *) NULL , (LTE_PMCH_InfoList_r9_t *) NULL
,NULL); ,NULL);
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, NULL, NULL, NULL, 0, 0);
rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL
, (LTE_PMCH_InfoList_r9_t *) NULL,
0,0
);
}
} }
break; break;
...@@ -6141,18 +5951,8 @@ rrc_eNB_decode_ccch( ...@@ -6141,18 +5951,8 @@ rrc_eNB_decode_ccch(
if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) { if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) {
LOG_I(RRC, " S-TMSI exists, ue_context_p %p, old rnti %x => %lx\n", ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rntiMaybeUEid); LOG_I(RRC, " S-TMSI exists, ue_context_p %p, old rnti %x => %lx\n", ue_context_p, ue_context_p->ue_context.rnti, ctxt_pP->rntiMaybeUEid);
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { LOG_I(PHY, "remove RNTI %04x\n", ue_context_p->ue_context.rnti);
LOG_I(PHY, "remove RNTI %04x\n", ue_context_p->ue_context.rnti); rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
rrc_mac_remove_ue(ctxt_pP->module_id, ue_context_p->ue_context.rnti);
} else {
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, m);
}
stmsi_received=1; stmsi_received=1;
/* replace rnti in the context */ /* replace rnti in the context */
...@@ -6226,17 +6026,7 @@ rrc_eNB_decode_ccch( ...@@ -6226,17 +6026,7 @@ rrc_eNB_decode_ccch(
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
random_value); random_value);
if (NODE_IS_MONOLITHIC(RC.rrc[ctxt_pP->module_id]->node_type)) rrc_mac_remove_ue(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
rrc_mac_remove_ue(ctxt_pP->module_id, ctxt_pP->rntiMaybeUEid);
else if (NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) {
MessageDef *m = itti_alloc_new_message(TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_RELEASE_CMD);
F1AP_UE_CONTEXT_RELEASE_CMD(m).rnti = ctxt_pP->rntiMaybeUEid;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause = F1AP_CAUSE_RADIO_NETWORK;
F1AP_UE_CONTEXT_RELEASE_CMD(m).cause_value = 10; // 10 = F1AP_CauseRadioNetwork_normal_release
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container = NULL;
F1AP_UE_CONTEXT_RELEASE_CMD(m).rrc_container_length = 0;
itti_send_msg_to_task(TASK_CU_F1, ctxt_pP->module_id, m);
}
return -1; return -1;
} }
...@@ -6277,14 +6067,7 @@ rrc_eNB_decode_ccch( ...@@ -6277,14 +6067,7 @@ rrc_eNB_decode_ccch(
NULL, NULL,
(LTE_PMCH_InfoList_r9_t *) NULL,NULL); (LTE_PMCH_InfoList_r9_t *) NULL,NULL);
if (!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type)) { rrc_rlc_config_asn1_req(ctxt_pP, ue_context_p->ue_context.SRB_configList, NULL, NULL, NULL, 0, 0);
rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList,
(LTE_DRB_ToAddModList_t *) NULL,
(LTE_DRB_ToReleaseList_t *) NULL,
(LTE_PMCH_InfoList_r9_t *) NULL, 0, 0
);
}
break; break;
...@@ -6665,9 +6448,6 @@ rrc_eNB_decode_dcch( ...@@ -6665,9 +6448,6 @@ rrc_eNB_decode_dcch(
break; break;
} }
AssertFatal(!NODE_IS_CU(RC.rrc[ctxt_pP->module_id]->node_type),
"CU cannot decode DCCH: no access to RC.mac[]\n");
if(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1) { if(RC.mac[ctxt_pP->module_id]->UE_info.UE_sched_ctrl[UE_id].crnti_reconfigurationcomplete_flag == 1) {
LOG_I(RRC, LOG_I(RRC,
PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n", PROTOCOL_RRC_CTXT_UE_FMT" UE State = RRC_RECONFIGURED (dedicated DRB, xid %ld) C-RNTI Complete\n",
...@@ -6914,8 +6694,6 @@ rrc_eNB_decode_dcch( ...@@ -6914,8 +6694,6 @@ rrc_eNB_decode_dcch(
if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionSetupComplete.criticalExtensions.choice.c1. if (ul_dcch_msg->message.choice.c1.choice.rrcConnectionSetupComplete.criticalExtensions.choice.c1.
present == present ==
LTE_RRCConnectionSetupComplete__criticalExtensions__c1_PR_rrcConnectionSetupComplete_r8) { LTE_RRCConnectionSetupComplete__criticalExtensions__c1_PR_rrcConnectionSetupComplete_r8) {
AssertFatal(!NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type),
"should not be reached in DU\n");
rrc_eNB_process_RRCConnectionSetupComplete( rrc_eNB_process_RRCConnectionSetupComplete(
ctxt_pP, ctxt_pP,
ue_context_p, ue_context_p,
...@@ -7312,112 +7090,6 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t *const ctxt_pP, ...@@ -7312,112 +7090,6 @@ void rrc_eNB_reconfigure_DRBs (const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(ctxt_pP, ue_context_pP, 0); rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(ctxt_pP, ue_context_pP, 0);
} }
void handle_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
LOG_I(RRC,"Received F1 Setup Request from gNB_DU %llu (%s)\n",(unsigned long long int)f1_setup_req->gNB_DU_id,f1_setup_req->gNB_DU_name);
//uint16_t num_cells_to_activate = 0;
int cu_cell_ind=0;
MessageDef *msg_p = NULL;
//LOG_W(RRC,"num_cells_available %d \n", f1_setup_req->num_cells_available);
for (int i=0; i<f1_setup_req->num_cells_available; i++) {
// check that mcc/mnc match and grab MIB/SIB1
int found_cell=0;
for (int j=0; j<RC.nb_inst; j++) {
eNB_RRC_INST *rrc = RC.rrc[j];
if (rrc->configuration.mcc[0] == f1_setup_req->cell[i].mcc &&
rrc->configuration.mnc[0] == f1_setup_req->cell[i].mnc &&
rrc->nr_cellid == f1_setup_req->cell[i].nr_cellid) {
// check that CU rrc instance corresponds to mcc/mnc/cgi (normally cgi should be enough, but just in case)
rrc->carrier[0].MIB = malloc(f1_setup_req->mib_length[i]);
rrc->carrier[0].sizeof_MIB = f1_setup_req->mib_length[i];
LOG_W(RRC, "instance %d mib length %d\n", i, f1_setup_req->mib_length[i]);
LOG_W(RRC, "instance %d sib1 length %d\n", i, f1_setup_req->sib1_length[i]);
memcpy((void *)rrc->carrier[0].MIB,f1_setup_req->mib[i],f1_setup_req->mib_length[i]);
asn_dec_rval_t dec_rval = uper_decode_complete(NULL,
&asn_DEF_LTE_BCCH_BCH_Message,
(void **)&rrc->carrier[0].mib_DU,
f1_setup_req->mib[i],
f1_setup_req->mib_length[i]);
AssertFatal(dec_rval.code == RC_OK,
"[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_BCH_MESSAGE (%zu bits)\n",
j,
dec_rval.consumed );
LTE_BCCH_BCH_Message_t *mib = &rrc->carrier[0].mib;
LTE_BCCH_BCH_Message_t *mib_DU = rrc->carrier[0].mib_DU;
mib->message.dl_Bandwidth = mib_DU->message.dl_Bandwidth;
mib->message.phich_Config.phich_Resource = mib_DU->message.phich_Config.phich_Resource;
mib->message.phich_Config.phich_Duration = mib_DU->message.phich_Config.phich_Duration;
rrc->carrier[0].SIB1 = malloc(f1_setup_req->sib1_length[i]);
rrc->carrier[0].sizeof_SIB1 = f1_setup_req->sib1_length[i];
memcpy((void *)rrc->carrier[0].SIB1,f1_setup_req->sib1[i],f1_setup_req->sib1_length[i]);
dec_rval = uper_decode_complete(NULL,
&asn_DEF_LTE_BCCH_DL_SCH_Message,
(void **)&rrc->carrier[0].siblock1_DU,
f1_setup_req->sib1[i],
f1_setup_req->sib1_length[i]);
AssertFatal(dec_rval.code == RC_OK,
"[eNB_DU %"PRIu8"] Failed to decode LTE_BCCH_DLSCH_MESSAGE (%zu bits)\n",
j,
dec_rval.consumed );
// Parse message and extract SystemInformationBlockType1 field
LTE_BCCH_DL_SCH_Message_t *bcch_message = rrc->carrier[0].siblock1_DU;
AssertFatal(bcch_message->message.present == LTE_BCCH_DL_SCH_MessageType_PR_c1,
"bcch_message->message.present != LTE_BCCH_DL_SCH_MessageType_PR_c1\n");
AssertFatal(bcch_message->message.choice.c1.present == LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1,
"bcch_message->message.choice.c1.present != LTE_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1\n");
rrc->carrier[0].sib1 = &bcch_message->message.choice.c1.choice.systemInformationBlockType1;
rrc->carrier[0].physCellId = f1_setup_req->cell[i].nr_pci;
// prepare F1_SETUP_RESPONSE
if (msg_p == NULL) {
msg_p = itti_alloc_new_message (TASK_CU_F1, 0,F1AP_SETUP_RESP);
}
F1AP_SETUP_RESP (msg_p).gNB_CU_name = rrc->node_name;
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].mcc = rrc->configuration.mcc[0];
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].mnc = rrc->configuration.mnc[0];
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].mnc_digit_length = rrc->configuration.mnc_digit_length[0];
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].nr_cellid = rrc->nr_cellid;
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].nrpci = f1_setup_req->cell[i].nr_pci;
int num_SI= 0;
if (rrc->carrier[0].SIB23) {
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI] = rrc->carrier[0].SIB23;
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI] = rrc->carrier[0].sizeof_SIB23;
//printf("SI %d size %d: ", 0, F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]);
//for (int n = 0; n < F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container_length[2+num_SI]; n++)
// printf("%02x ", F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].SI_container[2+num_SI][n]);
//printf("\n");
num_SI++;
}
F1AP_SETUP_RESP (msg_p).cells_to_activate[cu_cell_ind].num_SI = num_SI;
cu_cell_ind++;
found_cell=1;
F1AP_SETUP_RESP (msg_p).num_cells_to_activate = cu_cell_ind;
// send ITTI message to F1AP-CU task
itti_send_msg_to_task (TASK_CU_F1, ENB_MODULE_ID_TO_INSTANCE(j), msg_p);
break;
} else {// setup_req mcc/mnc match rrc internal list element
LOG_W(RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d \n",
j, rrc->configuration.mcc[0], f1_setup_req->cell[i].mcc,rrc->configuration.mnc[0], f1_setup_req->cell[i].mnc);
}
}// for (int j=0;j<RC.nb_inst;j++)
if (found_cell==0) {
AssertFatal(1==0,"No cell found\n");
/*msg_p = itti_alloc_new_message (TASK_CU_F1, 0,F1AP_SETUP_FAILURE);
F1AP_SETUP_RESP (msg_p).cause = rrc->node_name;
F1AP_SETUP_RESP (msg_p).time_to_wait = rrc->node_id;
F1AP_SETUP_RESP (msg_p).criticality_diagnostics = rrc->node_name;*/
}
// handle other failure cases
}//for (int i=0;i<f1_setup_req->num_cells_available;i++)
}
// ignore 5GNR fields for now, just take MIB and SIB1 // ignore 5GNR fields for now, just take MIB and SIB1
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -7665,7 +7337,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -7665,7 +7337,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
ue_context_p->ue_context.rnti, ue_context_p->ue_context.rnti,
ue_context_p->ue_context.ue_release_timer_thres_s1); ue_context_p->ue_context.ue_release_timer_thres_s1);
if (EPC_MODE_ENABLED && !NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) if (EPC_MODE_ENABLED)
rrc_eNB_generate_RRCConnectionRelease(ctxt_pP, ue_context_p); rrc_eNB_generate_RRCConnectionRelease(ctxt_pP, ue_context_p);
else else
removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p); removed_ue_count = add_ue_to_remove(ue_to_be_removed, removed_ue_count, ue_context_p);
...@@ -7719,7 +7391,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -7719,7 +7391,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
ue_context_p->ue_context.ue_release_timer_rrc = 1; ue_context_p->ue_context.ue_release_timer_rrc = 1;
ue_context_p->ue_context.ue_release_timer_thres_rrc = 100; ue_context_p->ue_context.ue_release_timer_thres_rrc = 100;
if (EPC_MODE_ENABLED && !NODE_IS_DU(RC.rrc[ctxt_pP->module_id]->node_type)) { if (EPC_MODE_ENABLED) {
if (rrc_release_info.RRC_release_ctrl[release_num].flag == 4) { // if timer_s1 == 0 if (rrc_release_info.RRC_release_ctrl[release_num].flag == 4) { // if timer_s1 == 0
rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(ctxt_pP->module_id, rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_CPLT(ctxt_pP->module_id,
ue_context_p->ue_context.eNB_ue_s1ap_id); ue_context_p->ue_context.eNB_ue_s1ap_id);
...@@ -7744,7 +7416,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) { ...@@ -7744,7 +7416,7 @@ void rrc_subframe_process(protocol_ctxt_t *const ctxt_pP, const int CC_id) {
if (rrc_ue_s1ap_ids != NULL) { if (rrc_ue_s1ap_ids != NULL) {
rrc_eNB_S1AP_remove_ue_ids(RC.rrc[ctxt_pP->module_id], rrc_ue_s1ap_ids); rrc_eNB_S1AP_remove_ue_ids(RC.rrc[ctxt_pP->module_id], rrc_ue_s1ap_ids);
} }
} /* EPC_MODE_ENABLED && !NODE_IS_DU */ } /* EPC_MODE_ENABLED */
rrc_release_info.RRC_release_ctrl[release_num].flag = 0; rrc_release_info.RRC_release_ctrl[release_num].flag = 0;
rrc_release_info.num_UEs--; rrc_release_info.num_UEs--;
...@@ -7938,47 +7610,35 @@ void rrc_eNB_process_AdditionResponseInformation(const module_id_t enb_mod_idP, ...@@ -7938,47 +7610,35 @@ void rrc_eNB_process_AdditionResponseInformation(const module_id_t enb_mod_idP,
int size; int size;
ue_context = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], m->rnti); ue_context = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], m->rnti);
if (ue_context) { if (ue_context == NULL) {
ue_context->ue_context.nb_of_modify_endc_e_rabs = m->nb_e_rabs_admitted_tobeadded; LOG_E(RRC, "no ue_context for RNTI %x\n", m->rnti);
return;
}
ue_context->ue_context.gnb_rnti = m->SgNB_ue_x2_id; ue_context->ue_context.nb_of_modify_endc_e_rabs = m->nb_e_rabs_admitted_tobeadded;
ue_context->ue_context.gnb_x2_assoc_id = m->gnb_x2_assoc_id; ue_context->ue_context.gnb_rnti = m->SgNB_ue_x2_id;
ue_context->ue_context.gnb_x2_assoc_id = m->gnb_x2_assoc_id;
int j=0; int j = 0;
while(j < m->nb_e_rabs_admitted_tobeadded) { while (j < m->nb_e_rabs_admitted_tobeadded) {
for (int e_rab_idx=0; e_rab_idx<ue_context->ue_context.setup_e_rabs; e_rab_idx++) { for (int e_rab_idx = 0; e_rab_idx < ue_context->ue_context.setup_e_rabs; e_rab_idx++) {
//Update ue_context information with gNB's address and new GTP tunnel ID // Update ue_context information with gNB's address and new GTP tunnel ID
if( ue_context->ue_context.e_rab[e_rab_idx].param.e_rab_id == m->e_rabs_admitted_tobeadded[j].e_rab_id) { if (ue_context->ue_context.e_rab[e_rab_idx].param.e_rab_id == m->e_rabs_admitted_tobeadded[j].e_rab_id) {
memcpy(ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].buffer, memcpy(ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].buffer, m->e_rabs_admitted_tobeadded[j].gnb_addr.buffer, m->e_rabs_admitted_tobeadded[j].gnb_addr.length);
m->e_rabs_admitted_tobeadded[j].gnb_addr.buffer, ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].length = m->e_rabs_admitted_tobeadded[j].gnb_addr.length;
m->e_rabs_admitted_tobeadded[j].gnb_addr.length); ue_context->ue_context.gnb_gtp_endc_teid[e_rab_idx] = m->e_rabs_admitted_tobeadded[j].gtp_teid;
ue_context->ue_context.gnb_gtp_endc_addrs[e_rab_idx].length = m->e_rabs_admitted_tobeadded[j].gnb_addr.length; ue_context->ue_context.e_rab[e_rab_idx].status = E_RAB_STATUS_TOMODIFY;
ue_context->ue_context.gnb_gtp_endc_teid[e_rab_idx] = m->e_rabs_admitted_tobeadded[j].gtp_teid; break;
ue_context->ue_context.e_rab[e_rab_idx].status = E_RAB_STATUS_TOMODIFY;
break;
}
} }
j++;
} }
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, j++;
0,
ENB_FLAG_YES,
m->rnti,
0, 0);
size = rrc_eNB_generate_RRCConnectionReconfiguration_endc(&ctxt, ue_context, buffer, 8192, scg_CellGroupConfig, nr1_conf);
rrc_data_req(&ctxt,
DCCH,
rrc_eNB_mui++,
SDU_CONFIRM_NO,
size,
buffer,
PDCP_TRANSMISSION_MODE_CONTROL);
} else {
LOG_E(F1AP, "no ue_context for RNTI %x, acknowledging release\n", m->rnti);
} }
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, 0, ENB_FLAG_YES, m->rnti, 0, 0);
size = rrc_eNB_generate_RRCConnectionReconfiguration_endc(&ctxt, ue_context, buffer, 8192, scg_CellGroupConfig, nr1_conf);
rrc_data_req(&ctxt, DCCH, rrc_eNB_mui++, SDU_CONFIRM_NO, size, buffer, PDCP_TRANSMISSION_MODE_CONTROL);
} }
void rrc_eNB_process_ENDC_DC_prep_timeout(module_id_t module_id, x2ap_ENDC_dc_prep_timeout_t *m) void rrc_eNB_process_ENDC_DC_prep_timeout(module_id_t module_id, x2ap_ENDC_dc_prep_timeout_t *m)
...@@ -8287,13 +7947,6 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -8287,13 +7947,6 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
openair_rrc_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p)); openair_rrc_eNB_configuration(ENB_INSTANCE_TO_MODULE_ID(instance), &RRC_CONFIGURATION_REQ(msg_p));
break; break;
/* Messages from F1AP task */
case F1AP_SETUP_REQ:
AssertFatal(NODE_IS_CU(RC.rrc[instance]->node_type), "should not receive F1AP_SETUP_REQUEST, need call by CU!\n");
LOG_I(RRC, "[eNB %ld] Received %s : %p\n", instance, msg_name_p, &F1AP_SETUP_REQ(msg_p));
handle_f1_setup_req(&F1AP_SETUP_REQ(msg_p));
break;
case RRC_SUBFRAME_PROCESS: case RRC_SUBFRAME_PROCESS:
rrc_subframe_process(&RRC_SUBFRAME_PROCESS(msg_p).ctxt, RRC_SUBFRAME_PROCESS(msg_p).CC_id); rrc_subframe_process(&RRC_SUBFRAME_PROCESS(msg_p).ctxt, RRC_SUBFRAME_PROCESS(msg_p).CC_id);
break; break;
......
...@@ -276,15 +276,13 @@ static void rrc_M2AP_init_MBMS( ...@@ -276,15 +276,13 @@ static void rrc_M2AP_init_MBMS(
, &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) , &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
,NULL); ,NULL);
if (!NODE_IS_CU(RC.rrc[enb_mod_idP]->node_type)) { rrc_rlc_config_asn1_req(&ctxt,
rrc_rlc_config_asn1_req(&ctxt, NULL, // LTE_SRB_ToAddModList
NULL, // LTE_SRB_ToAddModList NULL, // LTE_DRB_ToAddModList
NULL, // LTE_DRB_ToAddModList NULL, // DRB_ToReleaseList
NULL, // DRB_ToReleaseList &(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9)
&(RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9) ,0, 0
,0, 0 );
);
}
//rrc_mac_config_req(); //rrc_mac_config_req();
} }
} }
...@@ -298,8 +296,6 @@ static void rrc_M2AP_init_MCCH( ...@@ -298,8 +296,6 @@ static void rrc_M2AP_init_MCCH(
){ ){
int sync_area = 0; int sync_area = 0;
// initialize RRC_eNB_INST MCCH entry
eNB_RRC_INST *rrc = RC.rrc[enb_mod_idP];
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE = RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESSAGE =
malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *)); malloc(RC.rrc[enb_mod_idP]->carrier[CC_id].num_mbsfn_sync_area * sizeof(uint8_t *));
...@@ -353,13 +349,11 @@ static void rrc_M2AP_init_MCCH( ...@@ -353,13 +349,11 @@ static void rrc_M2AP_init_MCCH(
RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[sync_area].Active = 1; RC.rrc[enb_mod_idP]->carrier[CC_id].MCCH_MESS_COUNTING[sync_area].Active = 1;
} }
if (NODE_IS_MONOLITHIC(rrc->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = CC_id;
tmp.CC_id = CC_id; tmp.pmch_InfoList = &RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9;
tmp.pmch_InfoList = &RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message->pmch_InfoList_r9; tmp.mbms_AreaConfiguration = RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message;
tmp.mbms_AreaConfiguration = RC.rrc[enb_mod_idP]->carrier[CC_id].mcch_message; rrc_mac_config_req_eNB(enb_mod_idP, &tmp);
rrc_mac_config_req_eNB(enb_mod_idP, &tmp);
}
return; return;
} }
...@@ -599,18 +593,16 @@ static uint8_t rrc_M2AP_do_SIB1_MBMS_SIB13( ...@@ -599,18 +593,16 @@ static uint8_t rrc_M2AP_do_SIB1_MBMS_SIB13(
return(-1); return(-1);
} }
carrier->MBMS_flag =1; carrier->MBMS_flag = 1;
if (NODE_IS_MONOLITHIC(rrc->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = CC_id;
tmp.CC_id = CC_id; tmp.rnti = 0xfffd;
tmp.rnti = 0xfffd; tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList;
tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList; tmp.MBMS_Flag = carrier->MBMS_flag;
tmp.MBMS_Flag = carrier->MBMS_flag; tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9;
tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9; tmp.FeMBMS_Flag = carrier->FeMBMS_flag;
tmp.FeMBMS_Flag = carrier->FeMBMS_flag; rrc_mac_config_req_eNB(Mod_id, &tmp);
rrc_mac_config_req_eNB(Mod_id, &tmp);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
...@@ -856,15 +848,13 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2( ...@@ -856,15 +848,13 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2(
return(-1); return(-1);
} }
carrier->MBMS_flag =1; carrier->MBMS_flag = 1;
if (NODE_IS_MONOLITHIC(rrc->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = CC_id;
tmp.CC_id = CC_id; tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList;
tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList; tmp.MBMS_Flag = carrier->MBMS_flag;
tmp.MBMS_Flag = carrier->MBMS_flag; rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
...@@ -1001,13 +991,11 @@ static uint8_t rrc_M2AP_do_SIB23_SIB13( ...@@ -1001,13 +991,11 @@ static uint8_t rrc_M2AP_do_SIB23_SIB13(
return(-1); return(-1);
} }
if (NODE_IS_MONOLITHIC(rrc->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = CC_id;
tmp.CC_id = CC_id; tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9;
tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9; tmp.MBMS_Flag = carrier->MBMS_flag;
tmp.MBMS_Flag = carrier->MBMS_flag; rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
...@@ -1250,16 +1238,14 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13( ...@@ -1250,16 +1238,14 @@ static uint8_t rrc_M2AP_do_SIB23_SIB2_SIB13(
return(-1); return(-1);
} }
carrier->MBMS_flag =1; carrier->MBMS_flag = 1;
if (NODE_IS_MONOLITHIC(rrc->node_type)) { rrc_mac_config_req_eNB_t tmp = {0};
rrc_mac_config_req_eNB_t tmp = {0}; tmp.CC_id = CC_id;
tmp.CC_id = CC_id; tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList;
tmp.mbsfn_SubframeConfigList = carrier->sib2->mbsfn_SubframeConfigList; tmp.MBMS_Flag = carrier->MBMS_flag;
tmp.MBMS_Flag = carrier->MBMS_flag; tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9;
tmp.mbsfn_AreaInfoList = &carrier->sib13->mbsfn_AreaInfoList_r9; rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
rrc_mac_config_req_eNB(ctxt_pP->module_id, &tmp);
}
RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8); RC.rrc[ctxt_pP->module_id]->carrier[CC_id].sizeof_SIB23 = ((enc_rval.encoded+7)/8);
......
...@@ -993,39 +993,6 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char ...@@ -993,39 +993,6 @@ int rrc_eNB_process_S1AP_INITIAL_CONTEXT_SETUP_REQ(MessageDef *msg_p, const char
//if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){} //if(ue_context_p->ue_context.reestablishment_cause == ReestablishmentCause_spare1){}
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p); rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(&ctxt,ue_context_p);
} }
if (NODE_IS_CU(RC.rrc[ctxt.module_id]->node_type)) {
struct eNB_RRC_INST_s *rrc= RC.rrc[0];
MessageDef *message_p = itti_alloc_new_message (TASK_RRC_ENB, 0, F1AP_UE_CONTEXT_SETUP_REQ);
f1ap_ue_context_setup_t *req=&F1AP_UE_CONTEXT_SETUP_REQ (message_p);
req->gNB_CU_ue_id = 0;
req->gNB_DU_ue_id = 0;
req->rnti = ue_context_p->ue_context.rnti;
req->mcc = rrc->configuration.mcc[0];
req->mnc = rrc->configuration.mnc[0];
req->mnc_digit_length = rrc->configuration.mnc_digit_length[0];
req->nr_cellid = rrc->nr_cellid;
req->srbs_to_be_setup = malloc(sizeof(f1ap_srb_to_be_setup_t));
req->srbs_to_be_setup_length = 1;
f1ap_srb_to_be_setup_t *SRBs=req->srbs_to_be_setup;
SRBs[0].srb_id=CCCH;
req->drbs_to_be_setup_length = S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).nb_of_e_rabs;
req->drbs_to_be_setup = malloc(req->drbs_to_be_setup_length * sizeof(f1ap_drb_to_be_setup_t));
f1ap_drb_to_be_setup_t *DRBs=req->drbs_to_be_setup;
for (int i = 0; i < req->drbs_to_be_setup_length ; i++) {
DRBs[i].drb_id=S1AP_INITIAL_CONTEXT_SETUP_REQ (msg_p).e_rab_param[i].e_rab_id;
DRBs[i].rlc_mode = RLC_MODE_AM;
DRBs[i].up_ul_tnl[0].tl_address = inet_addr(rrc->eth_params_s.my_addr);
DRBs[i].up_ul_tnl[0].port=rrc->eth_params_s.my_portd;
DRBs[i].up_ul_tnl_length = 1;
DRBs[i].up_dl_tnl[0].tl_address = inet_addr(rrc->eth_params_s.remote_addr);
DRBs[i].up_dl_tnl[0].port=rrc->eth_params_s.remote_portd;
DRBs[i].up_dl_tnl_length = 1;
}
LOG_I(RRC, "Send F1AP_UE_CONTEXT_SETUP_REQ with ITTI\n");
itti_send_msg_to_task (TASK_CU_F1, 0, message_p);
}
} }
return (0); return (0);
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
* \email: raymond.knopp@eurecom.fr, kroempa@gmail.com * \email: raymond.knopp@eurecom.fr, kroempa@gmail.com
*/ */
#include <f1ap_du_rrc_message_transfer.h>
#include "platform_types.h" #include "platform_types.h"
#include "nr_rrc_defs.h" #include "nr_rrc_defs.h"
#include "nr_rrc_extern.h" #include "nr_rrc_extern.h"
...@@ -44,7 +43,6 @@ ...@@ -44,7 +43,6 @@
#include "NR_BCCH-BCH-Message.h" #include "NR_BCCH-BCH-Message.h"
#include "rrc_gNB_UE_context.h" #include "rrc_gNB_UE_context.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h> #include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#include <openair2/F1AP/f1ap_du_rrc_message_transfer.h>
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
...@@ -101,7 +99,7 @@ nr_rrc_data_req( ...@@ -101,7 +99,7 @@ nr_rrc_data_req(
/* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads /* Hack: only trigger PDCP if in CU, otherwise it is triggered by RU threads
* Ideally, PDCP would not neet to be triggered like this but react to ITTI * Ideally, PDCP would not neet to be triggered like this but react to ITTI
* messages automatically */ * messages automatically */
if (ctxt_pP->enb_flag && NODE_IS_CU(RC.nrrrc[ctxt_pP->module_id]->node_type)) if (ctxt_pP->enb_flag)
pdcp_run(ctxt_pP); pdcp_run(ctxt_pP);
return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway. return true; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include "ip_forward_messages_types.h" #include "ip_forward_messages_types.h"
#include "s11_messages_types.h" #include "s11_messages_types.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "f1ap_messages_types.h"
#include "nas_messages_types.h" #include "nas_messages_types.h"
#include "s6a_messages_types.h" #include "s6a_messages_types.h"
#include "sctp_messages_types.h" #include "sctp_messages_types.h"
......
...@@ -92,7 +92,7 @@ int m2ap_eNB_generate_m2_setup_request( ...@@ -92,7 +92,7 @@ int m2ap_eNB_generate_m2_setup_request(
//ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID; //ie->id = M2AP_ProtocolIE_ID_id_gNB_eNB_ID;
//ie->criticality = M2AP_Criticality_reject; //ie->criticality = M2AP_Criticality_reject;
//ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID; //ie->value.present = M2AP_M2SetupRequestIEs__value_PR_GNB_eNB_ID;
//asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, f1ap_du_data->gNB_eNB_id); //asn_int642INTEGER(&ie->value.choice.GNB_eNB_ID, 0);
//asn1cSeqAdd(&out->protocolIEs.list, ie); //asn1cSeqAdd(&out->protocolIEs.list, ie);
/* optional */ /* optional */
......
...@@ -128,7 +128,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start ...@@ -128,7 +128,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStartResponse_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStartResponse_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -137,7 +137,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start ...@@ -137,7 +137,7 @@ int MCE_send_MBMS_SESSION_START_RESPONSE(instance_t instance, m3ap_session_start
ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStartResponse_IEs__value_PR_MME_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStartResponse_IEs__value_PR_MME_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -289,7 +289,7 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_ ...@@ -289,7 +289,7 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStopResponse_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStopResponse_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -298,7 +298,7 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_ ...@@ -298,7 +298,7 @@ int MCE_send_MBMS_SESSION_STOP_RESPONSE(instance_t instance, m3ap_session_start_
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStopResponse_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStopResponse_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -388,7 +388,7 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session ...@@ -388,7 +388,7 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionUpdateResponse_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionUpdateResponse_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -397,7 +397,7 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session ...@@ -397,7 +397,7 @@ int MCE_send_MBMS_SESSION_UPDATE_RESPONSE(instance_t instance, m3ap_mbms_session
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionUpdateResponse_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionUpdateResponse_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -494,7 +494,7 @@ int MCE_send_M3_SETUP_REQUEST(m3ap_MCE_instance_t *instance_p, m3ap_MCE_data_t * ...@@ -494,7 +494,7 @@ int MCE_send_M3_SETUP_REQUEST(m3ap_MCE_instance_t *instance_p, m3ap_MCE_data_t *
// //ie->id = M3AP_ProtocolIE_ID_id_gNB_MCE_ID; // //ie->id = M3AP_ProtocolIE_ID_id_gNB_MCE_ID;
// //ie->criticality = M3AP_Criticality_reject; // //ie->criticality = M3AP_Criticality_reject;
// //ie->value.present = M3AP_M3SetupRequestIEs__value_PR_GNB_MCE_ID; // //ie->value.present = M3AP_M3SetupRequestIEs__value_PR_GNB_MCE_ID;
// //asn_int642INTEGER(&ie->value.choice.GNB_MCE_ID, f1ap_du_data->gNB_MCE_id); // //asn_int642INTEGER(&ie->value.choice.GNB_MCE_ID, 0);
// //asn1cSeqAdd(&out->protocolIEs.list, ie); // //asn1cSeqAdd(&out->protocolIEs.list, ie);
// //
// /* optional */ // /* optional */
......
...@@ -111,9 +111,7 @@ void m3ap_MME_handle_sctp_association_resp(instance_t instance, sctp_new_associa ...@@ -111,9 +111,7 @@ void m3ap_MME_handle_sctp_association_resp(instance_t instance, sctp_new_associa
sctp_new_association_resp->ulp_cnx_id); sctp_new_association_resp->ulp_cnx_id);
if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN) if (sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN)
//proto_agent_stop(instance); return;
//f1ap_handle_setup_message(instance, sctp_new_association_resp->sctp_state == SCTP_STATE_SHUTDOWN);
return; // exit -1 for debugging
} }
// go to an init func // go to an init func
......
...@@ -93,7 +93,7 @@ int MME_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id ...@@ -93,7 +93,7 @@ int MME_send_MBMS_SESSION_START_REQUEST(instance_t instance/*, uint32_t assoc_id
ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStartRequest_IEs__value_PR_MME_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStartRequest_IEs__value_PR_MME_MBMS_M3AP_ID;
//ie->value.choice.MME_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MME_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -343,7 +343,7 @@ int MME_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m3ap_session_stop_re ...@@ -343,7 +343,7 @@ int MME_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m3ap_session_stop_re
ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStopRequest_IEs__value_PR_MME_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStopRequest_IEs__value_PR_MME_MBMS_M3AP_ID;
//ie->value.choice.MME_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MME_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -352,7 +352,7 @@ int MME_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m3ap_session_stop_re ...@@ -352,7 +352,7 @@ int MME_send_MBMS_SESSION_STOP_REQUEST(instance_t instance, m3ap_session_stop_re
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionStopRequest_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionStopRequest_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
...@@ -857,7 +857,7 @@ int MME_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m3ap_mbms_session_ ...@@ -857,7 +857,7 @@ int MME_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m3ap_mbms_session_
ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MME_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionUpdateRequest_IEs__value_PR_MME_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionUpdateRequest_IEs__value_PR_MME_MBMS_M3AP_ID;
//ie->value.choice.MME_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MME_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
/* mandatory */ /* mandatory */
...@@ -866,7 +866,7 @@ int MME_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m3ap_mbms_session_ ...@@ -866,7 +866,7 @@ int MME_send_MBMS_SESSION_UPDATE_REQUEST(instance_t instance, m3ap_mbms_session_
ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID; ie->id = M3AP_ProtocolIE_ID_id_MCE_MBMS_M3AP_ID;
ie->criticality = M3AP_Criticality_reject; ie->criticality = M3AP_Criticality_reject;
ie->value.present = M3AP_MBMSSessionUpdateRequest_IEs__value_PR_MCE_MBMS_M3AP_ID; ie->value.present = M3AP_MBMSSessionUpdateRequest_IEs__value_PR_MCE_MBMS_M3AP_ID;
//ie->value.choice.MCE_MBMS_M3AP_ID = /*F1AP_get_next_transaction_identifier(enb_mod_idP, du_mod_idP);*/ //? //ie->value.choice.MCE_MBMS_M3AP_ID = 0;
asn1cSeqAdd(&out->protocolIEs.list, ie); asn1cSeqAdd(&out->protocolIEs.list, ie);
......
...@@ -85,17 +85,7 @@ extern RAN_CONTEXT_t RC; ...@@ -85,17 +85,7 @@ extern RAN_CONTEXT_t RC;
// LOG_I(ENB_APP,"[MCE %d] MCE_app_register via M3AP for instance %d\n", mce_id, ENB_MODULE_ID_TO_INSTANCE(mce_id)); // LOG_I(ENB_APP,"[MCE %d] MCE_app_register via M3AP for instance %d\n", mce_id, ENB_MODULE_ID_TO_INSTANCE(mce_id));
// itti_send_msg_to_task (TASK_M3AP, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p); // itti_send_msg_to_task (TASK_M3AP, ENB_MODULE_ID_TO_INSTANCE(mce_id), msg_p);
// //
// //if (NODE_IS_DU(node_type)) { // F1AP registration // //{ // S1AP registration
// // // configure F1AP here for F1C
// // LOG_I(ENB_APP,"ngran_eNB_DU: Allocating ITTI message for F1AP_SETUP_REQ\n");
// // msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, F1AP_SETUP_REQ);
// // RCconfig_DU_F1(msg_p, enb_id);
//
// // LOG_I(ENB_APP,"[eNB %d] eNB_app_register via F1AP for instance %d\n", enb_id, ENB_MODULE_ID_TO_INSTANCE(enb_id));
// // itti_send_msg_to_task (TASK_DU_F1, ENB_MODULE_ID_TO_INSTANCE(enb_id), msg_p);
// // // configure GTPu here for F1U
// //}
// //else { // S1AP registration
// // /* note: there is an implicit relationship between the data structure and the message name */ // // /* note: there is an implicit relationship between the data structure and the message name */
// // msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ); // // msg_p = itti_alloc_new_message (TASK_ENB_APP, 0, S1AP_REGISTER_ENB_REQ);
// // RCconfig_S1(msg_p, enb_id); // // RCconfig_S1(msg_p, enb_id);
...@@ -313,12 +303,9 @@ void *MME_app_task(void *args_p) { ...@@ -313,12 +303,9 @@ void *MME_app_task(void *args_p) {
break; break;
// case M3AP_SETUP_RESP: // case M3AP_SETUP_RESP:
// //AssertFatal(NODE_IS_DU(RC.rrc[0]->node_type), "Should not have received F1AP_REGISTER_ENB_CNF in CU/MCE\n");
// //LOG_I(MME_APP, "Received %s: associated ngran_MCE_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p), // //LOG_I(MME_APP, "Received %s: associated ngran_MCE_CU %s with %d cells to activate\n", ITTI_MSG_NAME (msg_p),
// //F1AP_SETUP_RESP(msg_p).gNB_CU_name,F1AP_SETUP_RESP(msg_p).num_cells_to_activate);
// //
// //handle_f1ap_setup_resp(&F1AP_SETUP_RESP(msg_p));
// handle_m3ap_setup_resp(&M3AP_SETUP_RESP(msg_p)); // handle_m3ap_setup_resp(&M3AP_SETUP_RESP(msg_p));
// DevAssert(register_mce_pending > 0); // DevAssert(register_mce_pending > 0);
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#include "f1ap_messages_types.h"
#include "LTE_SystemInformationBlockType2.h" #include "LTE_SystemInformationBlockType2.h"
#include "rrc_messages_types.h" #include "rrc_messages_types.h"
#include "RRC/LTE/rrc_defs.h" #include "RRC/LTE/rrc_defs.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment