Commit 84d3cfb1 authored by Xue Song's avatar Xue Song

fix some warnings

parent 76cb132f
...@@ -144,8 +144,8 @@ nr_rrc_data_ind_ccch( ...@@ -144,8 +144,8 @@ nr_rrc_data_ind_ccch(
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
{ {
rb_id_t DCCH_index = Srb_id; rb_id_t DCCH_index = Srb_id;
LOG_I(RRC, "[UE %x] Frame %d: received a CCCH %ld message on SRB %d with Size %d from gNB %d\n", LOG_I(RRC, "[UE %x] Frame %d: received a CCCH %ld message on SRB %ld with Size %d from gNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id,sdu_sizeP, ctxt_pP->eNB_index); ctxt_pP->module_id, ctxt_pP->frame, DCCH_index, Srb_id, sdu_sizeP, ctxt_pP->eNB_index);
{ {
MessageDef *message_p; MessageDef *message_p;
// Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling). // Uses a new buffer to avoid issue with PDCP buffer content that could be changed by PDCP (asynchronous message handling).
...@@ -502,7 +502,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask) ...@@ -502,7 +502,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
} }
return pdcp_optmask ; return pdcp_optmask ;
} }
static int liuyu=0;
static void deliver_sdu_drb(protocol_ctxt_t *ctxt_pP,void *_ue, nr_pdcp_entity_t *entity, static void deliver_sdu_drb(protocol_ctxt_t *ctxt_pP,void *_ue, nr_pdcp_entity_t *entity,
char *buf, int size) char *buf, int size)
{ {
...@@ -515,32 +515,10 @@ static void deliver_sdu_drb(protocol_ctxt_t *ctxt_pP,void *_ue, nr_pdcp_entity_t ...@@ -515,32 +515,10 @@ static void deliver_sdu_drb(protocol_ctxt_t *ctxt_pP,void *_ue, nr_pdcp_entity_t
int i; int i;
if (1) { //(IS_SOFTMODEM_NOS1){ if (1) { //(IS_SOFTMODEM_NOS1){
#if 0
log_dump(PDCP,buf,size,LOG_DUMP_CHAR," PDCP Received SDU:\n");
if (size > 4700)
{
LOG_I(PDCP,"maybe ip data \n");
}
else
{
LOG_I(PDCP,"send to gNB RRC \n");
if(liuyu==2)
liuyu=1;
if(liuyu==0)
nr_rrc_data_ind_ccch( ctxt_pP, 1, size, buf);
if(liuyu==1)
nr_rrc_data_ind( ctxt_pP, 1, size, buf);
liuyu++;
}
#else
len = write(nas_sock_fd[0], buf, size); len = write(nas_sock_fd[0], buf, size);
if (len != size) { if (len != size) {
LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__); LOG_E(PDCP, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
} }
#endif
} }
else{ else{
for (i = 0; i < 5; i++) { for (i = 0; i < 5; i++) {
...@@ -628,24 +606,19 @@ static void deliver_sdu_srb(protocol_ctxt_t *ctxt_pP, void *_ue, nr_pdcp_entity_ ...@@ -628,24 +606,19 @@ static void deliver_sdu_srb(protocol_ctxt_t *ctxt_pP, void *_ue, nr_pdcp_entity_
{ {
/* Implementation to be added */ /* Implementation to be added */
nr_pdcp_ue_t *ue = _ue; // nr_pdcp_ue_t *ue = _ue;
MessageDef *message_p; // MessageDef *message_p;
uint8_t *gtpu_buffer_p; // uint8_t *gtpu_buffer_p;
int srb_id; // int srb_id;
int i;
if (ccch_or_dcch == 0) { if (ccch_or_dcch == 0) {
nr_rrc_data_ind_ccch( ctxt_pP, 1, size, buf); nr_rrc_data_ind_ccch( ctxt_pP, 1, size, (uint8_t *)buf);
ccch_or_dcch = 1; ccch_or_dcch = 1;
} else { } else {
nr_rrc_data_ind( ctxt_pP, 1, size, buf); nr_rrc_data_ind( ctxt_pP, 1, size, (uint8_t *)buf);
} }
return;
} }
static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity, static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity,
char *buf, int size, int sdu_id) char *buf, int size, int sdu_id)
{ {
...@@ -793,7 +766,7 @@ boolean_t pdcp_data_ind( ...@@ -793,7 +766,7 @@ boolean_t pdcp_data_ind(
if (NODE_IS_DU(RC.nrrrc[0]->node_type) && (srb_flagP == 0)) { if (NODE_IS_DU(RC.nrrrc[0]->node_type) && (srb_flagP == 0)) {
LOG_D(RLC, "call proto_agent_send_pdcp_data_ind() \n"); LOG_D(RLC, "call proto_agent_send_pdcp_data_ind() \n");
nr_pdcp_params.pdcp_data_ind_func(ctxt_pP, srb_flagP, 0, rb_id, sdu_buffer_size, sdu_buffer, NULL, NULL); nr_pdcp_params.pdcp_data_ind_func(ctxt_pP, srb_flagP, 0, rb_id, sdu_buffer_size, sdu_buffer, NULL, NULL);
return; return 1;
} }
nr_pdcp_manager_lock(nr_pdcp_ue_manager); nr_pdcp_manager_lock(nr_pdcp_ue_manager);
......
...@@ -822,7 +822,7 @@ static void srb_add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerCon ...@@ -822,7 +822,7 @@ static void srb_add_drb_am(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerCon
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config;
struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig; struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig;
int srb_id = 1; int srb_id = 1;
int channel_id = 1;//rlc_BearerConfig->logicalChannelIdentity; // int channel_id = 1;//rlc_BearerConfig->logicalChannelIdentity;
int logical_channel_group; int logical_channel_group;
int t_status_prohibit; int t_status_prohibit;
...@@ -962,7 +962,7 @@ static void srb_add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerCon ...@@ -962,7 +962,7 @@ static void srb_add_drb_um(int rnti, struct NR_DRB_ToAddMod *s, NR_RLC_BearerCon
struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config; struct NR_RLC_Config *r = rlc_BearerConfig->rlc_Config;
struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig; struct NR_LogicalChannelConfig *l = rlc_BearerConfig->mac_LogicalChannelConfig;
int srb_id = 1; int srb_id = 1;
int channel_id = rlc_BearerConfig->logicalChannelIdentity; // int channel_id = rlc_BearerConfig->logicalChannelIdentity;
int logical_channel_group; int logical_channel_group;
int sn_field_length; int sn_field_length;
......
...@@ -390,24 +390,27 @@ rrc_gNB_generate_RRCSetup( ...@@ -390,24 +390,27 @@ rrc_gNB_generate_RRCSetup(
case ngran_gNB_CU: case ngran_gNB_CU:
// create an ITTI message // create an ITTI message
/* TODO: F1 IDs ar missing in RRC */ /* TODO: F1 IDs ar missing in RRC */
// message_p = itti_alloc_new_message (TASK_RRC_GNB, F1AP_DL_RRC_MESSAGE); if(0) {
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container = (uint8_t *)ue_p->Srb0.Tx_buffer.Payload; message_p = itti_alloc_new_message (TASK_RRC_GNB, F1AP_DL_RRC_MESSAGE);
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size; F1AP_DL_RRC_MESSAGE (message_p).rrc_container = (uint8_t *)ue_p->Srb0.Tx_buffer.Payload;
// F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0; F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = ue_p->Srb0.Tx_buffer.payload_size;
// F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0; F1AP_DL_RRC_MESSAGE (message_p).gNB_CU_ue_id = 0;
// F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown F1AP_DL_RRC_MESSAGE (message_p).gNB_DU_ue_id = 0;
// F1AP_DL_RRC_MESSAGE (message_p).rnti = ue_p->rnti; F1AP_DL_RRC_MESSAGE (message_p).old_gNB_DU_ue_id = 0xFFFFFFFF; // unknown
// F1AP_DL_RRC_MESSAGE (message_p).srb_id = CCCH; F1AP_DL_RRC_MESSAGE (message_p).rnti = ue_p->rnti;
// F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1; F1AP_DL_RRC_MESSAGE (message_p).srb_id = CCCH;
// F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0; F1AP_DL_RRC_MESSAGE (message_p).execute_duplication = 1;
// itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p); F1AP_DL_RRC_MESSAGE (message_p).RAT_frequency_priority_information.en_dc = 0;
// LOG_D(NR_RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n"); itti_send_msg_to_task (TASK_CU_F1, ctxt_pP->module_id, message_p);
LOG_D(NR_RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
}
// for rfsim, send RRCSetup messgae in SRB1
nr_rrc_data_req(ctxt_pP, nr_rrc_data_req(ctxt_pP,
DCCH, DCCH,
rrc_gNB_mui++, rrc_gNB_mui++,
SDU_CONFIRM_NO, SDU_CONFIRM_NO,
ue_p->Srb0.Tx_buffer.payload_size, ue_p->Srb0.Tx_buffer.payload_size,
ue_p->Srb0.Tx_buffer.Payload, (uint8_t *)ue_p->Srb0.Tx_buffer.Payload,
PDCP_TRANSMISSION_MODE_CONTROL); PDCP_TRANSMISSION_MODE_CONTROL);
break; break;
...@@ -462,7 +465,7 @@ rrc_gNB_generate_RRCSetup( ...@@ -462,7 +465,7 @@ rrc_gNB_generate_RRCSetup(
rrc_gNB_mui++, rrc_gNB_mui++,
SDU_CONFIRM_NO, SDU_CONFIRM_NO,
ue_p->Srb0.Tx_buffer.payload_size, ue_p->Srb0.Tx_buffer.payload_size,
ue_p->Srb0.Tx_buffer.Payload, (uint8_t *)ue_p->Srb0.Tx_buffer.Payload,
PDCP_TRANSMISSION_MODE_CONTROL); PDCP_TRANSMISSION_MODE_CONTROL);
#endif #endif
} }
...@@ -668,7 +671,6 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -668,7 +671,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList
*dedicatedNAS_MessageList = NULL; *dedicatedNAS_MessageList = NULL;
NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NULL; NR_DedicatedNAS_Message_t *dedicatedNAS_Message = NULL;
MessageDef *message_p;
uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id); uint8_t xid = rrc_gNB_get_next_transaction_identifier(ctxt_pP->module_id);
...@@ -773,21 +775,6 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -773,21 +775,6 @@ rrc_gNB_generate_defaultRRCReconfiguration(
ue_context_pP->ue_context.rnti); ue_context_pP->ue_context.rnti);
switch (RC.nrrrc[ctxt_pP->module_id]->node_type) { switch (RC.nrrrc[ctxt_pP->module_id]->node_type) {
case ngran_gNB_CU: case ngran_gNB_CU:
// create an ITTI message
// F1AP_DL_RRC_MESSAGE
// message_p = itti_alloc_new_message (TASK_RRC_GNB, F1AP_DL_RRC_MESSAGE);
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container = buffer;
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = 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_context_pP->ue_context.rnti;
// F1AP_DL_RRC_MESSAGE (message_p).srb_id = DCCH;
// 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_I(NR_RRC, "send RRCReconfiguration to F1AP by F1AP_DL_RRC_MESSAGE \n");
nr_rrc_data_req(ctxt_pP, nr_rrc_data_req(ctxt_pP,
DCCH, DCCH,
rrc_gNB_mui++, rrc_gNB_mui++,
...@@ -807,6 +794,7 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -807,6 +794,7 @@ rrc_gNB_generate_defaultRRCReconfiguration(
case ngran_gNB: case ngran_gNB:
{ {
#ifdef ITTI_SIM #ifdef ITTI_SIM
MessageDef *message_p;
uint8_t *message_buffer; uint8_t *message_buffer;
message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, size); message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, size);
memcpy (message_buffer, buffer, size); memcpy (message_buffer, buffer, size);
...@@ -2451,7 +2439,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) { ...@@ -2451,7 +2439,7 @@ void rrc_gNB_process_f1_setup_req(f1ap_setup_req_t *f1_setup_req) {
itti_send_msg_to_task (TASK_CU_F1, GNB_MODULE_ID_TO_INSTANCE(j), msg_p); itti_send_msg_to_task (TASK_CU_F1, GNB_MODULE_ID_TO_INSTANCE(j), msg_p);
break; break;
} else {// setup_req mcc/mnc match rrc internal list element } else {// setup_req mcc/mnc match rrc internal list element
LOG_W(NR_RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d rrc->nr_cellid/f1_setup_req->nr_cellid %d/%d \n", LOG_W(NR_RRC,"[Inst %d] No matching MCC/MNC: rrc->mcc/f1_setup_req->mcc %d/%d rrc->mnc/f1_setup_req->mnc %d/%d rrc->nr_cellid/f1_setup_req->nr_cellid %ld/%ld \n",
j, rrc->configuration.mcc[0], f1_setup_req->mcc[i], j, rrc->configuration.mcc[0], f1_setup_req->mcc[i],
rrc->configuration.mnc[0], f1_setup_req->mnc[i], rrc->configuration.mnc[0], f1_setup_req->mnc[i],
rrc->nr_cellid, f1_setup_req->nr_cellid[i]); rrc->nr_cellid, f1_setup_req->nr_cellid[i]);
...@@ -2806,7 +2794,6 @@ rrc_gNB_generate_UECapabilityEnquiry( ...@@ -2806,7 +2794,6 @@ rrc_gNB_generate_UECapabilityEnquiry(
{ {
uint8_t buffer[100]; uint8_t buffer[100];
uint8_t size; uint8_t size;
MessageDef *message_p;
T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame), T(T_ENB_RRC_UE_CAPABILITY_ENQUIRY, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->frame),
T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti)); T_INT(ctxt_pP->subframe), T_INT(ctxt_pP->rnti));
...@@ -2820,21 +2807,6 @@ rrc_gNB_generate_UECapabilityEnquiry( ...@@ -2820,21 +2807,6 @@ rrc_gNB_generate_UECapabilityEnquiry(
size); size);
switch (RC.nrrrc[ctxt_pP->module_id]->node_type) { switch (RC.nrrrc[ctxt_pP->module_id]->node_type) {
case ngran_gNB_CU: case ngran_gNB_CU:
// create an ITTI message
// F1AP_DL_RRC_MESSAGE
// message_p = itti_alloc_new_message (TASK_RRC_GNB, F1AP_DL_RRC_MESSAGE);
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container = buffer;
// F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = 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_context_pP->ue_context.rnti;
// F1AP_DL_RRC_MESSAGE (message_p).srb_id = DCCH;
// 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(NR_RRC, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
nr_rrc_data_req( nr_rrc_data_req(
ctxt_pP, ctxt_pP,
DCCH, DCCH,
...@@ -2869,6 +2841,7 @@ rrc_gNB_generate_UECapabilityEnquiry( ...@@ -2869,6 +2841,7 @@ rrc_gNB_generate_UECapabilityEnquiry(
rrc_gNB_mui, rrc_gNB_mui,
size); size);
#ifdef ITTI_SIM #ifdef ITTI_SIM
MessageDef *message_p;
uint8_t *message_buffer; uint8_t *message_buffer;
message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, size); message_buffer = itti_malloc (TASK_RRC_GNB, TASK_RRC_UE_SIM, size);
memcpy (message_buffer, buffer, size); memcpy (message_buffer, buffer, size);
......
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