Commit 34172c7a authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'feature-127-protocol-split' of...

Merge branch 'feature-127-protocol-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into feature-127-protocol-split
parents 8a11e8dd 461bfa5f
...@@ -102,6 +102,7 @@ check_supported_distribution() { ...@@ -102,6 +102,7 @@ check_supported_distribution() {
"ubuntu14.04") return 0 ;; "ubuntu14.04") return 0 ;;
"fedora24") return 0 ;; "fedora24") return 0 ;;
"rhel7") return 0 ;; "rhel7") return 0 ;;
"rhel7.5") return 0 ;;
"centos7") return 0 ;; "centos7") return 0 ;;
esac esac
return 1 return 1
...@@ -560,8 +561,6 @@ check_install_oai_software() { ...@@ -560,8 +561,6 @@ check_install_oai_software() {
libidn2-0-dev \ libidn2-0-dev \
libidn11-dev \ libidn11-dev \
libmysqlclient-dev \ libmysqlclient-dev \
liboctave-dev \
libpgm-dev \
libpython2.7-dev \ libpython2.7-dev \
libsctp1 \ libsctp1 \
libsctp-dev \ libsctp-dev \
...@@ -572,8 +571,6 @@ check_install_oai_software() { ...@@ -572,8 +571,6 @@ check_install_oai_software() {
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
mscgen \ mscgen \
octave \
octave-signal \
openssh-client \ openssh-client \
openssh-server \ openssh-server \
openssl \ openssl \
...@@ -633,8 +630,6 @@ check_install_oai_software() { ...@@ -633,8 +630,6 @@ check_install_oai_software() {
libidn2-devel \ libidn2-devel \
libidn-devel \ libidn-devel \
mariadb-devel \ mariadb-devel \
octave-devel \
openpgm-devel \
lksctp-tools \ lksctp-tools \
lksctp-tools-devel \ lksctp-tools-devel \
openssl-devel \ openssl-devel \
...@@ -644,8 +639,6 @@ check_install_oai_software() { ...@@ -644,8 +639,6 @@ check_install_oai_software() {
libxml2 \ libxml2 \
libxml2-devel \ libxml2-devel \
libxslt-devel \ libxslt-devel \
octave \
octave-signal \
openssh-clients \ openssh-clients \
openssh-server \ openssh-server \
openssl \ openssl \
......
...@@ -524,11 +524,6 @@ static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt) ...@@ -524,11 +524,6 @@ static inline void updateTimes(uint64_t start, Meas *M, int period, char * txt)
} }
#endif #endif
pthread_mutex_t async_server_lock;
pthread_cond_t async_server_notify;
int async_server_shutdown;
#endif #endif
...@@ -80,7 +80,6 @@ typedef struct mme_ip_address_s { ...@@ -80,7 +80,6 @@ typedef struct mme_ip_address_s {
} mme_ip_address_t; } mme_ip_address_t;
typedef struct cu_params { typedef struct cu_params {
const char *local_interface;
const char *local_ipv4_address; const char *local_ipv4_address;
const uint16_t local_port; const uint16_t local_port;
const char *remote_ipv4_address; const char *remote_ipv4_address;
......
...@@ -150,10 +150,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, ...@@ -150,10 +150,10 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance,
// NR cellID // NR cellID
BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity, BIT_STRING_TO_NR_CELL_IDENTITY(&served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity,
F1AP_SETUP_REQ(message_p).nr_cellid[i]); F1AP_SETUP_REQ(message_p).nr_cellid[i]);
LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %d\n", assoc_id, LOG_D(CU_F1AP, "[SCTP %d] Received nRCGI: MCC %d, MNC %d, CELL_ID %llu\n", assoc_id,
F1AP_SETUP_REQ(message_p).mcc[i], F1AP_SETUP_REQ(message_p).mcc[i],
F1AP_SETUP_REQ(message_p).mnc[i], F1AP_SETUP_REQ(message_p).mnc[i],
F1AP_SETUP_REQ(message_p).nr_cellid[i]); (long long unsigned int)F1AP_SETUP_REQ(message_p).nr_cellid[i]);
LOG_D(CU_F1AP, "nr_cellId : %x %x %x %x %x\n", LOG_D(CU_F1AP, "nr_cellId : %x %x %x %x %x\n",
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0], served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[0],
served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1], served_celles_item_p->served_Cell_Information.nRCGI.nRCellIdentity.buf[1],
...@@ -335,11 +335,12 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -335,11 +335,12 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t)); F1AP_GNB_CUSystemInformation_t *gNB_CUSystemInformation = (F1AP_GNB_CUSystemInformation_t *)calloc(1, sizeof(F1AP_GNB_CUSystemInformation_t));
LOG_D(CU_F1AP, "SI %d: "); LOG_D(CU_F1AP, "SI %d: ",i);
for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) LOG_D(CU_F1AP, "%2x ",f1ap_setup_resp->SI_container[i][0][n]); for (int n=0;n<f1ap_setup_resp->SI_container_length[i][0];n++) LOG_D(CU_F1AP, "%2x ",f1ap_setup_resp->SI_container[i][0][n]);
LOG_D(CU_F1AP, "\n"); LOG_D(CU_F1AP, "\n");
OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage, OCTET_STRING_fromBuf(&gNB_CUSystemInformation->sImessage,
f1ap_setup_resp->SI_container[i][0], f1ap_setup_resp->SI_container_length[i][0]); (const char*)f1ap_setup_resp->SI_container[i][0],
f1ap_setup_resp->SI_container_length[i][0]);
LOG_D(CU_F1AP, "f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]); LOG_D(CU_F1AP, "f1ap_setup_resp->SI_container_length = %d \n" , f1ap_setup_resp->SI_container_length[0][0]);
cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation; cells_to_be_activated_list_itemExtIEs->extensionValue.choice.GNB_CUSystemInformation = *gNB_CUSystemInformation;
...@@ -350,7 +351,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, ...@@ -350,7 +351,7 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance,
ASN_SEQUENCE_ADD(&p_160P9_t.list, ASN_SEQUENCE_ADD(&p_160P9_t.list,
cells_to_be_activated_list_itemExtIEs); cells_to_be_activated_list_itemExtIEs);
cells_to_be_activated_list_item.iE_Extensions = &p_160P9_t; cells_to_be_activated_list_item.iE_Extensions = (struct F1AP_ProtocolExtensionContainer*)&p_160P9_t;
} }
/* ADD */ /* ADD */
......
...@@ -73,7 +73,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -73,7 +73,6 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
F1AP_InitialULRRCMessageTransferIEs_t *ie; F1AP_InitialULRRCMessageTransferIEs_t *ie;
rnti_t rnti; rnti_t rnti;
uint8_t *ccch_sdu;
sdu_size_t ccch_sdu_len; sdu_size_t ccch_sdu_len;
int CC_id =0; int CC_id =0;
...@@ -135,7 +134,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -135,7 +134,7 @@ int CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
break; break;
} }
} }
AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %ll\n",nr_cellid); AssertFatal(rrc_inst>=0,"couldn't find an RRC instance for nr_cell %llu\n",(unsigned long long int)nr_cellid);
int f1ap_uid = f1ap_add_ue(&f1ap_cu_ue[rrc_inst], rrc_inst, CC_id, 0, rnti); int f1ap_uid = f1ap_add_ue(&f1ap_cu_ue[rrc_inst], rrc_inst, CC_id, 0, rnti);
if (f1ap_uid < 0 ) { if (f1ap_uid < 0 ) {
...@@ -193,8 +192,8 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -193,8 +192,8 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID; ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_CU_UE_F1AP_ID;
ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti); ie->value.choice.GNB_CU_UE_F1AP_ID = f1ap_get_cu_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %d associated with UE RNTI %x (instance %d)\n", LOG_I(CU_F1AP, "Setting GNB_CU_UE_F1AP_ID %llu associated with UE RNTI %x (instance %d)\n",
ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance); (unsigned long long int)ie->value.choice.GNB_CU_UE_F1AP_ID, f1ap_dl_rrc->rnti, instance);
/* mandatory */ /* mandatory */
...@@ -205,7 +204,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -205,7 +204,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID; ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_GNB_DU_UE_F1AP_ID;
ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti); //f1ap_dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id ie->value.choice.GNB_DU_UE_F1AP_ID = f1ap_get_du_ue_f1ap_id(&f1ap_cu_ue[instance],f1ap_dl_rrc->rnti); //f1ap_dl_rrc->gNB_DU_ue_id; // TODO: f1ap_dl_rrc->gNB_DU_ue_id
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %d associated with UE RNTI %x \n", ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti); LOG_I(CU_F1AP, "GNB_DU_UE_F1AP_ID %llu associated with UE RNTI %x \n", (unsigned long long int)ie->value.choice.GNB_DU_UE_F1AP_ID, f1ap_dl_rrc->rnti);
/* optional */ /* optional */
/* c3. oldgNB_DU_UE_F1AP_ID */ /* c3. oldgNB_DU_UE_F1AP_ID */
...@@ -245,7 +244,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -245,7 +244,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
ie->id = F1AP_ProtocolIE_ID_id_RRCContainer; ie->id = F1AP_ProtocolIE_ID_id_RRCContainer;
ie->criticality = F1AP_Criticality_reject; ie->criticality = F1AP_Criticality_reject;
ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RRCContainer; ie->value.present = F1AP_DLRRCMessageTransferIEs__value_PR_RRCContainer;
OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length); OCTET_STRING_fromBuf(&ie->value.choice.RRCContainer, (const char*)f1ap_dl_rrc->rrc_container, f1ap_dl_rrc->rrc_container_length);
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* optional */ /* optional */
...@@ -264,7 +263,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -264,7 +263,7 @@ int CU_send_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
//ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L; //ie->value.choice.RAT_FrequencyPriorityInformation.choice.rAT_FrequencySelectionPriority = 123L;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
} }
/* encode */ /* encode */
if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) {
LOG_E(CU_F1AP, "Failed to encode F1 setup request\n"); LOG_E(CU_F1AP, "Failed to encode F1 setup request\n");
...@@ -287,20 +286,13 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -287,20 +286,13 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n"); LOG_D(CU_F1AP, "CU_handle_UL_RRC_MESSAGE_TRANSFER \n");
MessageDef *message_p;
F1AP_ULRRCMessageTransfer_t *container; F1AP_ULRRCMessageTransfer_t *container;
F1AP_ULRRCMessageTransferIEs_t *ie; F1AP_ULRRCMessageTransferIEs_t *ie;
uint8_t *buffer;
uint32_t len;
uint64_t cu_ue_f1ap_id; uint64_t cu_ue_f1ap_id;
uint64_t du_ue_f1ap_id; uint64_t du_ue_f1ap_id;
uint64_t srb_id; uint64_t srb_id;
int executeDuplication;
sdu_size_t ccch_sdu_len;
uint64_t subscriberProfileIDforRFP;
uint64_t rAT_FrequencySelectionPriority;
DevAssert(pdu != NULL); DevAssert(pdu != NULL);
...@@ -365,15 +357,17 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -365,15 +357,17 @@ int CU_handle_UL_RRC_MESSAGE_TRANSFER(instance_t instance,
*/ */
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
ctxt.module_id = instance; ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance],cu_ue_f1ap_id); ctxt.rnti = f1ap_get_rnti_by_cu_id(&f1ap_cu_ue[instance],cu_ue_f1ap_id);
ctxt.enb_flag = 1; ctxt.enb_flag = 1;
mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__); mem_block_t *mb = get_free_mem_block(ie->value.choice.RRCContainer.size,__func__);
memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size); memcpy((void*)mb->data,(void*)ie->value.choice.RRCContainer.buf,ie->value.choice.RRCContainer.size);
LOG_I(CU_F1AP, "Calling pdcp_data_ind for UE RNTI %x srb_id %lu with size %d (DCCH) \n", ctxt.rnti, srb_id, ie->value.choice.RRCContainer.size);
pdcp_data_ind (&ctxt, pdcp_data_ind (&ctxt,
1, 1, // srb_flag
0, 0, // embms_flag
srb_id, srb_id,
ie->value.choice.RRCContainer.size, ie->value.choice.RRCContainer.size,
mb); mb);
return 0; return 0;
} }
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "f1ap_cu_interface_management.h" #include "f1ap_cu_interface_management.h"
#include "f1ap_cu_rrc_message_transfer.h" #include "f1ap_cu_rrc_message_transfer.h"
#include "f1ap_cu_task.h" #include "f1ap_cu_task.h"
#include "proto_agent.h"
extern RAN_CONTEXT_t RC; extern RAN_CONTEXT_t RC;
...@@ -64,6 +65,16 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat ...@@ -64,6 +65,16 @@ void cu_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data_from_du->assoc_id = sctp_new_association_resp->assoc_id; f1ap_du_data_from_du->assoc_id = sctp_new_association_resp->assoc_id;
f1ap_du_data_from_du->sctp_in_streams = sctp_new_association_resp->in_streams; f1ap_du_data_from_du->sctp_in_streams = sctp_new_association_resp->in_streams;
f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams; f1ap_du_data_from_du->sctp_out_streams = sctp_new_association_resp->out_streams;
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.rrc[instance]->eth_params_s.my_addr,
.local_port = RC.rrc[instance]->eth_params_s.my_portd,
.remote_ipv4_address = RC.rrc[instance]->eth_params_s.remote_addr,
.remote_port = RC.rrc[instance]->eth_params_s.remote_portd
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
} }
void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) { void cu_task_handle_sctp_data_ind(instance_t instance, sctp_data_ind_t *sctp_data_ind) {
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "f1ap_decoder.h" #include "f1ap_decoder.h"
#include "f1ap_itti_messaging.h" #include "f1ap_itti_messaging.h"
#include "f1ap_cu_ue_context_management.h" #include "f1ap_cu_ue_context_management.h"
#include <string.h>
extern f1ap_setup_req_t *f1ap_du_data_from_du; extern f1ap_setup_req_t *f1ap_du_data_from_du;
...@@ -217,7 +218,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -217,7 +218,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
ie->value.choice.ResourceCoordinationTransferContainer.buf = malloc(4); ie->value.choice.ResourceCoordinationTransferContainer.buf = malloc(4);
ie->value.choice.ResourceCoordinationTransferContainer.size = 4; ie->value.choice.ResourceCoordinationTransferContainer.size = 4;
strncpy(ie->value.choice.ResourceCoordinationTransferContainer.buf, "123", 3); strncpy((char *)ie->value.choice.ResourceCoordinationTransferContainer.buf, "123", 3);
OCTET_STRING_fromBuf(&ie->value.choice.ResourceCoordinationTransferContainer, "asdsa1d32sa1d31asd31as", OCTET_STRING_fromBuf(&ie->value.choice.ResourceCoordinationTransferContainer, "asdsa1d32sa1d31asd31as",
...@@ -264,7 +265,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -264,7 +265,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 10.1.3 sCellULConfigured*/ /* 10.1.3 sCellULConfigured*/
if (0) { if (0) {
scell_toBeSetup_item.sCellULConfigured = (F1AP_CellULConfigured_t *)calloc(1, sizeof(F1AP_CellULConfigured_t)); scell_toBeSetup_item.sCellULConfigured = (F1AP_CellULConfigured_t *)calloc(1, sizeof(F1AP_CellULConfigured_t));
scell_toBeSetup_item.sCellULConfigured = F1AP_CellULConfigured_ul_and_sul; // enum *scell_toBeSetup_item.sCellULConfigured = F1AP_CellULConfigured_ul_and_sul; // enum
} }
/* ADD */ /* ADD */
...@@ -390,21 +391,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -390,21 +391,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* qoSPriorityLevel */ /* qoSPriorityLevel */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L;
} }
} else { } else {
...@@ -424,21 +425,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -424,21 +425,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L;
} }
} // if some_decide_qoS_characteristics } // if some_decide_qoS_characteristics
...@@ -465,14 +466,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -465,14 +466,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* maxPacketLossRateDownlink */ /* maxPacketLossRateDownlink */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateUplink */ /* maxPacketLossRateUplink */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L;
} }
} }
...@@ -481,7 +482,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -481,7 +482,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* reflective_QoS_Attribute */ /* reflective_QoS_Attribute */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = 1L; *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->dRB_QoS.reflective_QoS_Attribute = 1L;
} }
} // dRB_QoS } // dRB_QoS
...@@ -503,7 +504,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -503,7 +504,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* 12.1.2.3 notificationControl */ /* 12.1.2.3 notificationControl */
if (0) { if (0) {
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = (F1AP_NotificationControl_t *)calloc(1, sizeof(F1AP_NotificationControl_t)); drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = (F1AP_NotificationControl_t *)calloc(1, sizeof(F1AP_NotificationControl_t));
drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = F1AP_NotificationControl_active; // enum *drbs_toBeSetup_item.qoSInformation.choice.dRB_Information->notificationControl = F1AP_NotificationControl_active; // enum
} }
/* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy /* 12.1.2.4 flows_Mapped_To_DRB_List */ // BK: need verifiy
...@@ -532,21 +533,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -532,21 +533,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* qoSPriorityLevel */ /* qoSPriorityLevel */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = (long *)calloc(1, sizeof(long));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->qoSPriorityLevel = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->averagingWindow = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.non_Dynamic_5QI->maxDataBurstVolume = 1L;
} }
} else { } else {
...@@ -566,21 +567,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -566,21 +567,21 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* delayCritical */ /* delayCritical */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = (long *)calloc(1, sizeof(long));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->delayCritical = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* averagingWindow */ /* averagingWindow */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = (F1AP_AveragingWindow_t *)calloc(1, sizeof(F1AP_AveragingWindow_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->averagingWindow = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxDataBurstVolume */ /* maxDataBurstVolume */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = (F1AP_MaxDataBurstVolume_t *)calloc(1, sizeof(F1AP_MaxDataBurstVolume_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.qoS_Characteristics.choice.dynamic_5QI->maxDataBurstVolume = 1L;
} }
} // if some_decide_qoS_characteristics } // if some_decide_qoS_characteristics
...@@ -607,14 +608,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -607,14 +608,14 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* maxPacketLossRateDownlink */ /* maxPacketLossRateDownlink */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateDownlink = 1L;
} }
/* OPTIONAL */ /* OPTIONAL */
/* maxPacketLossRateUplink */ /* maxPacketLossRateUplink */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink = (F1AP_MaxPacketLossRate_t *)calloc(1, sizeof(F1AP_MaxPacketLossRate_t));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.gBR_QoS_Flow_Information->maxPacketLossRateUplink = 1L;
} }
} }
...@@ -623,7 +624,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance, ...@@ -623,7 +624,7 @@ int CU_send_UE_CONTEXT_SETUP_REQUEST(instance_t instance,
/* reflective_QoS_Attribute */ /* reflective_QoS_Attribute */
if (0) { if (0) {
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long)); flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.reflective_QoS_Attribute = (long *)calloc(1, sizeof(long));
flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.reflective_QoS_Attribute = 1L; *flows_mapped_to_drb_item.qoSFlowLevelQoSParameters.reflective_QoS_Attribute = 1L;
} }
} // qoSFlowLevelQoSParameters } // qoSFlowLevelQoSParameters
......
...@@ -174,7 +174,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -174,7 +174,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
//MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity); //MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity);
NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity); NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity);
LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",f1ap_du_data->nr_cellid[i], LOG_D(DU_F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n",(long long unsigned int)f1ap_du_data->nr_cellid[i],
nRCGI.nRCellIdentity.buf[0], nRCGI.nRCellIdentity.buf[0],
nRCGI.nRCellIdentity.buf[1], nRCGI.nRCellIdentity.buf[1],
nRCGI.nRCellIdentity.buf[2], nRCGI.nRCellIdentity.buf[2],
...@@ -188,7 +188,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -188,7 +188,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
/* - fiveGS_TAC */ /* - fiveGS_TAC */
OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC, OCTET_STRING_fromBuf(&served_cell_information.fiveGS_TAC,
&f1ap_du_data->tac[i], (const char*)&f1ap_du_data->tac[i],
3); 3);
/* - Configured_EPS_TAC */ /* - Configured_EPS_TAC */
...@@ -379,11 +379,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { ...@@ -379,11 +379,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t)); F1AP_GNB_DU_System_Information_t *gNB_DU_System_Information = (F1AP_GNB_DU_System_Information_t *)calloc(1, sizeof(F1AP_GNB_DU_System_Information_t));
OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->mIB_message, // sept. 2018
f1ap_du_data->mib[i],//f1ap_du_data->mib, (const char*)f1ap_du_data->mib[i],//f1ap_du_data->mib,
f1ap_du_data->mib_length[i]); f1ap_du_data->mib_length[i]);
OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018 OCTET_STRING_fromBuf(&gNB_DU_System_Information->sIB1_message, // sept. 2018
f1ap_du_data->sib1[i], (const char*)f1ap_du_data->sib1[i],
f1ap_du_data->sib1_length[i]); f1ap_du_data->sib1_length[i]);
gnb_du_served_cells_item.gNB_DU_System_Information = gNB_DU_System_Information; // gnb_du_served_cells_item.gNB_DU_System_Information = gNB_DU_System_Information; //
......
...@@ -175,153 +175,208 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance, ...@@ -175,153 +175,208 @@ int DU_handle_DL_RRC_MESSAGE_TRANSFER(instance_t instance,
// decode RRC Container and act on the message type // decode RRC Container and act on the message type
AssertFatal(srb_id<3,"illegal srb_id\n"); AssertFatal(srb_id<3,"illegal srb_id\n");
protocol_ctxt_t ctxt;
ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id);
ctxt.module_id = instance;
ctxt.instance = instance;
ctxt.enb_flag = 1;
if (srb_id == 0) { if (srb_id == 0) {
DL_CCCH_Message_t* dl_ccch_msg=NULL; DL_CCCH_Message_t* dl_ccch_msg=NULL;
asn_dec_rval_t dec_rval; asn_dec_rval_t dec_rval;
dec_rval = uper_decode(NULL, dec_rval = uper_decode(NULL,
&asn_DEF_DL_CCCH_Message, &asn_DEF_DL_CCCH_Message,
(void**)&dl_ccch_msg, (void**)&dl_ccch_msg,
ie->value.choice.RRCContainer.buf, ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len,0,0); rrc_dl_sdu_len,0,0);
switch (dl_ccch_msg->message.choice.c1.present) { switch (dl_ccch_msg->message.choice.c1.present) {
case DL_CCCH_MessageType__c1_PR_NOTHING: case DL_CCCH_MessageType__c1_PR_NOTHING:
LOG_I(RRC, "Received PR_NOTHING on DL-CCCH-Message\n"); LOG_I(RRC, "Received PR_NOTHING on DL-CCCH-Message\n");
break; break;
case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment: case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishment:
LOG_I(RRC, LOG_I(RRC,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n"); "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishment\n");
break; break;
case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject: case DL_CCCH_MessageType__c1_PR_rrcConnectionReestablishmentReject:
LOG_I(RRC, LOG_I(RRC,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n"); "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReestablishmentReject\n");
break; break;
case DL_CCCH_MessageType__c1_PR_rrcConnectionReject: case DL_CCCH_MessageType__c1_PR_rrcConnectionReject:
LOG_I(RRC, LOG_I(RRC,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n"); "Logical Channel DL-CCCH (SRB0), Received RRCConnectionReject \n");
break; break;
case DL_CCCH_MessageType__c1_PR_rrcConnectionSetup: case DL_CCCH_MessageType__c1_PR_rrcConnectionSetup:
{ {
LOG_I(RRC, LOG_I(RRC,
"Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %x/RNTI %x\n", "Logical Channel DL-CCCH (SRB0), Received RRCConnectionSetup DU_ID %x/RNTI %x\n",
du_ue_f1ap_id, du_ue_f1ap_id,
f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id)); f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id));
// Get configuration // Get configuration
RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup; RRCConnectionSetup_t* rrcConnectionSetup = &dl_ccch_msg->message.choice.c1.choice.rrcConnectionSetup;
// eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context; // eNB_RRC_UE_t *ue_p = &ue_context_pP->ue_context;
AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n"); AssertFatal(rrcConnectionSetup!=NULL,"rrcConnectionSetup is null\n");
RadioResourceConfigDedicated_t* radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated; RadioResourceConfigDedicated_t* radioResourceConfigDedicated = &rrcConnectionSetup->criticalExtensions.choice.c1.choice.rrcConnectionSetup_r8.radioResourceConfigDedicated;
// get SRB logical channel information // get SRB logical channel information
SRB_ToAddModList_t *SRB_configList; SRB_ToAddModList_t *SRB_configList;
SRB_ToAddMod_t *SRB1_config; SRB_ToAddMod_t *SRB1_config;
LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig; LogicalChannelConfig_t *SRB1_logicalChannelConfig; //,*SRB2_logicalChannelConfig;
SRB_configList = radioResourceConfigDedicated->srb_ToAddModList; SRB_configList = radioResourceConfigDedicated->srb_ToAddModList;
AssertFatal(SRB_configList!=NULL,"SRB_configList is null\n"); AssertFatal(SRB_configList!=NULL,"SRB_configList is null\n");
for (int cnt = 0; cnt < (SRB_configList)->list.count; cnt++) { for (int cnt = 0; cnt < (SRB_configList)->list.count; cnt++) {
if ((SRB_configList)->list.array[cnt]->srb_Identity == 1) { if ((SRB_configList)->list.array[cnt]->srb_Identity == 1) {
SRB1_config = (SRB_configList)->list.array[cnt]; SRB1_config = (SRB_configList)->list.array[cnt];
if (SRB1_config->logicalChannelConfig) { if (SRB1_config->logicalChannelConfig) {
if (SRB1_config->logicalChannelConfig->present == if (SRB1_config->logicalChannelConfig->present ==
SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) { SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue; SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
} else { } else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue; SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
} }
} else { } else {
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue; SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
} }
}
} // for
} rrc_rlc_config_asn1_req(&ctxt,
} SRB_configList,
(DRB_ToAddModList_t*) NULL,
protocol_ctxt_t ctxt; (DRB_ToReleaseList_t*) NULL
ctxt.rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[instance],du_ue_f1ap_id);
ctxt.module_id = instance;
ctxt.enb_flag = 1;
rrc_rlc_config_asn1_req(&ctxt,
SRB_configList,
(DRB_ToAddModList_t*) NULL,
(DRB_ToReleaseList_t*) NULL
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, (PMCH_InfoList_r9_t *) NULL, , (PMCH_InfoList_r9_t *) NULL,
0,0 0,0
# endif # endif
); );
// This should be somewhere in the f1ap_cudu_ue_inst_t // This should be somewhere in the f1ap_cudu_ue_inst_t
int macrlc_instance = 0; int macrlc_instance = 0;
rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[0],du_ue_f1ap_id); rnti_t rnti = f1ap_get_rnti_by_du_id(&f1ap_du_ue[0],du_ue_f1ap_id);
struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti); struct rrc_eNB_ue_context_s *ue_context_p = rrc_eNB_get_ue_context(RC.rrc[macrlc_instance],rnti);
eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context; eNB_RRC_UE_t *ue_p = &ue_context_p->ue_context;
AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n"); AssertFatal(ue_p->Srb0.Active == 1,"SRB0 is not active\n");
memcpy((void*)ue_p->Srb0.Tx_buffer.Payload, memcpy((void*)ue_p->Srb0.Tx_buffer.Payload,
(void*)ie->value.choice.RRCContainer.buf, (void*)ie->value.choice.RRCContainer.buf,
rrc_dl_sdu_len); rrc_dl_sdu_len);
ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len; ue_p->Srb0.Tx_buffer.payload_size = rrc_dl_sdu_len;
rrc_mac_config_req_eNB( rrc_mac_config_req_eNB(
macrlc_instance, macrlc_instance,
0, //primaryCC_id, 0, //primaryCC_id,
0,0,0,0,0, 0,0,0,0,0,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
0, 0,
#endif #endif
rnti, rnti,
(BCCH_BCH_Message_t *) NULL, (BCCH_BCH_Message_t *) NULL,
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
(RadioResourceConfigCommonSIB_t *) NULL, (RadioResourceConfigCommonSIB_t *) NULL,
#endif #endif
radioResourceConfigDedicated->physicalConfigDedicated, radioResourceConfigDedicated->physicalConfigDedicated,
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
(SCellToAddMod_r10_t *)NULL, (SCellToAddMod_r10_t *)NULL,
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL, //(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
#endif #endif
(MeasObjectToAddMod_t **) NULL, (MeasObjectToAddMod_t **) NULL,
radioResourceConfigDedicated->mac_MainConfig, radioResourceConfigDedicated->mac_MainConfig,
1, 1,
SRB1_logicalChannelConfig, SRB1_logicalChannelConfig,
NULL, // measGapConfig, NULL, // measGapConfig,
(TDD_Config_t *) NULL, (TDD_Config_t *) NULL,
NULL, NULL,
(SchedulingInfoList_t *) NULL, (SchedulingInfoList_t *) NULL,
0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL 0, NULL, NULL, (MBSFN_SubframeConfigList_t *) NULL
#if (RRC_VERSION >= MAKE_VERSION(9, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
, 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL , 0, (MBSFN_AreaInfoList_r9_t *) NULL, (PMCH_InfoList_r9_t *) NULL
#endif #endif
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
, ,
(SystemInformationBlockType1_v1310_IEs_t *)NULL (SystemInformationBlockType1_v1310_IEs_t *)NULL
#endif #endif
); );
break; break;
} // case
default:
AssertFatal(1==0,
"Unknown message\n");
break;
}
}
}
else if (srb_id == 1){
} default:
AssertFatal(1==0,
else if (srb_id == 2){ "Unknown message\n");
break;
}// switch case
} else if (srb_id == 1) {
// rrc_rlc_config_asn1_req(&ctxt,
// SRB_configList,
// (DRB_ToAddModList_t*) NULL,
// (DRB_ToReleaseList_t*) NULL
// #if (RRC_VERSION >= MAKE_VERSION(9, 0, 0))
// , (PMCH_InfoList_r9_t *) NULL,
// 0,0
// # endif
// );
LOG_I(DU_F1AP, "Received DL RRC Transfer on srb_id 1\n");
rlc_op_status_t rlc_status;
boolean_t ret = TRUE;
mem_block_t *pdcp_pdu_p = NULL;
pdcp_pdu_p = get_free_mem_block(rrc_dl_sdu_len, __func__);
memset(&pdcp_pdu_p->data[0], 0, rrc_dl_sdu_len);
memcpy(&pdcp_pdu_p->data[0], ie->value.choice.RRCContainer.buf, rrc_dl_sdu_len);
if (pdcp_pdu_p != NULL) {
rlc_status = rlc_data_req(&ctxt
, 1
, MBMS_FLAG_NO
, srb_id
, 0
, 0
, rrc_dl_sdu_len
, pdcp_pdu_p
#ifdef Rel14
,NULL
,NULL
#endif
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=TRUE;
break;
case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= FALSE;
break;
case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= FALSE;
break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE;
break;
default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= FALSE;
break;
} // switch case
return ret;
} // if pdcp_pdu_p
} else if (srb_id == 2) {
} }
#endif #endif
...@@ -336,7 +391,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, ...@@ -336,7 +391,6 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP,
) { ) {
rnti_t rnti = ctxt_pP->rnti; rnti_t rnti = ctxt_pP->rnti;
F1AP_F1AP_PDU_t pdu; F1AP_F1AP_PDU_t pdu;
...@@ -402,6 +456,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP, ...@@ -402,6 +456,7 @@ int DU_send_UL_RRC_MESSAGE_TRANSFER(const protocol_ctxt_t* const ctxt_pP,
LOG_E(DU_F1AP, "Failed to encode F1 setup request\n"); LOG_E(DU_F1AP, "Failed to encode F1 setup request\n");
return -1; return -1;
} }
LOG_W(DU_F1AP, "DU_send_UL_RRC_MESSAGE_TRANSFER on SRB %d for UE %x \n", rb_idP, rnti);
du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id); du_f1ap_itti_send_sctp_data_req(instance, f1ap_du_data->assoc_id, buffer, len, f1ap_du_data->default_sctp_stream_id);
return 0; return 0;
......
...@@ -34,6 +34,9 @@ ...@@ -34,6 +34,9 @@
#include "f1ap_handlers.h" #include "f1ap_handlers.h"
#include "f1ap_du_interface_management.h" #include "f1ap_du_interface_management.h"
#include "f1ap_du_task.h" #include "f1ap_du_task.h"
#include "proto_agent.h"
extern RAN_CONTEXT_t RC;
f1ap_setup_req_t *f1ap_du_data; f1ap_setup_req_t *f1ap_du_data;
...@@ -95,6 +98,15 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat ...@@ -95,6 +98,15 @@ void du_task_handle_sctp_association_resp(instance_t instance, sctp_new_associat
f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams; f1ap_du_data->sctp_out_streams = sctp_new_association_resp->out_streams;
f1ap_du_data->default_sctp_stream_id = 0; f1ap_du_data->default_sctp_stream_id = 0;
/* setup parameters for F1U and start the server */
const cudu_params_t params = {
.local_ipv4_address = RC.mac[instance]->eth_params_n.my_addr,
.local_port = RC.mac[instance]->eth_params_n.my_portd,
.remote_ipv4_address = RC.mac[instance]->eth_params_n.remote_addr,
.remote_port = RC.mac[instance]->eth_params_n.remote_portd
};
AssertFatal(proto_agent_start(instance, &params) == 0,
"could not start PROTO_AGENT for F1U on instance %d!\n", instance);
DU_send_F1_SETUP_REQUEST(instance); DU_send_F1_SETUP_REQUEST(instance);
} }
...@@ -162,8 +174,9 @@ void *F1AP_DU_task(void *arg) { ...@@ -162,8 +174,9 @@ void *F1AP_DU_task(void *arg) {
case F1AP_UL_RRC_MESSAGE: // from rrc case F1AP_UL_RRC_MESSAGE: // from rrc
LOG_I(DU_F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n"); LOG_I(DU_F1AP, "DU Task Received F1AP_UL_RRC_MESSAGE\n");
DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg), AssertFatal (1 == 0, "Should not be here!\n" );
&F1AP_UL_RRC_MESSAGE(received_msg)); //DU_send_UL_RRC_MESSAGE_TRANSFER(ITTI_MESSAGE_GET_INSTANCE(received_msg),
// &F1AP_UL_RRC_MESSAGE(received_msg));
break; break;
case TERMINATE_MESSAGE: case TERMINATE_MESSAGE:
......
...@@ -119,7 +119,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream, ...@@ -119,7 +119,7 @@ int f1ap_handle_message(instance_t instance, uint32_t assoc_id, int32_t stream,
} }
/* Calling the right handler */ /* Calling the right handler */
LOG_I(DU_F1AP, "Calling handler with instance %d\n",instance); LOG_I(F1AP, "Calling handler with instance %d\n",instance);
ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1]) ret = (*f1ap_messages_callback[pdu.choice.initiatingMessage->procedureCode][pdu.present - 1])
(instance, assoc_id, stream, &pdu); (instance, assoc_id, stream, &pdu);
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_F1AP_F1AP_PDU, &pdu);
......
...@@ -49,9 +49,7 @@ ...@@ -49,9 +49,7 @@
#include "platform_constants.h" #include "platform_constants.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "msc.h" #include "msc.h"
#include "common/ngran_types.h"
#if defined(ENABLE_SECURITY) #if defined(ENABLE_SECURITY)
# include "UTIL/OSA/osa_defs.h" # include "UTIL/OSA/osa_defs.h"
...@@ -189,11 +187,23 @@ boolean_t pdcp_data_req( ...@@ -189,11 +187,23 @@ boolean_t pdcp_data_req(
(unsigned char*)&pdcp_pdu_p->data[0], (unsigned char*)&pdcp_pdu_p->data[0],
sdu_buffer_sizeP); sdu_buffer_sizeP);
#endif #endif
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP, confirmP, sdu_buffer_sizeP, pdcp_pdu_p if (RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB_CU
|| RC.rrc[ctxt_pP->module_id]->node_type == ngran_ng_eNB_CU
|| RC.rrc[ctxt_pP->module_id]->node_type == ngran_gNB_CU) {
/* currently, there is no support to send also the source/destinationL2Id */
proto_agent_send_rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
confirmP, sdu_buffer_sizeP, pdcp_pdu_p);
/* assume good status */
rlc_status = RLC_OP_STATUS_OK;
} else {
rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_YES, rb_idP, muiP,
confirmP, sdu_buffer_sizeP, pdcp_pdu_p
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,NULL, NULL ,NULL, NULL
#endif #endif
); );
}
} else { } else {
rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES; rlc_status = RLC_OP_STATUS_OUT_OF_RESSOURCES;
LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n", LOG_W(PDCP,PROTOCOL_CTXT_FMT" PDCP_DATA_REQ SDU DROPPED, OUT OF MEMORY \n",
...@@ -377,72 +387,97 @@ boolean_t pdcp_data_req( ...@@ -377,72 +387,97 @@ boolean_t pdcp_data_req(
#ifndef UETARGET #ifndef UETARGET
if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1)) if ((pdcp_pdu_p!=NULL) && (srb_flagP == 0) && (ctxt_pP->enb_flag == 1))
{ {
if (RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB_CU
|| RC.rrc[ctxt_pP->module_id]->node_type == ngran_ng_eNB_CU
|| RC.rrc[ctxt_pP->module_id]->node_type == ngran_gNB_CU) {
/* currently, there is no support to send also the source/destinationL2Id */
proto_agent_send_rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
confirmP, pdcp_pdu_size, pdcp_pdu_p);
/* assume good status */
rlc_status = RLC_OP_STATUS_OK;
} else {
{ rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP,
LOG_E(PDCP, "proto_agent_send_rlc_data_req()\n"); confirmP, pdcp_pdu_size, pdcp_pdu_p
{
//proto_agent_send_rlc_data_req(0,cudu->cu[j].du_type, ctxt_pP, srb_flagP,
//MBMS_FLAG_NO,rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p);
}
//rlc_status = rlc_data_req(ctxt_pP, srb_flagP, MBMS_FLAG_NO, rb_idP, muiP, confirmP, pdcp_pdu_size, pdcp_pdu_p
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
//,sourceL2Id ,sourceL2Id
//,destinationL2Id ,destinationL2Id
#endif #endif
//); );
} /* end if node_type is CU */
}
free_mem_block(pdcp_pdu_p, __FUNCTION__); free_mem_block(pdcp_pdu_p, __FUNCTION__);
rlc_status = ack_result; rlc_status = ack_result;
} }
else // SRB
else
#endif /*UETARGET*/ #endif /*UETARGET*/
{ {
//It should never get here LOG_I(PDCP, "Sending F1AP_DL_RRC_MESSAGE with ITTI\n");
rlc_status = rlc_data_req(ctxt_pP
, srb_flagP
, MBMS_FLAG_NO
, rb_idP
, muiP
, confirmP
, pdcp_pdu_size
, pdcp_pdu_p
#ifdef Rel14
,NULL
,NULL
#endif
);
}
} //It should never get here
if ((RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB_CU) ||
switch (rlc_status) { (RC.rrc[ctxt_pP->module_id]->node_type == ngran_ng_eNB_CU)||
case RLC_OP_STATUS_OK: (RC.rrc[ctxt_pP->module_id]->node_type == ngran_gNB_CU) ) {
LOG_D(PDCP, "Data sending request over RLC succeeded!\n"); // DL transfer
ret=TRUE; MessageDef *message_p;
break; // Note: the acyual task must be TASK_PDCP_ENB, but this task is not created
message_p = itti_alloc_new_message (TASK_PDCP_ENB, F1AP_DL_RRC_MESSAGE);
F1AP_DL_RRC_MESSAGE (message_p).rrc_container = &pdcp_pdu_p->data[0] ;
F1AP_DL_RRC_MESSAGE (message_p).rrc_container_length = pdcp_pdu_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 = ctxt_pP->rnti;
F1AP_DL_RRC_MESSAGE (message_p).srb_id = rb_idP;
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);
//CU_send_DL_RRC_MESSAGE_TRANSFER(ctxt_pP->module_id, message_p);
LOG_I(PDCP, "Send F1AP_DL_RRC_MESSAGE with ITTI\n");
ret=TRUE;
} else{
rlc_status = rlc_data_req(ctxt_pP
, srb_flagP
, MBMS_FLAG_NO
, rb_idP
, muiP
, confirmP
, pdcp_pdu_size
, pdcp_pdu_p
#ifdef Rel14
,NULL
,NULL
#endif
);
switch (rlc_status) {
case RLC_OP_STATUS_OK:
LOG_D(PDCP, "Data sending request over RLC succeeded!\n");
ret=TRUE;
break;
case RLC_OP_STATUS_BAD_PARAMETER: case RLC_OP_STATUS_BAD_PARAMETER:
LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Bad Parameter' reason!\n");
ret= FALSE; ret= FALSE;
break; break;
case RLC_OP_STATUS_INTERNAL_ERROR: case RLC_OP_STATUS_INTERNAL_ERROR:
LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Internal Error' reason!\n");
ret= FALSE; ret= FALSE;
break; break;
case RLC_OP_STATUS_OUT_OF_RESSOURCES: case RLC_OP_STATUS_OUT_OF_RESSOURCES:
LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n"); LOG_W(PDCP, "Data sending request over RLC failed with 'Out of Resources' reason!\n");
ret= FALSE; ret= FALSE;
break; break;
default: default:
LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status); LOG_W(PDCP, "RLC returned an unknown status code after PDCP placed the order to send some data (Status Code:%d)\n", rlc_status);
ret= FALSE; ret= FALSE;
break; break;
} // switch case
}
}
} }
if (ctxt_pP->enb_flag == ENB_FLAG_YES) { if (ctxt_pP->enb_flag == ENB_FLAG_YES) {
...@@ -963,6 +998,8 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){ ...@@ -963,6 +998,8 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){
} }
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
pdcp_run ( pdcp_run (
...@@ -1005,6 +1042,7 @@ pdcp_run ( ...@@ -1005,6 +1042,7 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).frame, RRC_DCCH_DATA_REQ (msg_p).frame,
0, 0,
RRC_DCCH_DATA_REQ (msg_p).eNB_index); RRC_DCCH_DATA_REQ (msg_p).eNB_index);
LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n", LOG_I(PDCP, PROTOCOL_CTXT_FMT"Received %s from %s: instance %d, rb_id %d, muiP %d, confirmP %d, mode %d\n",
PROTOCOL_CTXT_ARGS(&ctxt), PROTOCOL_CTXT_ARGS(&ctxt),
ITTI_MSG_NAME (msg_p), ITTI_MSG_NAME (msg_p),
...@@ -1015,6 +1053,8 @@ pdcp_run ( ...@@ -1015,6 +1053,8 @@ pdcp_run (
RRC_DCCH_DATA_REQ (msg_p).confirmp, RRC_DCCH_DATA_REQ (msg_p).confirmp,
RRC_DCCH_DATA_REQ (msg_p).mode); RRC_DCCH_DATA_REQ (msg_p).mode);
log_dump(PDCP, RRC_DCCH_DATA_REQ (msg_p).sdu_p, RRC_DCCH_DATA_REQ (msg_p).sdu_size, LOG_DUMP_CHAR,"[MSG] pdcp run\n");
result = pdcp_data_req (&ctxt, result = pdcp_data_req (&ctxt,
SRB_FLAG_YES, SRB_FLAG_YES,
RRC_DCCH_DATA_REQ (msg_p).rb_id, RRC_DCCH_DATA_REQ (msg_p).rb_id,
......
...@@ -51,7 +51,6 @@ void close_proto_agent(void) ...@@ -51,7 +51,6 @@ void close_proto_agent(void)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
const cudu_params_t params = { const cudu_params_t params = {
.local_interface = "lo",
.local_ipv4_address = "192.168.12.45", .local_ipv4_address = "192.168.12.45",
.local_port = 6464, .local_port = 6464,
.remote_ipv4_address = "192.168.12.45", .remote_ipv4_address = "192.168.12.45",
......
...@@ -52,7 +52,6 @@ void close_proto_agent(void) ...@@ -52,7 +52,6 @@ void close_proto_agent(void)
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
const cudu_params_t params = { const cudu_params_t params = {
.local_interface = "lo",
.local_ipv4_address = "192.168.12.45", .local_ipv4_address = "192.168.12.45",
.local_port = 6465, .local_port = 6465,
.remote_ipv4_address = "192.168.12.45", .remote_ipv4_address = "192.168.12.45",
......
...@@ -59,7 +59,6 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p) ...@@ -59,7 +59,6 @@ int proto_agent_start(mod_id_t mod_id, const cudu_params_t *p)
{ {
int channel_id; int channel_id;
DevAssert(p->local_interface);
DevAssert(p->local_ipv4_address); DevAssert(p->local_ipv4_address);
DevAssert(p->local_port > 1024); // "unprivileged" port DevAssert(p->local_port > 1024); // "unprivileged" port
DevAssert(p->remote_ipv4_address); DevAssert(p->remote_ipv4_address);
......
...@@ -54,68 +54,7 @@ extern boolean_t pdcp_data_ind( ...@@ -54,68 +54,7 @@ extern boolean_t pdcp_data_ind(
#include "rlc_proto_agent_primitives.h" #include "proto_agent.h"
// PROTO AGENT
#ifndef UETARGET
void
async_server_thread_init (void)
{
//create log_list
//log_list_init(&log_list);
//AssertFatal(0, "this should not be reached!\n");
async_server_shutdown = 0;
if ((pthread_mutex_init (&async_server_lock, NULL) != 0)
|| (pthread_cond_init (&async_server_notify, NULL) != 0)) {
return;
}
//if (pthread_create (&async_server_thread, NULL, proto_server_init, (void*) NULL)
// != 0) {
// async_server_thread_finalize();
// return;
//}
}
int
async_server_thread_finalize (void)
{
int err = 0;
if (pthread_mutex_lock (&async_server_lock) != 0) {
return -1;
}
async_server_shutdown = 1;
/* Wake up LOG thread */
if ((pthread_cond_broadcast (&async_server_notify) != 0)
|| (pthread_mutex_unlock (&async_server_lock) != 0)) {
err = -1;
}
if (pthread_join (async_server_thread, NULL) != 0) {
err = -1;
}
if (pthread_mutex_unlock (&async_server_lock) != 0) {
err = -1;
}
if (!err) {
//log_list_free(&log_list);
pthread_mutex_lock (&async_server_lock);
pthread_mutex_destroy (&async_server_lock);
pthread_cond_destroy (&async_server_notify);
}
return err;
}
#endif /*UETARGET*/
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
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)
...@@ -680,24 +619,13 @@ void rlc_data_ind ( ...@@ -680,24 +619,13 @@ void rlc_data_ind (
T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP)); T(T_ENB_RLC_UL, T_INT(ctxt_pP->module_id), T_INT(ctxt_pP->rnti), T_INT(rb_idP), T_INT(sdu_sizeP));
#endif #endif
#ifndef UETARGET #ifndef UETARGET
if ((!srb_flagP) && (ctxt_pP->enb_flag == 1)) if (ctxt_pP->enb_flag == 1)
{ {
proto_agent_send_pdcp_data_ind(ctxt_pP,
srb_flagP,
MBMS_flagP,
rb_idP,
sdu_sizeP,
sdu_pP);
}
else
{
switch (RC.rrc[ctxt_pP->module_id]->node_type){ switch (RC.rrc[ctxt_pP->module_id]->node_type){
case ngran_eNB_CU : case ngran_eNB_CU :
case ngran_ng_eNB_CU : case ngran_ng_eNB_CU :
case ngran_gNB_CU : case ngran_gNB_CU :
pdcp_data_ind ( proto_agent_send_pdcp_data_ind (
ctxt_pP, ctxt_pP,
1, // srb_flagP, 1, // srb_flagP,
0, // MBMS_flagP, 0, // MBMS_flagP,
...@@ -804,19 +732,6 @@ rlc_module_init (void) ...@@ -804,19 +732,6 @@ rlc_module_init (void)
pool_buffer_init(); pool_buffer_init();
/*
#ifndef UETARGET
// Launch the RLC listening server
// as a separate thread
static int started = 0;
if (started == 0)
{
async_server_thread_init();
started = 1;
}
#endif
*/
return(0); return(0);
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
...@@ -682,14 +682,4 @@ int rlc_module_init(void); ...@@ -682,14 +682,4 @@ int rlc_module_init(void);
#define RLC_REVERSE_VIDEO "\e[7m" #define RLC_REVERSE_VIDEO "\e[7m"
#define RLC_NORMAL_VIDEO "\e[27m" #define RLC_NORMAL_VIDEO "\e[27m"
// PROTO AGENT
pthread_t async_server_thread;
int async_server_thread_finalize (void);
void async_server_thread_init (void);
#endif #endif
...@@ -260,12 +260,12 @@ void mac_rlc_data_ind ( ...@@ -260,12 +260,12 @@ void mac_rlc_data_ind (
#ifdef DEBUG_MAC_INTERFACE #ifdef DEBUG_MAC_INTERFACE
if (num_tbP) { if (num_tbP) {
LOG_I(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_IND on channel %d (%d), rb max %d, Num_tb %d\n", LOG_I(RLC, PROTOCOL_CTXT_FMT" MAC_RLC_DATA_IND on channel %d (%d), rb max %d, tb_sizeP %d\n",
PROTOCOL_CTXT_ARGS(&ctxt), PROTOCOL_CTXT_ARGS(&ctxt),
channel_idP, channel_idP,
RLC_MAX_LC, RLC_MAX_LC,
NB_RB_MAX, NB_RB_MAX,
num_tbP); tb_sizeP);
} }
#endif // DEBUG_MAC_INTERFACE #endif // DEBUG_MAC_INTERFACE
......
...@@ -94,6 +94,8 @@ rrc_data_req( ...@@ -94,6 +94,8 @@ rrc_data_req(
RRC_DCCH_DATA_REQ (message_p).confirmp = confirmP; RRC_DCCH_DATA_REQ (message_p).confirmp = confirmP;
RRC_DCCH_DATA_REQ (message_p).sdu_size = sdu_sizeP; RRC_DCCH_DATA_REQ (message_p).sdu_size = sdu_sizeP;
RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer; RRC_DCCH_DATA_REQ (message_p).sdu_p = message_buffer;
//memcpy (RRC_DCCH_DATA_REQ (message_p).sdu_p, buffer_pP, sdu_sizeP);
RRC_DCCH_DATA_REQ (message_p).mode = modeP; RRC_DCCH_DATA_REQ (message_p).mode = modeP;
RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id; RRC_DCCH_DATA_REQ (message_p).module_id = ctxt_pP->module_id;
RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti; RRC_DCCH_DATA_REQ (message_p).rnti = ctxt_pP->rnti;
...@@ -103,6 +105,10 @@ rrc_data_req( ...@@ -103,6 +105,10 @@ rrc_data_req(
ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE, ctxt_pP->enb_flag ? TASK_PDCP_ENB : TASK_PDCP_UE,
ctxt_pP->instance, ctxt_pP->instance,
message_p); message_p);
LOG_I(RRC,"sent RRC_DCCH_DATA_REQ to TASK_PDCP_ENB\n");
// RS/BK: Fix ME
pdcp_run(ctxt_pP);
return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway. return TRUE; // TODO should be changed to a CNF message later, currently RRC lite does not used the returned value anyway.
} }
......
...@@ -1173,8 +1173,10 @@ rrc_eNB_generate_SecurityModeCommand( ...@@ -1173,8 +1173,10 @@ rrc_eNB_generate_SecurityModeCommand(
rrc_eNB_mui, rrc_eNB_mui,
size); size);
if ((RC.rrc[ctxt_pP->module_id]->node_type == ngran_eNB) || if ((RC.rrc[ctxt_pP->module_id]->node_type != ngran_eNB_DU) ||
(RC.rrc[ctxt_pP->module_id]->node_type == ngran_ng_eNB)) { (RC.rrc[ctxt_pP->module_id]->node_type != ngran_gNB_DU)) {
LOG_I(RRC,"calling rrc_data_req :securityModeCommand\n");
rrc_data_req( rrc_data_req(
ctxt_pP, ctxt_pP,
DCCH, DCCH,
......
...@@ -923,7 +923,6 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS( ...@@ -923,7 +923,6 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer); S1AP_DOWNLINK_NAS (msg_p).nas_pdu.buffer);
LOG_DUMPMSG(RRC,DEBUG_RRC,buffer,length,"[MSG] RRC DL Information Transfer\n"); LOG_DUMPMSG(RRC,DEBUG_RRC,buffer,length,"[MSG] RRC DL Information Transfer\n");
/* /*
* switch UL or DL NAS message without RRC piggybacked to SRB2 if active. * switch UL or DL NAS message without RRC piggybacked to SRB2 if active.
*/ */
......
...@@ -85,6 +85,10 @@ int create_tasks(uint32_t enb_nb) ...@@ -85,6 +85,10 @@ int create_tasks(uint32_t enb_nb)
if (enb_nb > 0) { if (enb_nb > 0) {
rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL); rc = itti_create_task(TASK_CU_F1, F1AP_CU_task, NULL);
AssertFatal(rc >= 0, "Create task for CU F1AP failed\n"); AssertFatal(rc >= 0, "Create task for CU F1AP failed\n");
//RS/BK: Fix me!
rc = itti_create_task (TASK_L2L1, l2l1_task, NULL);
AssertFatal(rc >= 0, "Create task for L2L1 failed\n");
} }
/* fall through */ /* fall through */
case ngran_eNB: case ngran_eNB:
......
...@@ -13,9 +13,9 @@ eNBs = ...@@ -13,9 +13,9 @@ eNBs =
// Tracking area code, 0x0000 and 0xfffe are reserved values // Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1"; tracking_area_code = "1";
mobile_country_code = "208"; mobile_country_code = "001";
mobile_network_code = "93"; mobile_network_code = "01";
nr_cellid = 12345678L nr_cellid = 12345678L
...@@ -60,9 +60,9 @@ MACRLCs = ( ...@@ -60,9 +60,9 @@ MACRLCs = (
num_cc = 1; num_cc = 1;
tr_s_preference = "local_L1"; tr_s_preference = "local_L1";
tr_n_preference = "f1"; tr_n_preference = "f1";
local_n_if_name = "lo"; local_n_if_name = "vlan203";
remote_n_address = "127.0.0.2"; remote_n_address = "192.168.203.16";
local_n_address = "127.0.0.1"; local_n_address = "192.168.203.242";
local_n_portc = 60000; local_n_portc = 60000;
remote_n_portc = 60001; remote_n_portc = 60001;
local_n_portd = 60010; local_n_portd = 60010;
...@@ -79,13 +79,13 @@ L1s = ( ...@@ -79,13 +79,13 @@ L1s = (
RUs = ( RUs = (
{ {
local_if_name = "lo"; local_if_name = "enp4s0f1";
remote_address = "127.0.0.2"; local_address = "192.168.41.3";
local_address = "127.0.0.1"; remote_address = "192.168.41.1";
local_portc = 50000; local_portc = 50000;
remote_portc = 50000; remote_portc = 50000;
local_portd = 50001; local_portd = 50001;
remote_portd = 50001; remote_portd = 50001;
local_rf = "no" local_rf = "no"
tr_preference = "udp_if4p5" tr_preference = "udp_if4p5"
nb_tx = 1 nb_tx = 1
......
...@@ -1082,6 +1082,16 @@ int main( int argc, char **argv ) ...@@ -1082,6 +1082,16 @@ int main( int argc, char **argv )
RCconfig_L1(); RCconfig_L1();
} }
if (RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU) {
protocol_ctxt_t ctxt;
ctxt.module_id = 0 ;
ctxt.instance = 0;
ctxt.rnti = 0;
ctxt.enb_flag = 1;
pdcp_run(&ctxt);
}
/* start threads if only L1 or not a CU */ /* start threads if only L1 or not a CU */
if (RC.nb_inst == 0 || if (RC.nb_inst == 0 ||
!(RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU)) { !(RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU)) {
......
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