Commit 9622a56b authored by Robert Schmidt's avatar Robert Schmidt

gNB RRC: handle F1AP_UL_RRC_MESSAGE

parent 18a68387
...@@ -308,6 +308,7 @@ void *rrc_enb_process_msg(void *); ...@@ -308,6 +308,7 @@ void *rrc_enb_process_msg(void *);
TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RLC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_RRC_ENB_NB_IoT, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_PDCP_ENB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_PDCP_GNB, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_DATA_FORWARDING, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \ TASK_DEF(TASK_END_MARKER, TASK_PRIORITY_MED, 200, NULL, NULL) \
TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\ TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL,NULL)\
......
...@@ -734,27 +734,30 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity, ...@@ -734,27 +734,30 @@ static void deliver_sdu_srb(void *_ue, nr_pdcp_entity_t *entity,
__FILE__, __LINE__, __FUNCTION__, ue->rnti); __FILE__, __LINE__, __FUNCTION__, ue->rnti);
exit(1); exit(1);
srb_found: srb_found:
{ if (entity->is_gnb) {
uint8_t *rrc_buffer_p = entity->is_gnb ? MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_GNB, 0, F1AP_UL_RRC_MESSAGE);
itti_malloc(TASK_PDCP_ENB, TASK_RRC_GNB, size): AssertFatal(message_p != NULL, "OUT OF MEMORY\n");
itti_malloc(TASK_PDCP_UE, TASK_RRC_NRUE, size); f1ap_ul_rrc_message_t *ul_rrc = &F1AP_UL_RRC_MESSAGE(message_p);
MessageDef *message_p; ul_rrc->rnti = ue->rnti;
ul_rrc->srb_id = srb_id;
AssertFatal(rrc_buffer_p != NULL, "OUT OF MEMORY"); ul_rrc->rrc_container = malloc(size);
memcpy(rrc_buffer_p, buf, size); AssertFatal(ul_rrc->rrc_container != NULL, "OUT OF MEMORY\n");
message_p = entity->is_gnb ? memcpy(ul_rrc->rrc_container, buf, size);
itti_alloc_new_message(TASK_PDCP_ENB, 0, NR_RRC_DCCH_DATA_IND): ul_rrc->rrc_container_length = size;
itti_alloc_new_message(TASK_PDCP_UE, 0, NR_RRC_DCCH_DATA_IND); itti_send_msg_to_task(TASK_RRC_GNB, 0, message_p);
} else {
AssertFatal(message_p != NULL, "OUT OF MEMORY"); uint8_t *rrc_buffer_p = itti_malloc(TASK_PDCP_UE, TASK_RRC_NRUE, size);
NR_RRC_DCCH_DATA_IND(message_p).dcch_index = srb_id; AssertFatal(rrc_buffer_p != NULL, "OUT OF MEMORY\n");
NR_RRC_DCCH_DATA_IND(message_p).sdu_p = rrc_buffer_p; memcpy(rrc_buffer_p, buf, size);
NR_RRC_DCCH_DATA_IND(message_p).sdu_size = size; MessageDef *message_p = itti_alloc_new_message(TASK_PDCP_UE, 0, NR_RRC_DCCH_DATA_IND);
NR_RRC_DCCH_DATA_IND(message_p).rnti = ue->rnti; AssertFatal(message_p != NULL, "OUT OF MEMORY\n");
NR_RRC_DCCH_DATA_IND(message_p).dcch_index = srb_id;
itti_send_msg_to_task(entity->is_gnb ? TASK_RRC_GNB : TASK_RRC_NRUE, 0, message_p); NR_RRC_DCCH_DATA_IND(message_p).sdu_p = rrc_buffer_p;
} NR_RRC_DCCH_DATA_IND(message_p).sdu_size = size;
NR_RRC_DCCH_DATA_IND(message_p).rnti = ue->rnti;
itti_send_msg_to_task(TASK_RRC_NRUE, 0, message_p);
}
} }
static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity, static void deliver_pdu_srb(void *_ue, nr_pdcp_entity_t *entity,
......
...@@ -3928,28 +3928,24 @@ void *rrc_gnb_task(void *args_p) { ...@@ -3928,28 +3928,24 @@ void *rrc_gnb_task(void *args_p) {
break; break;
/* Messages from PDCP */ /* Messages from PDCP */
case NR_RRC_DCCH_DATA_IND: case F1AP_UL_RRC_MESSAGE:
PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt, PROTOCOL_CTXT_SET_BY_INSTANCE(&ctxt,
instance, instance,
GNB_FLAG_YES, GNB_FLAG_YES,
NR_RRC_DCCH_DATA_IND(msg_p).rnti, F1AP_UL_RRC_MESSAGE(msg_p).rnti,
msg_p->ittiMsgHeader.lte_time.frame, 0,
msg_p->ittiMsgHeader.lte_time.slot); 0);
LOG_D(NR_RRC,"Decoding DCCH : ue %d, inst %ld, ctxt %p, size %d\n", LOG_D(NR_RRC,"Decoding DCCH %d: ue %04x, inst %ld, ctxt %p, size %d\n",
F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
ctxt.rnti, ctxt.rnti,
instance, instance,
&ctxt, &ctxt,
NR_RRC_DCCH_DATA_IND(msg_p).sdu_size); F1AP_UL_RRC_MESSAGE(msg_p).rrc_container_length);
LOG_D(NR_RRC, PROTOCOL_NR_RRC_CTXT_UE_FMT" Received on DCCH %d %s\n",
PROTOCOL_NR_RRC_CTXT_UE_ARGS(&ctxt),
NR_RRC_DCCH_DATA_IND(msg_p).dcch_index,
msg_name_p);
rrc_gNB_decode_dcch(&ctxt, rrc_gNB_decode_dcch(&ctxt,
NR_RRC_DCCH_DATA_IND(msg_p).dcch_index, F1AP_UL_RRC_MESSAGE(msg_p).srb_id,
NR_RRC_DCCH_DATA_IND(msg_p).sdu_p, F1AP_UL_RRC_MESSAGE(msg_p).rrc_container,
NR_RRC_DCCH_DATA_IND(msg_p).sdu_size); F1AP_UL_RRC_MESSAGE(msg_p).rrc_container_length);
result = itti_free(ITTI_MSG_ORIGIN_ID(msg_p), NR_RRC_DCCH_DATA_IND(msg_p).sdu_p); free(F1AP_UL_RRC_MESSAGE(msg_p).rrc_container);
break; break;
case NGAP_DOWNLINK_NAS: case NGAP_DOWNLINK_NAS:
......
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