Commit fb465455 authored by frtabu's avatar frtabu

Fix corrupted LOGs in L1L2simulator, introducing two new components NFAPI_VNF...

Fix corrupted LOGs in L1L2simulator, introducing two new components NFAPI_VNF and NFAPI_pnf. Integrate Fujitsu fix for up to 50 UEs. Apply astyle to all modified files in the branch
parent f3dc8d44
dev 1 128-ues 256_QAM_demod 2cw_fairRRscd 445-LDPC-implementation-on-GPU 459-pusch-based-ta-updates 464-ru_beamforming_in_gpu 464-ru_beamforming_in_gpu-CPUsubfunction 472-add-pusch-dmrs-modes 481-ldpc-decoder-on-gpu 512-dataplane-bug-in-l2nfapi_nos1 FR2_NSA Fix_SA_SIB1 LTE_TRX_on_single_port NCTU_CS_ISIP NCTU_CS_ISIP_CPU NCTU_CS_ISIP_GPU NCTU_OpinConnect_LDPC NR-PHY-MAC-IF-multi-UE NRPRACH_highSpeed_saankhya NRUE_usedlschparallel NR_10MHz NR_2port_CSIRS NR_CSIRS_tomerge NR_CSI_reporting NR_DCI_01 NR_DLUL_PF NR_DLUL_PF_4UL NR_DLUL_PF_rebased NR_DL_MIMO NR_DL_sched_fixes NR_DL_scheduler NR_F1C_F1U_extensions NR_FAPI_beamindex_SSB_RO NR_FAPI_beamindex_SSB_RO_SEMPROJ NR_FDD_FIX NR_FR2_RA NR_FR2_RRC_SSB NR_FR2_initsync_fixes NR_MAC_CE_GlobalEdge NR_MAC_Multi_Rach_GlobalEdge NR_MAC_Multi_Rach_GlobalEdge-old NR_MAC_SSB NR_MAC_SSB_RO_GlobalEdge NR_MAC_SSB_RO_UE_IDCC NR_MAC_SSB_RO_merge NR_MAC_TCI_UCI_GlobalEdge NR_MCS_BLER NR_NGAP NR_PDCP_noS1 NR_PUCCH_MultiUE NR_RA_cleanup NR_RA_updates NR_RRCConfiguragion_FR2 NR_RRCConfiguration NR_RRCConfiguration_FR2 NR_RRCConfiguration_S1U NR_RRCConfiguration_merge_develop NR_RRCConfiguration_sync_source NR_RRCConfiguration_trx_thread NR_RRC_CP_bugfix NR_RRC_PDCP NR_RRC_PRACH_procedures NR_RRC_PRACH_procedures_todevelop NR_RRC_PUSCH NR_RRC_TA NR_RRC_X2AP_AMBR_Change_Global_edge NR_RRC_X2AP_RemoveHardcodings_GlobalEdge NR_RRC_config_simplified NR_RRC_harq NR_RRC_harq_b NR_RRC_harq_hacks NR_RRC_harq_newdcipdu NR_SA_F1AP_5GRECORDS NR_SA_F1AP_5GRECORDS-USIM NR_SA_F1AP_5GRECORDS-wf-0623 NR_SA_F1AP_5GRECORDS_lts NR_SA_F1AP_RFSIMULATOR NR_SA_F1AP_RFSIMULATOR2 NR_SA_F1AP_RFSIMULATOR2_SRB NR_SA_F1AP_RFSIMULATOR3 NR_SA_F1AP_RFSIMULATOR3_tmp NR_SA_F1AP_RFSIMULATOR3_wf NR_SA_F1AP_RFSIMULATOR_w5GCN NR_SA_F1AP_dev NR_SA_NGAP_RRC NR_SA_NGAP_RRC_wk42 NR_SA_itti_sim_wk48 NR_SA_itti_sim_wk48_hs NR_SA_itti_sim_wk48_hs1 NR_SA_w5GCN_new_gtpu NR_SCHED NR_SCHED_HARQ NR_SCHED_PDCCH_PUCCH_HARQ NR_SCHED_PDCCH_PUCCH_HARQ_rebased NR_SCHED_fixes NR_SRB_Config NR_TRX_on_single_port NR_TRX_on_single_port2 NR_UE_CONFIG_REQ_FIXES NR_UE_MAC_scheduler NR_UE_PUCCH_bugfixes NR_UE_RA_fixes NR_UE_SA NR_UE_UL_DCI_improvements NR_UE_dlsch_bugfix NR_UE_enable_parallelization NR_UE_rework_test NR_UE_reworking_UCI_procedures NR_UE_stability_fixes NR_UL_FAPI_programming NR_UL_SCFDMA_100MHz NR_UL_scheduler NR_UL_scheduler_rebased NR_UL_scheduling NR_Wireshark NR_beam_simulation NR_beamforming_test NR_cleanup_PUCCH_resources NR_gNB_SCF_Indication NR_gNB_initial_MIB_fix NR_ipaccess_testing NR_mac_uci_functions_rework NR_msg2_phytest NR_multiplexing_HARQ_CSI_PUCCH NR_phytest_bugfixes NR_reworking_UL_antennaports NR_scheduling_CSIRS NR_scheduling_request NR_scheduling_request2 NR_scheduling_request3 NR_test_S1U_RRC_PRACH_procedures NR_ue_dlsch_dmrs_cdm OpInConnect_ISIP PBCHNRTCFIX PUSCH_TA_update RA_CI_test RFquality Saankhya_NRPRACH_HighSpeed Test_SA_5GREC UE_DL_DCI_hotfix add-dmrs-test add-ru-docker-image addoptions_nr_USRPdevice avxllr bandwidth-testing bch-fixes-bitmap benetel_5g_prach_fix benetel_config_file_fix benetel_dpdk20 benetel_driver_uldl_pf_merge benetel_driver_update benetel_fixes benetel_phase_rotation benetel_phase_rotation_old bsr-fix bugfix-find-uci bugfix-free-ra-process bugfix-minor-remove-wrong-log bugfix-nr-bands bugfix-nr-ldpc-post-processing bugfix-nr-ldpc-size-typo bugfix-nr-pdcp-sn-size bugfix-nr-rate-matching-assertion bugfix-nr-t-reordering bugfix-x2-SgNBAdditionRequest bugfix_gnb_rt_stats_html bupt-sa-merge cce_indexing_fix cce_indexing_fix2 ci-deploy-asterix ci-deploy-docker-compose ci-fix-module-ul-iperf ci-new-docker-pipeline ci-rd-july-improvements ci-reduce-nb-vms ci-test ci-ul-iperf-from-trf-container ci-yacine ci_benetel_longrun_limits ci_benetel_test ci_fix_iperf_for_module ci_hotfix_module_ue_ip_address ci_improve_module_ctl ci_nsa_benetel ci_nsa_fixes ci_nsa_pipes_improve ci_nsa_test_integration_2021_wk19 ci_nsa_traces ci_nsa_uplink ci_phytest ci_quectel_support ci_sa_rfsim_test ci_solve_ul_for_module ci_test_5GREC ci_test_nsa_fix_quectel_nic ci_test_nsa_on_develop ci_test_ra_fr2 ci_testinfra_as_code ci_vm_resource_fix clean-5G-scope-round2 cleanup_softmodem_main constant_power container_fix container_v1.2.2 debug-UL-5GRECORDS debug_UL_signal debug_branch_init_sync detached-w16-test develop develop-CBRA-v3 develop-CCE develop-NR_SA_F1AP_5GRECORDS develop-NR_SA_F1AP_5GRECORDS-abs develop-NR_SA_F1AP_5GRECORDS-hs develop-NR_SA_F1AP_5GRECORDS-hs1 develop-NR_SA_F1AP_5GRECORDS-lts develop-NR_SA_F1AP_5GRECORDS-lts-wf develop-NR_SA_F1AP_5GRECORDS-v3 develop-NR_SA_F1AP_5GRECORDS_100M develop-NR_SA_F1AP_5GRECORDS_LDPC_FPGA develop-NR_SA_F1AP_5GRECORDS_lfq_0607 develop-SA-CBRA develop-SA-CBRA-CUDU develop-SA-CBRA-Msg5 develop-SA-CBRA-lts develop-SA-CBRA-ulsch-lts develop-SA-RA develop-SnT develop-aw2sori develop-ci develop-large-scale-emulations develop-m2ap develop-multi-RRUs develop-nb-iot-merge develop-nb-iot-merge-w-conflicts develop-nb-iot-ntust develop-nr develop-nr-fr2 develop-nr-fr2-rework develop-nr_cppcheck develop-oriecpriupdates develop-sib1 develop-sib1-local develop-sib1-lts develop-sib1-update develop-sib1-update-test1 develop-sib1-update-ue develop-vco3 develop-wf-du develop_ci develop_inria_ci_deployment develop_inria_ci_deployment_gp develop_inria_ci_deployment_gp_b4merge develop_integration_2019_w44 develop_integration_2020_w15 develop_integration_2020_w19 develop_integration_w08 develop_jenkins_replay develop_stable dfts_alternatives disable_CSI_measrep dlsch-all-dlslots dlsch_encode_mthread dlsch_parallel docker-improvements-2021-april docker-no-cache-option docupdate_tools dongzhanyi-zte-0001 dongzhanyi-zte-develop dongzhanyi-zte-develop1 dongzhanyi-zte-develop2 dreibh/apt-auth-fix dreibh/device-load-fix dreibh/device-load-fix-develop-branch dual-connectivity dummy edrx enhance-rfsim episys-merge episys/nsa_baseline episys/nsa_development extend_sharedlibusage extend_sharedlibusage2 fapi_for_dmrs_and_ptrs feature-368-channel-simulator feature-4g-sched feature-flexran-cm-s1ap feature-nr-4g-nfapi-modifications feature-support-clang-format feature/make-s1-mme-port-configurable feature/make-s1-mme-port-configurable-with-astyle-fixes feature_tm3 fedora-gen-kernel-fix fembms-enb-ue fft_bench_hotfix finalize-oaicn-integration firas fix-check fix-ci-tun fix-clock-source fix-compile fix-dirty-ue-same-machine fix-itti-segv fix-l2-sim fix-limeSDR-compile fix-nr-pdcp-timer fix-nr-rlc-range-nack fix-physim-deploy fix-quectel fix-realtime fix-retransmission-rbg fix-softmodem-restart fix-warnings fix-x2-without-gnb fix_NR_DLUL_PF fix_NR_DLUL_PF_benchmark fix_coreset_dmrs_idx fix_do_ra_data fix_nr_ulsim fix_pdsch_low_prb fix_rb_corruption fix_reestablishment fix_rfsim_mimo fix_rrc_x2_ticking fixes-CE-RLC-PDU-size fixes-mac-sched-nfapi fixes-mac-sched-tun fixes-tun fixgtpu flexran-apps flexran-improvements flexran-repair-mme-mgmt flexran-report-split flexran-rtc-repo-is-public fr2-hw-test fujitsu_lte_contribution fujitsu_lte_contribution-128 generate_push_ptrs git-dashboard gnb-freerun-txru gnb-n300-fixes gnb-only-test gnb-realtime-hotfix gnb-realtime-quickfix gnb-threadpool hack-bch-no-sched-sf-0 hack-exit-gnb-when-no-enb-nsa harq-hotfix hotfix-minor-remove-nr-rlc-cppcheck-error hotfix-nr-rlc-tick hotfix-ocp-executable hotfix-ue-musim-compilation hotfix_usrp_lib improve_build_nr_lte_merge improve_nr_modulation improve_ue_stability initial-nfapi-PNF-fixes integ-w13-test-rt-issue integration-develop-nr-2019w45 integration_2020_wk15 integration_2020_wk40 integration_2020_wk41 integration_2020_wk42_2 integration_2020_wk45 integration_2020_wk45_2 integration_2020_wk46 integration_2020_wk46_2 integration_2020_wk47 integration_2020_wk48 integration_2020_wk48_2 integration_2020_wk49 integration_2020_wk50 integration_2020_wk50_1 integration_2020_wk51 integration_2020_wk51_2 integration_2021_wk02 integration_2021_wk02_wMR988 integration_2021_wk04 integration_2021_wk05 integration_2021_wk06 integration_2021_wk06_MR978 integration_2021_wk06_b integration_2021_wk06_c integration_2021_wk08 integration_2021_wk08_2 integration_2021_wk08_MR963 integration_2021_wk09 integration_2021_wk09_b integration_2021_wk10 integration_2021_wk10_b integration_2021_wk11 integration_2021_wk12 integration_2021_wk12_b integration_2021_wk13_a integration_2021_wk13_b integration_2021_wk13_b_fix_tdas integration_2021_wk13_b_fixed integration_2021_wk13_c integration_2021_wk14_a integration_2021_wk15_a integration_2021_wk16 integration_2021_wk17_a integration_2021_wk17_b integration_2021_wk18_a integration_2021_wk18_b integration_2021_wk19 integration_2021_wk20_a integration_2021_wk22 integration_2021_wk23 integration_2021_wk27 integration_w5GC_CBRA_test inter-RRU inter-RRU-final inter-RRU-nr inter-RRU-oairu inter-rru-UE interoperability-test isip_nr issue416_nfapicleanup itti-enhancement l2-fixes ldpc-dec-layering ldpc-decoder-codegen ldpc-decoder-codegen2 ldpc-decoder-improvements ldpc-offload ldpc_offload_t1 ldpc_short_codeword_fixes load_gnb lte-m-ue_type lte-ulsch-bugfix lte_uplink_improvement mac-fixes-wk45_2 main_python master mbms-fix-develop-nr merging-2019-w51-to-develop-nr migrate-cpp-check-container migrate-vm-pipeline-to-bionic minor-fix-doc-basic-sim modify_fairRRscd_parallel mosaic5g-oai-ran mosaic5g-oai-sim msg4_phy_0303_lfq mu_allocate multi-RRUs multiple_ssb_sib1_bugfix nasmesh_kernel_5.8 new-gtpu new_pdcp new_rlc new_rlc_2020 new_rlc_in_mbms nfapi-bugfix nfapi_nr_arch_mod nfapi_nr_develop nfapi_nr_develop_new ngap-dlul ngap-support ngap-w48-merge2 ngap-wf ngap-wf-1120 ngap-wf-1120-srb ngap-wf-1120-srb-gtp ngap-wf-1120-srb-gtp-hs ngap-wf-1120-srb-gtp-hs1 ngap-wf-1120-srb-gtp-hs2 ngap-wf-1120-srb-gtp-yhz ngap-wf-1203-yunsdr ngap-wf-liuyu ngap_lfq_1120 ngap_merge noCore nr-bsr-fix nr-coreset-bug-fix nr-dl-mimo-2layer nr-dlsch-multi-thread nr-dlsch-thread nr-dmrs-fixes nr-dual-connectivity nr-interdigital-test nr-ip-uplink-noS1 nr-mac-pdu-wireshark nr-mac-remove-ue-list nr-pdcp nr-pdcp-benchmarking nr-pdcp-improvements nr-pdcp-nea2-security nr-pdcp-nia2-integrity nr-pdcp-small-bugfixes nr-pdcp-srb-integrity nr-pdsch-extraction-bugfix nr-physim-update nr-ra-fix nr-rlc-am-bugfix-w44 nr-rlc-bugfix-w44 nr-stats-print nr-timing-measurement-merge nr-ue-buffer-status nr-uldci nrPBCHTCFix nrPbchTcFix nrUE nrUE-hs nrUE-upper-layer nr_beamforming nr_bsr nr_csi_newbranch nr_dl_dmrs_type2 nr_dl_pf nr_dl_pf2 nr_dl_ul_ptrs nr_dlsch_parallel_measurements nr_fapi_for_push_tmp nr_fdd_if_fix nr_fix_easycppcheck nr_improve_build_procedures nr_improve_chanest nr_increase_tp nr_pdcch_testing nr_polar_decoder_improvement nr_power_measurement_fixes nr_prach_fr2 nr_pucch nr_pucch2 nr_segmentation_fixes nr_tdd_configuration nr_ue_msg3 nr_ue_pdcp_fix nr_ue_tti_cleanup nr_ul_pf nr_ul_scfdma nr_vcd nrue-multi-thread nrue_msg2_reception nsa-ue nsa_remove_band_hardcodings oai-sim oai-ubuntu-docker oai-ubuntu-docker-for-lmssdr oairu oairu-dockerfile-support oc-docker-october-improvements openxg/develop pdcp-benchmark pdsch-ch-est phy-asan-fixes physim-build-deploy physim-deploy-handle-error-cases polar8 prb_based_dl_channel_estimation ptrs_rrc_config pusch-mthread-scaling-fix pusch-retrans-fix-ue ra-dl-ul recursive-cmake release_v1_2_0_candidate remove_nos1_hack_pdcp remove_x2_gnb_hardcoding repair-TA revert_memcpy rh-ci-add-ue-parallelization rh_ci_add_runtime_stats rh_ci_add_uldlharq_stats rh_ci_fix_autoterminate rh_ci_fr1_update rh_ci_gsheet_rt_monitoring rh_ci_nsa2jenkins rh_ci_nsa_test_n310 rh_ci_oc rh_ci_phy_test_improve rh_ci_py rh_ci_ra_fr2 rh_ci_rfsim_ra rh_ci_test_benetel rh_ci_test_nsa rh_ci_test_nsa_wk16 rh_ci_test_nsa_wk17_b rh_ci_test_nsa_wk17b rh_ci_test_rfsim_sa rh_ci_ue_parallel rh_doc_update_3 rh_fr1_newjenkins rh_fr1_update rh_gnb_compile_fix rh_wk50_debug rhel77-build rlc-v2-bugfix-status-reporting rlc-v2-tick rlc_v2_coverity_fixes rohan_ulsim2RxFix rrc-enb-phy-testmode ru-parallel-beamforming runel runel-reverse-test s1-subnormal_rewrite s1_subnormal s1_subnormal-robert s1ap-bugfix-rab_setup sa-demo sa-demo-hs sa-merge-rrc-srb sa-msg4 sa-msg4-rrc sa-msg4-rrc-yihz sa-msg4-rrc-yihz-hs sa_rrc_yihz sanitize-address sanitize-v1 sanitize-v1-tmp sarma_pvnp_oai scs_60_iisc signal-delay sim-channels small-bugfixes-w40 small-config-change small_nr_bugfixes smallcleanup softmodem_cleanup split73 t-gnb-tracer test-5GREC test-nsa-benetel test-panos test_nsa_gtpu_fix test_rt-fix_phy-test testing_2symb_pdcch testing_with_external_txdata tools_5Gadapt tp-ota-test trx_thread_param trx_write_thread ue-csi ue-dci-false-detection ue-fixes ue-fixes-ota ue-pdsch-pusch-parallel ue-race-fix ue-updates-runel-test ue_beam_selection ue_dlsch_decoding_ldpc_offload ue_nfapi_mch uhd_priority_set_cleanup ul-freq-iq-samps-to-file ul_dl_dci_same_slot ul_harq ulsch_decode_mthread ulsim_changes usrp_fix_adc_shift_and_pps_sync usrp_gpio_test usrp_stop_cleanly usrp_x400 wf-sa-rrc wf_testc wireshark-T-hack-ueid wireshark-log-scheduling-requests wk11-with-phytest x2-endc-processing x2_handle_sctp_shutdown x2_neighbor_6cells xiangwab xiangwan xw2 yihongzheng_srb zzs 2021.wk14_a 2021.wk13_d 2021.wk13_c 2021.w27 2021.w26 2021.w25 2021.w24 2021.w23 2021.w22 2021.w20 2021.w19 2021.w18_b 2021.w18_a 2021.w17_b 2021.w16 2021.w15 2021.w14 2021.w13_a 2021.w12 2021.w11 2021.w10 2021.w09 2021.w08 2021.w06 2021.w05 2021.w04 2021.w02 2020.w51_2 2020.w51 2020.w50 2020.w49 2020.w48_2 2020.w48 2020.w47 2020.w46_2 2020.w46 2020.w45_2 2020.w45 2020.w44 2020.w42_2 2020.w42 2020.w41 2020.w39 2020.w38 2020.w37 2020.w36 2020.w34 2020.w33 2020.w31 2020.w30 2020.w29 2020.w28 2020.w26 2020.w25 2020.w24 2020.w23 2020.w22 2020.w19 2020.w17 2020.w16 2020.w15 2020.w11 2020.w09 2020.w06 2020.w05 2020.w04 2020.w03 2019.w51 2019.w44 2019.w41 2019.w36 2019.w30 2019.w28 2019.w27 2019.w25 2019.w23 2019.w21 2019.w17 2019.w15 2019.w13 2019.w11 2019.w10 2019.w09 v1.2.2 v1.2.1 v1.2.0 v1.1.1 v1.1.0 nr-ip-over-lte-v.1.5 nr-ip-over-lte-v.1.4 nr-ip-over-lte-v.1.3 nr-ip-over-lte-v.1.2 nr-ip-over-lte-v.1.1 nr-ip-over-lte-v.1.0 develop-nr-2020w03 develop-nr-2020w02 develop-nr-2019w51 develop-nr-2019w50 develop-nr-2019w48 develop-nr-2019w47 develop-nr-2019w45 develop-nr-2019w43 develop-nr-2019w42 develop-nr-2019w40 benetel_phase_rotation benetel_gnb_rel_2.0 benetel_gnb_rel_1.0 benetel_enb_rel_2.0 benetel_enb_rel_1.0
No related merge requests found
......@@ -303,8 +303,8 @@ void log_getconfig(log_t *g_log) {
logparams_dump[i].numelt = 0;
}
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1 ,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_debug,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
config_get( logparams_dump,(sizeof(log_maskmap)/sizeof(mapping)) - 1,CONFIG_STRING_LOG_PREFIX);
config_check_unknown_cmdlineopt(CONFIG_STRING_LOG_PREFIX);
/* set the debug mask according to the debug parameters values */
......@@ -385,7 +385,6 @@ int logInit (void) {
register_log_component("OCG","",OCG);
register_log_component("PERF","",PERF);
register_log_component("OIP","",OIP);
register_log_component("CLI","",CLI);
register_log_component("MSC","log",MSC);
register_log_component("OCM","log",OCM);
register_log_component("HW","",HW);
......@@ -408,6 +407,8 @@ int logInit (void) {
register_log_component("X2AP","",X2AP);
register_log_component("LOADER","log",LOADER);
register_log_component("ASN","log",ASN);
register_log_component("NFAPI_PNF","log",NFAPI_PNF);
register_log_component("NFAPI_VNF","log",NFAPI_VNF);
for (int i=0 ; log_level_names[i].name != NULL ; i++)
g_log->level2string[i] = toupper(log_level_names[i].name[0]); // uppercased first letter of level name
......@@ -438,7 +439,7 @@ char *log_getthreadname(char *threadname, int bufsize) {
static int log_header(char *log_buffer, int buffsize, int comp, int level,const char *format) {
char threadname[PR_SET_NAME];
return snprintf(log_buffer, buffsize , "%s%s[%s]%c %s %s%s",
return snprintf(log_buffer, buffsize, "%s%s[%s]%c %s %s%s",
log_level_highlight_end[level],
( (g_log->flag & FLAG_NOCOLOR)?"":log_level_highlight_start[level]),
g_log->log_component[comp].name,
......@@ -452,11 +453,17 @@ void logRecord_mt(const char *file, const char *func, int line, int comp, int le
char log_buffer[MAX_LOG_TOTAL];
va_list args;
va_start(args, format);
log_header(log_buffer,MAX_LOG_TOTAL ,comp, level,format);
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
va_end(args);
}
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args ) {
char log_buffer[MAX_LOG_TOTAL];
log_header(log_buffer,MAX_LOG_TOTAL,comp, level,format);
g_log->log_component[comp].vprint(g_log->log_component[comp].stream,log_buffer, args);
}
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... ) {
va_list args;
char *wbuf;
......@@ -474,7 +481,7 @@ void log_dump(int component, void *buffer, int buffsize,int datatype, const char
if (wbuf != NULL) {
va_start(args, format);
int pos=log_header(wbuf,MAX_LOG_TOTAL ,component, OAILOG_INFO,"");
int pos=log_header(wbuf,MAX_LOG_TOTAL,component, OAILOG_INFO,"");
int pos2=vsprintf(wbuf+pos,format, args);
pos=pos+pos2;
va_end(args);
......
......@@ -198,7 +198,6 @@ typedef enum {
NAS,
PERF,
OIP,
CLI,
MSC,
OCM,
UDP_,
......@@ -218,6 +217,8 @@ typedef enum {
X2AP,
LOADER,
ASN,
NFAPI_VNF,
NFAPI_PNF,
MAX_LOG_PREDEF_COMPONENTS,
}
comp_name_t;
......@@ -286,6 +287,7 @@ extern "C" {
int logInit (void);
int isLogInitDone (void);
void logRecord_mt(const char *file, const char *func, int line,int comp, int level, const char *format, ...) __attribute__ ((format (printf, 6, 7)));
void vlogRecord_mt(const char *file, const char *func, int line, int comp, int level, const char *format, va_list args );
void log_dump(int component, void *buffer, int buffsize,int datatype, const char *format, ... );
int set_log(int component, int level);
void set_glog(int level);
......@@ -365,9 +367,9 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
# define LOG_D(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_DEBUG ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_DEBUG, x) ;} else { T(T_LEGACY_ ## c ## _DEBUG, T_PRINTF(x)) ;}} while (0)
# define LOG_T(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_TRACE ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_TRACE, x) ;} else { T(T_LEGACY_ ## c ## _TRACE, T_PRINTF(x)) ;}} while (0)
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
# define nfapi_log(FILE, FNC, LN, COMP, LVL, F...) do { if (T_stdout) { logRecord_mt(__FILE__, __FUNCTION__, __LINE__,COMP, LVL, F) ;}} while (0) /* */
/* bitmask dependant macros, to isolate debugging code */
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
......
......@@ -800,6 +800,47 @@ ID = LEGACY_SIM_TRACE
GROUP = ALL:LEGACY_SIM:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_INFO
DESC = NFAPI_VNF legacy logs - info level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_ERROR
DESC = NFAPI_VNF legacy logs - error level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_WARNING
DESC = NFAPI_VNF legacy logs - warning level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_DEBUG
DESC = NFAPI_VNF legacy logs - debug level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_VNF_TRACE
DESC = NFAPI_VNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_VNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_INFO
DESC = NFAPI_PNF legacy logs - info level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_ERROR
DESC = NFAPI_PNF legacy logs - error level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_WARNING
DESC = NFAPI_PNF legacy logs - warning level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_DEBUG
DESC = NFAPI_PNF legacy logs - debug level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_NFAPI_PNF_TRACE
DESC = NFAPI_PNF legacy logs - trace level
GROUP = ALL:LEGACY_NFAPI_PNF:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
# this is a bad hack but I won't fix (function util_print_hex_octets
# in openairinterface5g/openair2/LAYER2/PDCP_v10.1.0/pdcp_util.c
# does funky things with the LOG_x macros but we work on the C pre-processor
......@@ -845,27 +886,7 @@ ID = LEGACY_componentP_TRACE
GROUP = ALL:LEGACY_componentP:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
#needed?
ID = LEGACY_CLI_INFO
DESC = CLI legacy logs - info level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_INFO:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_ERROR
DESC = CLI legacy logs - error level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_ERROR:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_WARNING
DESC = CLI legacy logs - warning level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_WARNING:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_DEBUG
DESC = CLI legacy logs - debug level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_DEBUG:LEGACY
FORMAT = string,log
ID = LEGACY_CLI_TRACE
DESC = CLI legacy logs - trace level
GROUP = ALL:LEGACY_CLI:LEGACY_GROUP_TRACE:LEGACY
FORMAT = string,log
#################
#### UE LOGS ####
......
This diff is collapsed.
......@@ -606,7 +606,7 @@ void vnf_deallocate(void *ptr) {
void vnf_trace(nfapi_trace_level_t nfapi_level, const char *message, ...) {
va_list args;
va_start(args, message);
nfapi_log("FILE>", "FUNC", 999, PHY, nfapitooai_level(nfapi_level), message, args);
VLOG( NFAPI_VNF, nfapitooai_level(nfapi_level), message, args);
va_end(args);
}
......
......@@ -126,10 +126,10 @@ int netlink_init_tun(void) {
nas_dest_addr.nl_family = AF_NETLINK;
nas_dest_addr.nl_pid = 0; /* For Linux Kernel */
nas_dest_addr.nl_groups = 0; /* unicast */
// TX PART
// TX PART
nas_nlh_tx=(struct nlmsghdr *)malloc(NLMSG_SPACE(NL_MAX_PAYLOAD));
memset(nas_nlh_tx, 0, NLMSG_SPACE(NL_MAX_PAYLOAD));
/* Fill the netlink message header */
/* Fill the netlink message header */
nas_nlh_tx->nlmsg_len = NLMSG_SPACE(NL_MAX_PAYLOAD);
nas_nlh_tx->nlmsg_pid = 1;//getpid(); /* self pid */
nas_nlh_tx->nlmsg_flags = 0;
......@@ -140,13 +140,14 @@ int netlink_init_tun(void) {
nas_msg_tx.msg_namelen = sizeof(nas_dest_addr);
nas_msg_tx.msg_iov = &nas_iov_tx;
nas_msg_tx.msg_iovlen = 1;
// RX PART
// RX PART
memset(&nas_msg_rx,0,sizeof(nas_msg_rx));
nas_msg_rx.msg_name = (void *)&nas_src_addr;
nas_msg_rx.msg_namelen = sizeof(nas_src_addr);
nas_msg_rx.msg_iov = &nas_iov_rx;
nas_msg_rx.msg_iovlen = 1;
} /* for */
return 1;
}
......
......@@ -34,7 +34,7 @@
#define EMU_PROTO_H_
void init_bypass (void);
void bypass_init ( unsigned int (*tx_handlerP) (unsigned char,char*, unsigned int*, unsigned int*),unsigned int (*rx_handlerP) (unsigned char,char*,unsigned int));
void bypass_init ( unsigned int (*tx_handlerP) (unsigned char,char *, unsigned int *, unsigned int *),unsigned int (*rx_handlerP) (unsigned char,char *,unsigned int));
int bypass_rx_data(unsigned int frame, unsigned int last_slot,
unsigned int next_slot, uint8_t is_master);
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
......@@ -43,7 +43,7 @@ void bypass_tx_data (emu_transport_info_t Type, unsigned int frame, unsigned int
void emulation_tx_rx(void);
unsigned int emul_tx_handler(unsigned char Mode,char *Tx_buffer,unsigned int* Nbytes,unsigned int *Nb_flows);
unsigned int emul_tx_handler(unsigned char Mode,char *Tx_buffer,unsigned int *Nbytes,unsigned int *Nb_flows);
unsigned int emul_rx_handler(unsigned char Mode,char *rx_buffer, unsigned int Nbytes);
unsigned int emul_rx_data(void);
......
......@@ -24,7 +24,7 @@
-------------------
AUTHOR : Francois TABURET
COMPANY : NOKIA BellLabs France
EMAIL : francois.taburet@nokia-bell-labs.com
EMAIL : francois.taburet@nokia-bell-labs.com
*/
......@@ -80,8 +80,7 @@ int config_check_band_frequencies( int ind,
int16_t band,
uint32_t downlink_frequency,
int32_t uplink_frequency_offset,
uint32_t frame_type)
{
uint32_t frame_type) {
int errors = 0;
if (band > 0) {
......@@ -90,21 +89,18 @@ int config_check_band_frequencies( int ind,
for (band_index = 0; band_index < sizeof (eutra_bands) / sizeof (eutra_bands[0]); band_index++) {
if (band == eutra_bands[band_index].band) {
uint32_t uplink_frequency = downlink_frequency + uplink_frequency_offset;
AssertError (eutra_bands[band_index].dl_min < downlink_frequency, errors ++,
"enb %d downlink frequency %u too low (%u) for band %d!",
ind, downlink_frequency, eutra_bands[band_index].dl_min, band);
AssertError (downlink_frequency < eutra_bands[band_index].dl_max, errors ++,
"enb %d downlink frequency %u too high (%u) for band %d!",
ind, downlink_frequency, eutra_bands[band_index].dl_max, band);
AssertError (eutra_bands[band_index].ul_min < uplink_frequency, errors ++,
"enb %d uplink frequency %u too low (%u) for band %d!",
ind, uplink_frequency, eutra_bands[band_index].ul_min, band);
AssertError (uplink_frequency < eutra_bands[band_index].ul_max, errors ++,
"enb %d uplink frequency %u too high (%u) for band %d!",
ind, uplink_frequency, eutra_bands[band_index].ul_max, band);
AssertError (eutra_bands[band_index].frame_type == frame_type, errors ++,
"enb %d invalid frame type (%d/%d) for band %d!",
ind, eutra_bands[band_index].frame_type, frame_type, band);
......@@ -112,7 +108,6 @@ int config_check_band_frequencies( int ind,
}
}
return errors;
}
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -45,110 +45,89 @@
#include "common/ran_context.h"
extern FILL_UL_INFO_MUTEX_t fill_ul_mutex;
extern uint8_t nfapi_mode;
extern void openair_rrc_top_init_ue( int eMBMS_active, char* uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) //init as MR
{
LOG_D(MAC, "[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n",
module_idP, frameP, eNB_index);
if (first_sync == 1 && !(EPC_MODE_ENABLED)) {
//layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP, eNB_index);
} else {
rrc_in_sync_ind(module_idP, frameP, eNB_index);
}
extern void openair_rrc_top_init_ue( int eMBMS_active, char *uecap_xer, uint8_t cba_group_active, uint8_t HO_active);
void dl_phy_sync_success(module_id_t module_idP, frame_t frameP, unsigned char eNB_index, uint8_t first_sync) { //init as MR
LOG_D(MAC, "[UE %d] Frame %d: PHY Sync to eNB_index %d successful \n",
module_idP, frameP, eNB_index);
if (first_sync == 1 && !(EPC_MODE_ENABLED)) {
//layer2_init_UE(module_idP);
openair_rrc_ue_init(module_idP, eNB_index);
} else {
rrc_in_sync_ind(module_idP, frameP, eNB_index);
}
}
void
mac_UE_out_of_sync_ind(module_id_t module_idP, frame_t frameP,
uint16_t eNB_index)
{
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
uint16_t eNB_index) {
// Mac_rlc_xface->mac_out_of_sync_ind(Mod_id, frameP, eNB_index);
}
int
mac_top_init_ue(int eMBMS_active, char *uecap_xer,
uint8_t cba_group_active, uint8_t HO_active)
{
int i;
LOG_I(MAC, "[MAIN] Init function start:Nb_UE_INST=%d\n", NB_UE_INST);
if (NB_UE_INST > 0) {
UE_mac_inst =
(UE_MAC_INST *) malloc16(NB_UE_INST * sizeof(UE_MAC_INST));
AssertFatal(UE_mac_inst != NULL,
"[MAIN] Can't ALLOCATE %zu Bytes for %d UE_MAC_INST with size %zu \n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST,
sizeof(UE_MAC_INST));
LOG_D(MAC, "[MAIN] ALLOCATE %zu Bytes for %d UE_MAC_INST @ %p\n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST, UE_mac_inst);
bzero(UE_mac_inst, NB_UE_INST * sizeof(UE_MAC_INST));
for (i = 0; i < NB_UE_INST; i++) {
ue_init_mac(i);
}
} else {
UE_mac_inst = NULL;
uint8_t cba_group_active, uint8_t HO_active) {
int i;
LOG_I(MAC, "[MAIN] Init function start:Nb_UE_INST=%d\n", NB_UE_INST);
if (NB_UE_INST > 0) {
UE_mac_inst =
(UE_MAC_INST *) malloc16(NB_UE_INST * sizeof(UE_MAC_INST));
AssertFatal(UE_mac_inst != NULL,
"[MAIN] Can't ALLOCATE %zu Bytes for %d UE_MAC_INST with size %zu \n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST,
sizeof(UE_MAC_INST));
LOG_D(MAC, "[MAIN] ALLOCATE %zu Bytes for %d UE_MAC_INST @ %p\n",
NB_UE_INST * sizeof(UE_MAC_INST), NB_UE_INST, UE_mac_inst);
bzero(UE_mac_inst, NB_UE_INST * sizeof(UE_MAC_INST));
for (i = 0; i < NB_UE_INST; i++) {
ue_init_mac(i);
}
// mutex below are used for multiple UE's L2 FAPI simulation.
if (nfapi_mode == 3){
pthread_mutex_init(&fill_ul_mutex.rx_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.crc_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.harq_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.cqi_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.rach_mutex,NULL);
}
LOG_I(MAC, "[MAIN] calling RRC\n");
openair_rrc_top_init_ue(eMBMS_active, uecap_xer, cba_group_active,
HO_active);
LOG_I(MAC, "[MAIN][INIT] Init function finished\n");
return (0);
} else {
UE_mac_inst = NULL;
}
// mutex below are used for multiple UE's L2 FAPI simulation.
if (nfapi_mode == 3) {
pthread_mutex_init(&fill_ul_mutex.rx_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.crc_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.sr_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.harq_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.cqi_mutex,NULL);
pthread_mutex_init(&fill_ul_mutex.rach_mutex,NULL);
}
LOG_I(MAC, "[MAIN] calling RRC\n");
openair_rrc_top_init_ue(eMBMS_active, uecap_xer, cba_group_active,
HO_active);
LOG_I(MAC, "[MAIN][INIT] Init function finished\n");
return (0);
}
int rlcmac_init_global_param_ue(void)
{
LOG_I(MAC, "[MAIN] CALLING RLC_MODULE_INIT...\n");
if (rlc_module_init() != 0) {
return (-1);
}
pdcp_layer_init();
int rlcmac_init_global_param_ue(void) {
LOG_I(MAC, "[MAIN] CALLING RLC_MODULE_INIT...\n");
LOG_I(MAC, "[MAIN] Init Global Param Done\n");
if (rlc_module_init() != 0) {
return (-1);
}
return 0;
pdcp_layer_init();
LOG_I(MAC, "[MAIN] Init Global Param Done\n");
return 0;
}
int
l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
uint8_t HO_active)
{
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
// NB_NODE=2;
// NB_INST=2;
rlcmac_init_global_param_ue();
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
mac_top_init_ue(eMBMS_active, uecap_xer, cba_group_active, HO_active);
return (1);
uint8_t HO_active) {
LOG_I(MAC, "[MAIN] MAC_INIT_GLOBAL_PARAM IN...\n");
// NB_NODE=2;
// NB_INST=2;
rlcmac_init_global_param_ue();
LOG_I(MAC, "[MAIN] init UE MAC functions \n");
mac_top_init_ue(eMBMS_active, uecap_xer, cba_group_active, HO_active);
return (1);
}
......@@ -179,13 +179,14 @@ boolean_t pdcp_data_req(
if (pdcp_pdu_p != NULL) {
memcpy(&pdcp_pdu_p->data[0], sdu_buffer_pP, sdu_buffer_sizeP);
if( LOG_DEBUGFLAG(DEBUG_PDCP) ) {
rlc_util_print_hex_octets(PDCP,
(unsigned char *)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP);
LOG_UI(PDCP, "Before rlc_data_req 1, srb_flagP: %d, rb_idP: %d \n", srb_flagP, rb_idP);
}
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p
,NULL, NULL
);
......@@ -336,10 +337,10 @@ boolean_t pdcp_data_req(
}
LOG_E(PDCP, "[FRAME %5u][%s][PDCP][MOD %u][RB %u] PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->module_id,
rb_idP);
ctxt_pP->frame,
(ctxt_pP->enb_flag) ? "eNB" : "UE",
ctxt_pP->module_id,
rb_idP);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ,VCD_FUNCTION_OUT);
return FALSE;
}
......@@ -442,7 +443,6 @@ pdcp_data_ind(
uint8_t oo_flag=0;
MessageDef *message_p = NULL;
uint8_t *gtpu_buffer_p = NULL;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_IND,VCD_FUNCTION_IN);
LOG_DUMPMSG(PDCP,DEBUG_PDCP,(char *)sdu_buffer_pP->data,sdu_buffer_sizeP,
"[MSG] PDCP UL %s PDU on rb_id %d\n", (srb_flagP)? "CONTROL" : "DATA", rb_idP);
......@@ -473,7 +473,7 @@ pdcp_data_ind(
LOG_D(PDCP, "Data indication notification for PDCP entity from UE %x to eNB %u "
"and radio bearer ID %d rlc sdu size %d ctxt_pP->enb_flag %d\n",
ctxt_pP->rnti,
ctxt_pP->module_id ,
ctxt_pP->module_id,
rb_idP,
sdu_buffer_sizeP,
ctxt_pP->enb_flag);
......@@ -701,29 +701,28 @@ pdcp_data_ind(
if (LINK_ENB_PDCP_TO_GTPV1U) {
if ((TRUE == ctxt_pP->enb_flag) && (FALSE == srb_flagP)) {
MSC_LOG_TX_MESSAGE(
MSC_PDCP_ENB,
MSC_GTPU_ENB,
NULL,0,
"0 GTPV1U_ENB_TUNNEL_DATA_REQ ue %x rab %u len %u",
ctxt_pP->rnti,
rb_id + 4,
sdu_buffer_sizeP - payload_offset);
MSC_PDCP_ENB,
MSC_GTPU_ENB,
NULL,0,
"0 GTPV1U_ENB_TUNNEL_DATA_REQ ue %x rab %u len %u",
ctxt_pP->rnti,
rb_id + 4,
sdu_buffer_sizeP - payload_offset);
//LOG_T(PDCP,"Sending to GTPV1U %d bytes\n", sdu_buffer_sizeP - payload_offset);
gtpu_buffer_p = itti_malloc(TASK_PDCP_ENB, TASK_GTPV1_U,
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX);
sdu_buffer_sizeP - payload_offset + GTPU_HEADER_OVERHEAD_MAX);
AssertFatal(gtpu_buffer_p != NULL, "OUT OF MEMORY");
memcpy(&gtpu_buffer_p[GTPU_HEADER_OVERHEAD_MAX], &sdu_buffer_pP->data[payload_offset], sdu_buffer_sizeP - payload_offset);
message_p = itti_alloc_new_message(TASK_PDCP_ENB, GTPV1U_ENB_TUNNEL_DATA_REQ);
AssertFatal(message_p != NULL, "OUT OF MEMORY");
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer = gtpu_buffer_p;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).length = sdu_buffer_sizeP - payload_offset;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset = GTPU_HEADER_OVERHEAD_MAX;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ctxt_pP->rnti;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).buffer = gtpu_buffer_p;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).length = sdu_buffer_sizeP - payload_offset;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).offset = GTPU_HEADER_OVERHEAD_MAX;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rnti = ctxt_pP->rnti;
GTPV1U_ENB_TUNNEL_DATA_REQ(message_p).rab_id = rb_id + 4;
itti_send_msg_to_task(TASK_GTPV1_U, INSTANCE_DEFAULT, message_p);
packet_forwarded = TRUE;
}
} else {
packet_forwarded = FALSE;
}
......@@ -762,23 +761,26 @@ pdcp_data_ind(
// set ((pdcp_data_ind_header_t *) new_sdu_p->data)->inst for IP layer here
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
((pdcp_data_ind_header_t *) new_sdu_p->data)->rb_id = rb_id;
if (EPC_MODE_ENABLED) {
/* for the UE compiled in S1 mode, we need 1 here
* for the UE compiled in noS1 mode, we need 0
* TODO: be sure of this
*/
/* for the UE compiled in S1 mode, we need 1 here
* for the UE compiled in noS1 mode, we need 0
* TODO: be sure of this
*/
if (nfapi_mode == 3) {
#ifdef UESIM_EXPANSION
if (UE_NAS_USE_TUN) {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 0;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 0;
}
#else
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = ctxt_pP->module_id;
#endif
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 1;
((pdcp_data_ind_header_t *) new_sdu_p->data)->inst = 1;
}
}
} else {
......@@ -822,12 +824,13 @@ pdcp_data_ind(
Pdcp_stats_rx_bytes_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(sdu_buffer_sizeP - payload_offset);
Pdcp_stats_rx_sn[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=sequence_number;
if (oo_flag == 1 ){
if (oo_flag == 1 ) {
Pdcp_stats_rx_outoforder[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]++;
} else {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" PDCP_DATA_IND SDU DROPPED, OUT OF ORDER \n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
}
Pdcp_stats_rx_aiat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+= (pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_aiat_tmp_w[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]+=(pdcp_enb[ctxt_pP->module_id].sfn - Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]);
Pdcp_stats_rx_iat[ctxt_pP->module_id][pdcp_uid][rb_idP+rb_offset]=pdcp_enb[ctxt_pP->module_id].sfn;
......@@ -1129,7 +1132,6 @@ rrc_pdcp_config_asn1_req (
int i,j;
LTE_MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
LTE_MBMS_SessionInfo_r9_t *MBMS_SessionInfo_p = NULL;
LOG_T(PDCP, PROTOCOL_CTXT_FMT" %s() SRB2ADD %p DRB2ADD %p DRB2RELEASE %p\n",
PROTOCOL_CTXT_ARGS(ctxt_pP),
__FUNCTION__,
......@@ -1419,7 +1421,6 @@ rrc_pdcp_config_asn1_req (
}
}
if (pmch_InfoList_r9_pP != NULL) {
for (i=0; i<pmch_InfoList_r9_pP->list.count; i++) {
mbms_SessionInfoList_r9_p = &(pmch_InfoList_r9_pP->list.array[i]->mbms_SessionInfoList_r9);
......@@ -1893,6 +1894,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
netlink_init();
}
}
return pdcp_params.optmask ;
}
......@@ -1937,7 +1939,6 @@ void pdcp_layer_init(void)
int i,j;
mbms_session_id_t session_id;
mbms_service_id_t service_id;
/*
* Initialize SDU list
*/
......@@ -1946,7 +1947,6 @@ void pdcp_layer_init(void)
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
for (service_id = 0; service_id < LTE_maxServiceCount; service_id++) {
for (session_id = 0; session_id < LTE_maxSessionPerPMCH; session_id++) {
memset(&pdcp_mbms_array_ue[instance][service_id][session_id], 0, sizeof(pdcp_mbms_t));
......
This diff is collapsed.
This diff is collapsed.
......@@ -43,7 +43,7 @@
/* Bugfix for version of GCC = 4.4.3 (Ubuntu 10.04) */
#if GCC_VERSION <= 40403
# include <sys/socket.h>
#include <sys/socket.h>
#endif
#include <linux/netlink.h>
......@@ -93,13 +93,11 @@ pdcp_netlink_init(
)
//-----------------------------------------------------------------------------
{
int i;
int nb_inst_enb;
int nb_inst_ue;
pthread_attr_t attr;
struct sched_param sched_param;
reset_meas(&ip_pdcp_stats_tmp);
nb_inst_enb = 1;
nb_inst_ue = 1;
......@@ -108,8 +106,8 @@ pdcp_netlink_init(
nb_inst_enb = 0;
LOG_I(PDCP, "[NETLINK] Creating 0 queues for eNB Netlink -> PDCP communication\n");
} else {
/* #warning " LG: When there will be handover in, there will problems because dim is based on local nums of ues" */
pdcp_netlink_queue_enb = calloc(nb_inst_enb, sizeof(struct lfds611_queue_state*));
/* #warning " LG: When there will be handover in, there will problems because dim is based on local nums of ues" */
pdcp_netlink_queue_enb = calloc(nb_inst_enb, sizeof(struct lfds611_queue_state *));
pdcp_netlink_nb_element_enb = malloc(nb_inst_enb * sizeof(uint32_t));
LOG_I(PDCP, "[NETLINK] Creating %d queues for eNB Netlink -> PDCP communication\n", nb_inst_enb);
......@@ -123,11 +121,9 @@ pdcp_netlink_init(
}
}
if (nb_inst_ue > 0) {
pdcp_netlink_queue_ue = calloc(nb_inst_ue, sizeof(struct lfds611_queue_state*));
pdcp_netlink_queue_ue = calloc(nb_inst_ue, sizeof(struct lfds611_queue_state *));
pdcp_netlink_nb_element_ue = malloc(nb_inst_ue * sizeof(uint32_t));
LOG_I(PDCP, "[NETLINK] Creating %d queues for UE Netlink -> PDCP communication\n", nb_inst_ue);
for (i = 0; i < nb_inst_ue; i++) {
......@@ -148,7 +144,6 @@ pdcp_netlink_init(
}
sched_param.sched_priority = 10;
pthread_attr_setschedpolicy(&attr, SCHED_RR);
pthread_attr_setschedparam(&attr, &sched_param);
......@@ -171,21 +166,21 @@ pdcp_netlink_init(
//-----------------------------------------------------------------------------
int
pdcp_netlink_dequeue_element(
const protocol_ctxt_t* const ctxt_pP,
struct pdcp_netlink_element_s** data_ppP
const protocol_ctxt_t *const ctxt_pP,
struct pdcp_netlink_element_s **data_ppP
)
//-----------------------------------------------------------------------------
{
int ret = 0;
if (ctxt_pP->enb_flag) {
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[ctxt_pP->module_id], (void**)data_ppP);
ret = lfds611_queue_dequeue(pdcp_netlink_queue_enb[ctxt_pP->module_id], (void **)data_ppP);
if (ret != 0) {
LOG_D(PDCP,"[NETLINK]De-queueing packet for eNB instance %d\n", ctxt_pP->module_id);
}
} else {
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ctxt_pP->module_id], (void**)data_ppP);
ret = lfds611_queue_dequeue(pdcp_netlink_queue_ue[ctxt_pP->module_id], (void **)data_ppP);
if (ret != 0) {
LOG_D(PDCP, "[NETLINK]De-queueing packet for UE instance %d\n", ctxt_pP->module_id);
......@@ -209,8 +204,8 @@ void *pdcp_netlink_thread_fct(void *arg)
memset(nl_rx_buf, 0, NL_MAX_PAYLOAD);
LOG_I(PDCP, "[NETLINK_THREAD] binding to fd %d\n",nas_sock_fd);
MSC_START_USE();
while (1) {
while (1) {
len = recvmsg(nas_sock_fd, &nas_msg_rx, 0);
if (len == 0) {
......@@ -267,7 +262,6 @@ void *pdcp_netlink_thread_fct(void *arg)
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for eNB module id %d\n", module_id);
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_enb[module_id], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
......@@ -280,7 +274,6 @@ void *pdcp_netlink_thread_fct(void *arg)
}
LOG_I(PDCP,"[NETLINK_THREAD] IP->PDCP : En-queueing packet for UE module id %d\n", module_id);
/* Enqueue the element in the right queue */
lfds611_queue_guaranteed_enqueue(pdcp_netlink_queue_ue[module_id], new_data_p);
stop_meas(&ip_pdcp_stats_tmp);
......
......@@ -375,7 +375,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
//DevCheck(sdu_sizeP > 0, sdu_sizeP, 0, 0);
if(sdu_sizeP <= 0) {
LOG_E(RLC, "sdu_sizeP %d, file %s, line %d\n", sdu_sizeP, __FILE__ ,__LINE__);
LOG_E(RLC, "sdu_sizeP %d, file %s, line %d\n", sdu_sizeP, __FILE__,__LINE__);
return RLC_OP_STATUS_BAD_PARAMETER;
}
......@@ -564,8 +564,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t *const ctxt_pP,
}
#else
}
else { /* MBMS_flag != 0 */
} else { /* MBMS_flag != 0 */
free_mem_block(sdu_pP, __func__);
LOG_E(RLC, "MBMS_flag != 0 while Rel10/Rel14 is not defined...\n");
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : parameter module_id out of bounds :%d\n", __FILE__, __LINE__, module_idP);
......@@ -616,7 +615,7 @@ void rlc_data_conf (const protocol_ctxt_t *const ctxt_pP,
//-----------------------------------------------------------------------------
if (srb_flagP) {
if (rlc_rrc_data_conf != NULL) {
rlc_rrc_data_conf (ctxt_pP, rb_idP , muiP, statusP);
rlc_rrc_data_conf (ctxt_pP, rb_idP, muiP, statusP);
}
}
}
......@@ -651,12 +650,12 @@ rlc_module_init (void) {
}
for (k=0; k < RLC_MAX_MBMS_LC; k++) {
rlc_mbms_lcid2service_session_id_eNB[0][k].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[0][k].session_id = 0;
rlc_mbms_lcid2service_session_id_eNB[0][k].service_id = 0;
rlc_mbms_lcid2service_session_id_eNB[0][k].session_id = 0;
}
for (k=0; k < NB_RB_MBMS_MAX; k++) {
rlc_mbms_rbid2lcid_eNB[0][k] = RLC_LC_UNALLOCATED;
rlc_mbms_rbid2lcid_eNB[0][k] = RLC_LC_UNALLOCATED;
}
pool_buffer_init();
......
......@@ -68,7 +68,7 @@
#if ENABLE_RAL
# include "collection/hashtable/obj_hashtable.h"
#include "collection/hashtable/obj_hashtable.h"
#endif
......@@ -92,12 +92,12 @@ typedef struct uid_linear_allocator_NB_IoT_s {
//left as they are --> used in LAYER2/epenair2_proc.c and UE side
typedef enum UE_STATE_NB_IoT_e {
RRC_INACTIVE_NB_IoT=0,
RRC_IDLE_NB_IoT,
RRC_SI_RECEIVED_NB_IoT,
RRC_CONNECTED_NB_IoT,
RRC_RECONFIGURED_NB_IoT,
RRC_HO_EXECUTION_NB_IoT //maybe not needed?
RRC_INACTIVE_NB_IoT=0,
RRC_IDLE_NB_IoT,
RRC_SI_RECEIVED_NB_IoT,
RRC_CONNECTED_NB_IoT,
RRC_RECONFIGURED_NB_IoT,
RRC_HO_EXECUTION_NB_IoT //maybe not needed?
} UE_STATE_NB_IoT_t;
......@@ -238,20 +238,20 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
*
* SRB_configList --> is used for the actual list of SRBs that is managed/that should be send over the RRC message
* SRB_configList2--> refers to all the SRBs configured for that specific transaction identifier
* this because in a single transaction one or more SRBs could be established
* and you want to keep memory on what happen for every transaction
* this because in a single transaction one or more SRBs could be established
* and you want to keep memory on what happen for every transaction
* Transaction ID (xid): is used to associate the proper RRC....Complete message received by the UE to the corresponding
* message previously sent by the eNB (e.g. RRCConnectionSetup -- RRCConnectionSetupComplete)
* this because it could happen that more messages are transmitted at the same time
* message previously sent by the eNB (e.g. RRCConnectionSetup -- RRCConnectionSetupComplete)
* this because it could happen that more messages are transmitted at the same time
*/
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList;//for SRB1 and SRB1bis
LTE_SRB_ToAddModList_NB_r13_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList; //for all the DRBs
LTE_DRB_ToAddModList_NB_r13_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
LTE_SRB_ToAddModList_NB_r13_t *SRB_configList;//for SRB1 and SRB1bis
LTE_SRB_ToAddModList_NB_r13_t *SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
LTE_DRB_ToAddModList_NB_r13_t *DRB_configList; //for all the DRBs
LTE_DRB_ToAddModList_NB_r13_t *DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER]; //for the configured DRBs of a xid
uint8_t DRB_active[2];//in LTE was 8 --> at most 2 for NB-IoT
struct LTE_PhysicalConfigDedicated_NB_r13* physicalConfigDedicated_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t* mac_MainConfig_NB_IoT;
struct LTE_PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated_NB_IoT;
LTE_MAC_MainConfig_NB_r13_t *mac_MainConfig_NB_IoT;
//No SPS(semi-persistent scheduling) in NB-IoT
//No Measurement report in NB-IoT
......@@ -303,7 +303,7 @@ typedef struct eNB_RRC_UE_NB_IoT_s {
transport_layer_addr_t enb_gtp_addrs[S1AP_MAX_E_RAB];
rb_id_t enb_gtp_ebi[S1AP_MAX_E_RAB];
//Which timers are referring to?
//Which timers are referring to?
uint32_t ul_failure_timer;
uint32_t ue_release_timer;
//threshold of the release timer--> set in RRCConnectionRelease
......@@ -340,13 +340,13 @@ typedef struct rrc_eNB_ue_context_NB_IoT_s {
typedef struct {
// buffer that contains the encoded messages
uint8_t *MIB_NB_IoT;
uint8_t sizeof_MIB_NB_IoT;
uint8_t *MIB_NB_IoT;
uint8_t sizeof_MIB_NB_IoT;
uint8_t *SIB1_NB_IoT;
uint8_t sizeof_SIB1_NB_IoT;
uint8_t *SIB23_NB_IoT;
uint8_t sizeof_SIB23_NB_IoT;
uint8_t *SIB23_NB_IoT;
uint8_t sizeof_SIB23_NB_IoT;
//not actually implemented in OAI
......@@ -360,18 +360,18 @@ typedef struct {
uint8_t sizeof_SIB16_NB_IoT;
//TS 36.331 V14.2.1
// uint8_t *SIB15_NB;
// uint8_t sizeof_SIB15_NB;
// uint8_t *SIB20_NB;
// uint8_t sizeof_SIB20_NB;
// uint8_t *SIB22_NB;
// uint8_t sizeof_SIB22_NB;
// uint8_t *SIB15_NB;
// uint8_t sizeof_SIB15_NB;
// uint8_t *SIB20_NB;
// uint8_t sizeof_SIB20_NB;
// uint8_t *SIB22_NB;
// uint8_t sizeof_SIB22_NB;
//implicit parameters needed
int Ncp; //cyclic prefix for DL
int Ncp_UL; //cyclic prefix for UL
int Ncp_UL; //cyclic prefix for UL
int p_eNB; //number of tx antenna port
int p_rx_eNB; //number of receiving antenna ports
int p_rx_eNB; //number of receiving antenna ports
uint32_t dl_CarrierFreq; //detected by the UE
uint32_t ul_CarrierFreq; //detected by the UE
uint16_t physCellId; //not stored in the MIB-NB but is getting through NPSS/NSSS
......@@ -381,12 +381,12 @@ typedef struct {
LTE_BCCH_DL_SCH_Message_NB_t siblock1_NB_IoT; //SIB1-NB
LTE_BCCH_DL_SCH_Message_NB_t systemInformation_NB_IoT; //SI
LTE_SystemInformationBlockType1_NB_t *sib1_NB_IoT;
LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
LTE_SystemInformationBlockType1_NB_t *sib1_NB_IoT;
LTE_SystemInformationBlockType2_NB_r13_t *sib2_NB_IoT;
LTE_SystemInformationBlockType3_NB_r13_t *sib3_NB_IoT;
//not implemented yet
LTE_SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
LTE_SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
LTE_SystemInformationBlockType4_NB_r13_t *sib4_NB_IoT;
LTE_SystemInformationBlockType5_NB_r13_t *sib5_NB_IoT;
LTE_SystemInformationBlockType14_NB_r13_t *sib14_NB_IoT;
LTE_SystemInformationBlockType16_NB_r13_t *sib16_NB_IoT;
......@@ -402,9 +402,9 @@ typedef struct {
SystemInformationBlockType20_NB_r14_t *sib20;
SystemInformationBlockType22_NB_r14_t *sib22;
uint8_t SCPTM_flag;
uint8_t sizeof_SC_MCHH_MESS[];
SC_MCCH_Message_NB_t scptm;*/
uint8_t SCPTM_flag;
uint8_t sizeof_SC_MCHH_MESS[];
SC_MCCH_Message_NB_t scptm;*/
} rrc_eNB_carrier_data_NB_IoT_t;
......@@ -451,9 +451,9 @@ typedef struct eNB_RRC_INST_NB_IoT_s {
//not needed for the moment
typedef struct OAI_UECapability_NB_IoT_s {
uint8_t sdu[MAX_UE_CAPABILITY_SIZE_NB_IoT];
uint8_t sdu_size;
////NB-IoT------
uint8_t sdu[MAX_UE_CAPABILITY_SIZE_NB_IoT];
uint8_t sdu_size;
////NB-IoT------
LTE_UE_Capability_NB_r13_t UE_Capability_NB_IoT; //replace the UE_EUTRA_Capability of LTE
} OAI_UECapability_NB_IoT_t;
......@@ -472,7 +472,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
uint8_t UECapability_size;
UE_RRC_INFO_NB_IoT Info[NB_SIG_CNX_UE];
SRB_INFO_NB_IoT Srb0[NB_SIG_CNX_UE];
SRB_INFO_TABLE_ENTRY_NB_IoT Srb1[NB_CNX_UE];
SRB_INFO_TABLE_ENTRY_NB_IoT Srb2[NB_CNX_UE];
......@@ -499,7 +499,7 @@ typedef struct UE_RRC_INST_NB_IoT_s {
SystemInformationBlockType10_t *sib10[NB_CNX_UE];
SystemInformationBlockType11_t *sib11[NB_CNX_UE];
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
uint8_t MBMS_flag;
uint8_t *MCCH_MESSAGE[NB_CNX_UE];
uint8_t sizeof_MCCH_MESSAGE[NB_CNX_UE];
......@@ -507,11 +507,11 @@ typedef struct UE_RRC_INST_NB_IoT_s {
MBSFNAreaConfiguration_r9_t *mcch_message[NB_CNX_UE];
SystemInformationBlockType12_r9_t *sib12[NB_CNX_UE];
SystemInformationBlockType13_r9_t *sib13[NB_CNX_UE];
#endif
#ifdef CBA
#endif
#ifdef CBA
uint8_t num_active_cba_groups;
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
#endif
#endif
uint8_t num_srb;
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
......@@ -537,14 +537,14 @@ typedef struct UE_RRC_INST_NB_IoT_s {
float rsrq_db[7];
float rsrp_db_filtered[7];
float rsrq_db_filtered[7];
#if ENABLE_RAL
#if ENABLE_RAL
obj_hash_table_t *ral_meas_thresholds;
ral_transaction_id_t scan_transaction_id;
#endif
#if defined(ENABLE_SECURITY)
#endif
#if defined(ENABLE_SECURITY)
// KeNB as computed from parameters within USIM card //
uint8_t kenb[32];
#endif
#endif
// Used integrity/ciphering algorithms //
CipheringAlgorithm_r12_t ciphering_algorithm;
......
......@@ -179,7 +179,6 @@ static int rrc_set_state (module_id_t ue_mod_idP, Rrc_State_t state) {
//-----------------------------------------------------------------------------
static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState ) {
if (EPC_MODE_ENABLED) {
switch (UE_rrc_inst[ue_mod_idP].RrcState) {
case RRC_STATE_INACTIVE:
......@@ -197,8 +196,7 @@ static int rrc_set_sub_state( module_id_t ue_mod_idP, Rrc_Sub_State_t subState )
"Invalid sub state %d for state %d!\n", subState, UE_rrc_inst[ue_mod_idP].RrcState);
break;
}
}
}
if (UE_rrc_inst[ue_mod_idP].RrcSubState != subState) {
UE_rrc_inst[ue_mod_idP].RrcSubState = subState;
......@@ -595,17 +593,14 @@ static void rrc_ue_generate_RRCConnectionSetupComplete( const protocol_ctxt_t *c
const char *nas_msg;
int nas_msg_length;
if (EPC_MODE_ENABLED) {
nas_msg = (char *) UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.data;
nas_msg_length = UE_rrc_inst[ctxt_pP->module_id].initialNasMsg.length;
} else {
nas_msg = nas_attach_req_imsi;
nas_msg_length = sizeof(nas_attach_req_imsi);
}
size = do_RRCConnectionSetupComplete(ctxt_pP->module_id, buffer, Transaction_id, nas_msg_length, nas_msg);
LOG_I(RRC,"[UE %d][RAPROC] Frame %d : Logical Channel UL-DCCH (SRB1), Generating RRCConnectionSetupComplete (bytes%d, eNB %d)\n",
ctxt_pP->module_id,ctxt_pP->frame, size, eNB_index);
......@@ -810,6 +805,7 @@ rrc_ue_establish_drb(
(void)ip_addr_offset4;
LOG_I(RRC,"[UE %d] Frame %d: processing RRCConnectionReconfiguration: reconfiguring DRB %ld/LCID %d\n",
ue_mod_idP, frameP, DRB_config->drb_Identity, (int)*DRB_config->logicalChannelIdentity);
/*
rrc_pdcp_config_req (ue_mod_idP+NB_eNB_INST, frameP, 0, CONFIG_ACTION_ADD,
(eNB_index * NB_RB_MAX) + *DRB_config->logicalChannelIdentity, UNDEF_SECURITY_MODE);
......@@ -845,6 +841,7 @@ rrc_ue_establish_drb(
# endif
}
return(0);
}
......@@ -1908,7 +1905,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
}
*/
/* Check if there is dedicated NAS information to forward to NAS */
if (rrcConnectionReconfiguration_r8->dedicatedInfoNASList != NULL) {
int list_count;
......@@ -1972,7 +1968,6 @@ rrc_ue_process_rrcConnectionReconfiguration(
itti_send_msg_to_task (TASK_RAL_UE, ctxt_pP->instance, message_ral_p);
}
#endif
} // c1 present
} // critical extensions present
}
......@@ -2241,7 +2236,6 @@ rrc_ue_decode_dcch(
UE_rrc_inst[ctxt_pP->module_id].Info[target_eNB_index].State = RRC_RECONFIGURED;
LOG_I(RRC, "[UE %d] State = RRC_RECONFIGURED during HO (eNB %d)\n",
ctxt_pP->module_id, target_eNB_index);
#if ENABLE_RAL
{
MessageDef *message_ral_p = NULL;
......@@ -2286,7 +2280,6 @@ rrc_ue_decode_dcch(
LOG_I(RRC, "Sending RRC_RAL_CONNECTION_RECONFIGURATION_HO_IND to mRAL\n");
itti_send_msg_to_task (TASK_RAL_UE, ctxt_pP->instance, message_ral_p);
}
#endif
} else {
rrc_ue_generate_RRCConnectionReconfigurationComplete(
......@@ -3497,8 +3490,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
#endif
LOG_D( RRC, "[UE] (*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count %d\n",
(*si)->criticalExtensions.choice.systemInformation_r8.sib_TypeAndInfo.list.count );
}
else {
} else {
LOG_D( RRC, "[UE] Unknown criticalExtension version (not Rel8)\n" );
return -1;
}
......@@ -3559,9 +3551,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
#endif
if (EPC_MODE_ENABLED) {
rrc_ue_generate_RRCConnectionRequest( ctxt_pP, eNB_index );
}
}
if (UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].State == RRC_IDLE) {
LOG_I( RRC, "[UE %d] Received SIB1/SIB2/SIB3 Switching to RRC_SI_RECEIVED\n", ctxt_pP->module_id );
......@@ -3825,7 +3815,7 @@ int decode_SI( const protocol_ctxt_t *const ctxt_pP, const uint8_t eNB_index ) {
sib1->schedulingInfoList.list.count);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI , VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_UE_DECODE_SI, VCD_FUNCTION_OUT);
return 0;
}
......@@ -4093,7 +4083,7 @@ uint8_t check_trigger_meas_event(
uint8_t eNB_offset;
// uint8_t currentCellIndex = frame_parms->Nid_cell;
uint8_t tmp_offset;
LOG_I(RRC,"[UE %d] ofn(%ld) ocn(%ld) hys(%ld) ofs(%ld) ocs(%ld) a3_offset(%ld) ttt(%ld) rssi %3.1f\n",
LOG_D(RRC,"[UE %d] ofn(%ld) ocn(%ld) hys(%ld) ofs(%ld) ocs(%ld) a3_offset(%ld) ttt(%ld) rssi %3.1f\n",
ue_mod_idP,
ofn,ocn,hys,ofs,ocs,a3_offset,ttt,
10*log10(get_RSSI(ue_mod_idP,0))-get_rx_total_gain_dB(ue_mod_idP,0));
......@@ -5024,7 +5014,7 @@ rrc_control_socket_init() {
// error("ERROR: Failed on opening socket");
optval = 1;
setsockopt(ctrl_sock_fd, SOL_SOCKET, SO_REUSEADDR,
(const void *)&optval , sizeof(int));
(const void *)&optval, sizeof(int));
//build the server's address
bzero((char *) &rrc_ctrl_socket_addr, sizeof(rrc_ctrl_socket_addr));
rrc_ctrl_socket_addr.sin_family = AF_INET;
......
This diff is collapsed.
......@@ -41,20 +41,18 @@ extern RAN_CONTEXT_t RC;
int
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t* const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP,
const protocol_ctxt_t *const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
uint8_t *inde_list
)
{
) {
rnti_t rnti;
int i;
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
struct rrc_eNB_ue_context_s *ue_context_p = NULL;
if (create_tunnel_resp_pP) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RX CREATE_TUNNEL_RESP num tunnels %u \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
create_tunnel_resp_pP->num_tunnels);
rnti = create_tunnel_resp_pP->rnti;
ue_context_p = rrc_eNB_get_ue_context(
RC.rrc[ctxt_pP->module_id],
......@@ -64,26 +62,26 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]] = create_tunnel_resp_pP->enb_S1u_teid[i];
ue_context_p->ue_context.enb_gtp_addrs[inde_list[i]] = create_tunnel_resp_pP->enb_addr;
ue_context_p->ue_context.enb_gtp_ebi[inde_list[i]] = create_tunnel_resp_pP->eps_bearer_id[i];
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, msg index %u, id %u, gtp addr len %d \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
create_tunnel_resp_pP->enb_S1u_teid[i],
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]],
ue_context_p->ue_context.enb_gtp_teid[inde_list[i]],
inde_list[i],
i,
i,
create_tunnel_resp_pP->eps_bearer_id[i],
create_tunnel_resp_pP->enb_addr.length);
create_tunnel_resp_pP->enb_addr.length);
}
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_GTPU_ENB,
NULL,0,
MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
0,0,rnti,
create_tunnel_resp_pP->num_tunnels,
ue_context_p->ue_context.enb_gtp_ebi[0],
ue_context_p->ue_context.enb_gtp_teid[0]);
(void)rnti; /* avoid gcc warning "set but not used" */
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
MSC_GTPU_ENB,
NULL,0,
MSC_AS_TIME_FMT" CREATE_TUNNEL_RESP RNTI %"PRIx16" ntuns %u ebid %u enb-s1u teid %u",
0,0,rnti,
create_tunnel_resp_pP->num_tunnels,
ue_context_p->ue_context.enb_gtp_ebi[0],
ue_context_p->ue_context.enb_gtp_teid[0]);
(void)rnti; /* avoid gcc warning "set but not used" */
return 0;
} else {
return -1;
......
......@@ -38,8 +38,8 @@
*\return 0 when successful, -1 if the UE index can not be retrieved. */
int
rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
const protocol_ctxt_t* const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t * const create_tunnel_resp_pP,
const protocol_ctxt_t *const ctxt_pP,
const gtpv1u_enb_create_tunnel_resp_t *const create_tunnel_resp_pP,
uint8_t *inde_list
);
......
This diff is collapsed.
......@@ -49,38 +49,38 @@ typedef struct rrc_ue_s1ap_ids_s {
int
rrc_eNB_S1AP_compare_ue_ids(
struct rrc_ue_s1ap_ids_s* c1_pP,
struct rrc_ue_s1ap_ids_s* c2_pP
struct rrc_ue_s1ap_ids_s *c1_pP,
struct rrc_ue_s1ap_ids_s *c2_pP
);
struct rrc_rnti_tree_s;
RB_PROTOTYPE(rrc_rnti_tree_s, rrc_ue_s1ap_ids_s, entries, rrc_eNB_S1AP_compare_ue_ids);
struct rrc_ue_s1ap_ids_s*
struct rrc_ue_s1ap_ids_s *
rrc_eNB_S1AP_get_ue_ids(
eNB_RRC_INST* const rrc_instance_pP,
eNB_RRC_INST *const rrc_instance_pP,
const uint16_t ue_initial_id,
const uint32_t eNB_ue_s1ap_id
);
void
rrc_eNB_S1AP_remove_ue_ids(
eNB_RRC_INST* const rrc_instance_pP,
struct rrc_ue_s1ap_ids_s* const ue_ids_pP
eNB_RRC_INST *const rrc_instance_pP,
struct rrc_ue_s1ap_ids_s *const ue_ids_pP
);
void
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
const uint8_t ho_state
);
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t ho_state
);
int
rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
const uint8_t ho_state
);
rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t ho_state
);
/*! \fn void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t mod_id, uint8_t ue_index)
*\brief create a S1AP_INITIAL_CONTEXT_SETUP_RESP for S1AP.
......@@ -89,8 +89,8 @@ rrc_eNB_modify_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* cons
*/
void
rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP
);
/*! \fn void rrc_eNB_send_S1AP_UPLINK_NAS(const protocol_ctxt_t * const ctxt_pP, eNB_RRC_UE_t * const ue_context_pP, UL_DCCH_Message_t * const ul_dcch_msg)
......@@ -101,9 +101,9 @@ rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(
*/
void
rrc_eNB_send_S1AP_UPLINK_NAS(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_UL_DCCH_Message_t* const ul_dcch_msg
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_UL_DCCH_Message_t *const ul_dcch_msg
);
/*! \fn void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(const protocol_ctxt_t * const ctxt_pP, eNB_RRC_UE_t * const ue_context_pP, UL_DCCH_Message_t *ul_dcch_msg)
......@@ -113,9 +113,9 @@ rrc_eNB_send_S1AP_UPLINK_NAS(
*\param ul_dcch_msg The message receive by RRC holding the NAS message.
*/
void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_UL_DCCH_Message_t* ul_dcch_msg
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_UL_DCCH_Message_t *ul_dcch_msg
);
/*! \fn rrc_eNB_send_S1AP_NAS_FIRST_REQ(const protocol_ctxt_t* const ctxt_pP,eNB_RRC_UE_t *const ue_context_pP, RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete)
......@@ -127,9 +127,9 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
*/
void
rrc_eNB_send_S1AP_NAS_FIRST_REQ(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
LTE_RRCConnectionSetupComplete_r8_IEs_t* rrcConnectionSetupComplete
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
LTE_RRCConnectionSetupComplete_r8_IEs_t *rrcConnectionSetupComplete
);
......@@ -143,7 +143,7 @@ the UE-associated S1-logical connection over the S1 interface. .
*/
void rrc_eNB_send_S1AP_UE_CONTEXT_RELEASE_REQ (
const module_id_t enb_mod_idP,
const rrc_eNB_ue_context_t* const ue_context_pP,
const rrc_eNB_ue_context_t *const ue_context_pP,
const s1ap_Cause_t causeP,
const long cause_valueP
);
......@@ -183,10 +183,10 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name
*\brief send a S1AP dedicated E_RAB setup response
*\param ctxt_pP contxt infirmation
*\param e_contxt_pP ue specific context at the eNB
*\param xid transaction identifier
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_SETUP_RESP(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
/*! \fn rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance);
*\brief process a S1AP dedicated E_RAB modify request message received from S1AP.
......@@ -204,7 +204,7 @@ int rrc_eNB_process_S1AP_E_RAB_MODIFY_REQ(MessageDef *msg_p, const char *msg_nam
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_MODIFY_RESP(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
/*! \fn rrc_eNB_process_S1AP_UE_CTXT_MODIFICATION_REQ(MessageDef *msg_p, const char *msg_name, instance_t instance)
*\brief process a S1AP_UE_CTXT_MODIFICATION_REQ message received from S1AP.
......@@ -244,8 +244,8 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
void
rrc_pdcp_config_security(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP,
const uint8_t send_security_mode_command
);
/*! \fn rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *msg_name, instance_t instance);
......@@ -264,10 +264,10 @@ int rrc_eNB_process_S1AP_E_RAB_RELEASE_COMMAND(MessageDef *msg_p, const char *ms
*\param xid transaction identifier
*\return 0 when successful, -1 if the UE index can not be retrieved.
*/
int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_ue_context_t* const ue_context_pP, uint8_t xid );
int rrc_eNB_send_S1AP_E_RAB_RELEASE_RESPONSE(const protocol_ctxt_t *const ctxt_pP, rrc_eNB_ue_context_t *const ue_context_pP, uint8_t xid );
int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP);
int rrc_eNB_send_PATH_SWITCH_REQ(const protocol_ctxt_t *const ctxt_pP,
rrc_eNB_ue_context_t *const ue_context_pP);
int rrc_eNB_process_S1AP_PATH_SWITCH_REQ_ACK (MessageDef *msg_p, const char *msg_name, instance_t instance);
#endif /* RRC_ENB_S1AP_H_ */
This diff is collapsed.
......@@ -133,8 +133,7 @@ The following diagram is based on graphviz (http://www.graphviz.org/), you need
* \enddot
*/
enum
{
enum {
STATE_START_OCG, /*!< \brief initiate OCG */
STATE_GET_OPT, /*!< \brief get options of OCG command */
STATE_DETECT_FILE, /*!< \brief detect the configuration file in folder USER_XML_FOLDER */
......@@ -569,7 +568,7 @@ typedef struct {
} Layer;
typedef struct {
char * level;
char *level;
char *verbosity;
int interval;
} Log_Emu;
......@@ -596,8 +595,8 @@ typedef struct {
Log_Emu log_emu;
Packet_Trace packet_trace;
Seed seed;
char * curve;
char * background_stats;
char *curve;
char *background_stats;
// CLI tags are in Info
//char g_log_level[20];
} Emulation_Config;
......@@ -675,7 +674,7 @@ typedef struct {
unsigned char cba_group_active;
unsigned char cba_backoff;
unsigned char handover_active;
char * otg_traffic;
char *otg_traffic;
unsigned char otg_bg_traffic_enabled;
unsigned char omg_model_rn;
unsigned char omg_model_enb;
......@@ -703,7 +702,7 @@ typedef struct {
node_function_t node_function[MAX_NUM_CCs];
node_timing_t node_timing[MAX_NUM_CCs];
unsigned char frame_type[MAX_NUM_CCs]; //! LTE frame type (TDD=1, FDD=0). \note this should be converted to \ref lte_frame_type_t (header file reorganization needed)
char * frame_type_name[MAX_NUM_CCs];
char *frame_type_name[MAX_NUM_CCs];
unsigned char tdd_config[MAX_NUM_CCs];
unsigned char tdd_config_S[MAX_NUM_CCs];
unsigned char extended_prefix_flag[MAX_NUM_CCs];
......
This diff is collapsed.
This diff is collapsed.
......@@ -58,7 +58,7 @@ Description Defines the EPS Mobility Management procedure call manager,
* EPS Mobility Management sublayer
*/
typedef int (*emm_indication_callback_t) (user_api_id_t *user_api_id, Stat_t, tac_t, ci_t, AcT_t,
const char*, size_t);
const char *, size_t);
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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