Merge remote-tracking branch 'origin/fix-cudu' into develop_integration_2019_w17
This commit is contained in:
@@ -2871,12 +2871,4 @@ void read_config_and_init(void) {
|
|||||||
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
|
memset((void *)RC.rrc[enb_id], 0, sizeof(eNB_RRC_INST));
|
||||||
RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
|
RCconfig_RRC(enb_id, RC.rrc[enb_id],macrlc_has_f1[enb_id]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
|
|
||||||
pdcp_layer_init();
|
|
||||||
|
|
||||||
if ( NODE_IS_CU(RC.rrc[0]->node_type) ) {
|
|
||||||
pdcp_set_rlc_funcptr((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req, (pdcp_data_ind_func_t)proto_agent_send_pdcp_data_ind);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2140,9 +2140,11 @@ pdcp_data_ind_func_t get_pdcp_data_ind_func() {
|
|||||||
return pdcp_params.pdcp_data_ind_func;
|
return pdcp_params.pdcp_data_ind_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
void pdcp_set_rlc_funcptr(send_rlc_data_req_func_t send_rlc_data_req,
|
void pdcp_set_rlc_data_req_func(send_rlc_data_req_func_t send_rlc_data_req) {
|
||||||
pdcp_data_ind_func_t pdcp_data_ind) {
|
|
||||||
pdcp_params.send_rlc_data_req_func = send_rlc_data_req;
|
pdcp_params.send_rlc_data_req_func = send_rlc_data_req;
|
||||||
|
}
|
||||||
|
|
||||||
|
void pdcp_set_pdcp_data_ind_func(pdcp_data_ind_func_t pdcp_data_ind) {
|
||||||
pdcp_params.pdcp_data_ind_func = pdcp_data_ind;
|
pdcp_params.pdcp_data_ind_func = pdcp_data_ind;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2175,9 +2177,6 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
|
|||||||
netlink_init();
|
netlink_init();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* default interface with rlc (will be modified if CU) */
|
|
||||||
pdcp_set_rlc_funcptr((send_rlc_data_req_func_t)rlc_data_req, (pdcp_data_ind_func_t) pdcp_data_ind);
|
|
||||||
return pdcp_params.optmask ;
|
return pdcp_params.optmask ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -412,8 +412,8 @@ int pdcp_fifo_flush_sdus ( const protocol_ctxt_t *const ct
|
|||||||
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t *const ctxt_pP);
|
int pdcp_fifo_read_input_sdus_remaining_bytes ( const protocol_ctxt_t *const ctxt_pP);
|
||||||
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t *const ctxt_pP);
|
int pdcp_fifo_read_input_sdus ( const protocol_ctxt_t *const ctxt_pP);
|
||||||
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t *const ctxt_pP);
|
void pdcp_fifo_read_input_sdus_from_otg ( const protocol_ctxt_t *const ctxt_pP);
|
||||||
void pdcp_set_rlc_funcptr(send_rlc_data_req_func_t send_rlc_data_req,
|
void pdcp_set_rlc_data_req_func(send_rlc_data_req_func_t send_rlc_data_req);
|
||||||
pdcp_data_ind_func_t pdcp_data_ind);
|
void pdcp_set_pdcp_data_ind_func(pdcp_data_ind_func_t pdcp_data_ind);
|
||||||
pdcp_data_ind_func_t get_pdcp_data_ind_func(void);
|
pdcp_data_ind_func_t get_pdcp_data_ind_func(void);
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -191,14 +191,14 @@ rlc_op_status_t proto_agent_send_rlc_data_req(const protocol_ctxt_t *const ctxt
|
|||||||
|
|
||||||
proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
|
proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
|
||||||
free_mem_block(sdu_pP, __func__);
|
free_mem_block(sdu_pP, __func__);
|
||||||
return 0;
|
return RLC_OP_STATUS_OK;
|
||||||
error:
|
error:
|
||||||
LOG_E(PROTO_AGENT, "PROTO_AGENT there was an error\n");
|
LOG_E(PROTO_AGENT, "PROTO_AGENT there was an error\n");
|
||||||
return -1;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
boolean_t
|
||||||
proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, const srb_flag_t srb_flagP,
|
proto_agent_send_pdcp_data_ind(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, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP) {
|
const MBMS_flag_t MBMS_flagP, const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP) {
|
||||||
uint8_t *msg = NULL;
|
uint8_t *msg = NULL;
|
||||||
@@ -225,10 +225,10 @@ proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP, const srb_f
|
|||||||
|
|
||||||
proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
|
proto_agent_async_msg_send((void *)msg, (int) msgsize, 1, proto_agent[mod_id].channel->channel_info);
|
||||||
free_mem_block(sdu_pP, __func__);
|
free_mem_block(sdu_pP, __func__);
|
||||||
return;
|
return TRUE;
|
||||||
error:
|
error:
|
||||||
LOG_E(PROTO_AGENT, "there was an error in %s\n", __func__);
|
LOG_E(PROTO_AGENT, "there was an error in %s\n", __func__);
|
||||||
return;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ rlc_op_status_t proto_agent_send_rlc_data_req( const protocol_ctxt_t *const ctxt
|
|||||||
const rb_id_t rb_idP, const mui_t muiP, confirm_t confirmP,
|
const rb_id_t rb_idP, const mui_t muiP, confirm_t confirmP,
|
||||||
sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
|
sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
|
||||||
|
|
||||||
void proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
boolean_t proto_agent_send_pdcp_data_ind(const protocol_ctxt_t *const ctxt_pP,
|
||||||
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
|
const srb_flag_t srb_flagP, const MBMS_flag_t MBMS_flagP,
|
||||||
const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
|
const rb_id_t rb_idP, sdu_size_t sdu_sizeP, mem_block_t *sdu_pP);
|
||||||
|
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ extern boolean_t pdcp_data_ind(
|
|||||||
//#define TRACE_RLC_PAYLOAD 1
|
//#define TRACE_RLC_PAYLOAD 1
|
||||||
#define DEBUG_RLC_DATA_REQ 1
|
#define DEBUG_RLC_DATA_REQ 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "proto_agent.h"
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char *dataP, const signed long sizeP)
|
void rlc_util_print_hex_octets(comp_name_t componentP, unsigned char *dataP, const signed long sizeP)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -575,6 +575,25 @@ int restart_L1L2(module_id_t enb_id) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_pdcp(void) {
|
||||||
|
if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
|
||||||
|
pdcp_layer_init();
|
||||||
|
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||||
|
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||||
|
if (IS_SOFTMODEM_NOS1)
|
||||||
|
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
||||||
|
pdcp_module_init(pdcp_initmask);
|
||||||
|
|
||||||
|
if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||||
|
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||||
|
} else {
|
||||||
|
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||||
|
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void wait_nfapi_init(char *thread_name) {
|
static void wait_nfapi_init(char *thread_name) {
|
||||||
printf( "waiting for NFAPI PNF connection and population of global structure (%s)\n",thread_name);
|
printf( "waiting for NFAPI PNF connection and population of global structure (%s)\n",thread_name);
|
||||||
@@ -654,24 +673,19 @@ int main( int argc, char **argv ) {
|
|||||||
fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
|
fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
|
||||||
|
|
||||||
/* Read configuration */
|
/* Read configuration */
|
||||||
if (RC.nb_inst > 0)
|
if (RC.nb_inst > 0) {
|
||||||
read_config_and_init();
|
read_config_and_init();
|
||||||
|
|
||||||
/* 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 */
|
||||||
RCconfig_flexran();
|
RCconfig_flexran();
|
||||||
|
for (i = 0; i < RC.nb_inst; i++) {
|
||||||
|
flexran_agent_start(i);
|
||||||
|
}
|
||||||
|
|
||||||
for (i = 0; i < RC.nb_inst; i++) {
|
/* initializes PDCP and sets correct RLC Request/PDCP Indication callbacks
|
||||||
flexran_agent_start(i);
|
* for monolithic/F1 modes */
|
||||||
}
|
init_pdcp();
|
||||||
|
|
||||||
uint32_t pdcp_initmask = ( IS_SOFTMODEM_NOS1 )? ( PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
|
||||||
|
|
||||||
if ( IS_SOFTMODEM_NOS1)
|
|
||||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
|
||||||
|
|
||||||
pdcp_module_init(pdcp_initmask);
|
|
||||||
|
|
||||||
if (RC.nb_inst > 0) {
|
|
||||||
if (create_tasks(1) < 0) {
|
if (create_tasks(1) < 0) {
|
||||||
printf("cannot create ITTI tasks\n");
|
printf("cannot create ITTI tasks\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
@@ -683,7 +697,7 @@ 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);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
printf("No ITTI, Initializing L1\n");
|
printf("RC.nb_inst = 0, Initializing L1\n");
|
||||||
RCconfig_L1();
|
RCconfig_L1();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "flexran_agent.h"
|
#include "flexran_agent.h"
|
||||||
#include "s1ap_eNB.h"
|
#include "s1ap_eNB.h"
|
||||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||||
|
#include "proto_agent.h"
|
||||||
|
|
||||||
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
||||||
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
||||||
|
|||||||
@@ -659,6 +659,21 @@ int restart_L1L2(module_id_t enb_id) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void init_pdcp(void) {
|
||||||
|
uint32_t pdcp_initmask = (!IS_SOFTMODEM_NOS1) ? LINK_ENB_PDCP_TO_GTPV1U_BIT : (LINK_ENB_PDCP_TO_GTPV1U_BIT | PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT);
|
||||||
|
|
||||||
|
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF)) {
|
||||||
|
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (IS_SOFTMODEM_NOKRNMOD)
|
||||||
|
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
||||||
|
|
||||||
|
pdcp_module_init(pdcp_initmask);
|
||||||
|
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||||
|
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||||
|
}
|
||||||
|
|
||||||
int main( int argc, char **argv ) {
|
int main( int argc, char **argv ) {
|
||||||
#if defined (XFORMS)
|
#if defined (XFORMS)
|
||||||
void *status;
|
void *status;
|
||||||
@@ -734,16 +749,9 @@ int main( int argc, char **argv ) {
|
|||||||
|
|
||||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||||
init_opt();
|
init_opt();
|
||||||
uint32_t pdcp_initmask = (!IS_SOFTMODEM_NOS1 )? LINK_ENB_PDCP_TO_GTPV1U_BIT : (LINK_ENB_PDCP_TO_GTPV1U_BIT | PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT);
|
|
||||||
|
|
||||||
if ( IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM || (nfapi_getmode()==NFAPI_UE_STUB_PNF) ) {
|
init_pdcp();
|
||||||
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( IS_SOFTMODEM_NOKRNMOD)
|
|
||||||
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
|
||||||
|
|
||||||
pdcp_module_init( pdcp_initmask );
|
|
||||||
//TTN for D2D
|
//TTN for D2D
|
||||||
printf ("RRC control socket\n");
|
printf ("RRC control socket\n");
|
||||||
rrc_control_socket_init();
|
rrc_control_socket_init();
|
||||||
|
|||||||
Reference in New Issue
Block a user