Commit 3dc0e4dd authored by Navid Nikaein's avatar Navid Nikaein

* route DlInformationTransfer to SRB2 if it is active

* configure dedicated DRBs based on the transaction id
* fix the issue in oaisim to work with S1 interface
parent 956dfa09
#!/bin/sh
echo "building ctags for openair1 and openair2 ..."
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 targets
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets common
......@@ -1093,7 +1093,7 @@ rrc_pdcp_config_asn1_req (
srb_id = srb2add_list_pP->list.array[cnt]->srb_Identity;
srb_toaddmod_p = srb2add_list_pP->list.array[cnt];
rlc_type = RLC_MODE_AM;
lc_id = srb_id + 2;
lc_id = srb_id;// + 2;
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_YES);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
......@@ -1429,13 +1429,14 @@ pdcp_config_req_asn1 (
pdcp_pP->first_missing_pdu = -1;
pdcp_pP->rx_hfn_offset = 0;
LOG_I(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (rb id %d) "
LOG_N(PDCP, PROTOCOL_PDCP_CTXT_FMT" Action ADD LCID %d (%s id %d) "
"configured with SN size %d bits and RLC %s\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
lc_idP,
(srb_flagP == SRB_FLAG_YES) ? "SRB" : "DRB",
rb_idP,
pdcp_pP->seq_num_size,
(rlc_modeP == RLC_MODE_AM ) ? "AM" : (rlc_modeP == RLC_MODE_TM) ? "TM" : "UM");
(rlc_modeP == RLC_MODE_AM ) ? "AM" : (rlc_modeP == RLC_MODE_TM) ? "TM" : "UM");
/* Setup security */
if (security_modeP != 0xff) {
pdcp_config_set_security(
......@@ -1477,7 +1478,7 @@ pdcp_config_req_asn1 (
pdcp_pP->seq_num_size=5;
}
LOG_I(PDCP,PROTOCOL_PDCP_CTXT_FMT" Action MODIFY LCID %d "
LOG_N(PDCP,PROTOCOL_PDCP_CTXT_FMT" Action MODIFY LCID %d "
"RB id %d reconfigured with SN size %d and RLC %s \n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP,pdcp_pP),
lc_idP,
......
......@@ -597,8 +597,8 @@ rrc_data_ind(
rb_id_t DCCH_index = Srb_id;
if (ctxt_pP->enb_flag == ENB_FLAG_NO) {
LOG_N(RRC, "[UE %x] Frame %d: received a DCCH %d message on SRB %d with Size %d from eNB ???\n",
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id-1,sdu_sizeP);
LOG_N(RRC, "[UE %x] Frame %d: received a DCCH %d message on SRB %d with Size %d from eNB %d\n",
ctxt_pP->module_id, ctxt_pP->frame, DCCH_index,Srb_id-1,sdu_sizeP, ctxt_pP->eNB_index);
} else {
LOG_N(RRC, "[eNB %d] Frame %d: received a DCCH %d message on SRB %d with Size %d from UE %x\n",
ctxt_pP->module_id,
......@@ -656,7 +656,7 @@ void rrc_in_sync_ind(module_id_t Mod_idP, frame_t frameP, uint16_t eNB_index)
#if defined(ENABLE_ITTI)
{
MessageDef *message_p;
//LOG_I(RRC,"sending a message to task_mac_ue\n");
message_p = itti_alloc_new_message (TASK_MAC_UE, RRC_MAC_IN_SYNC_IND);
RRC_MAC_IN_SYNC_IND (message_p).frame = frameP;
RRC_MAC_IN_SYNC_IND (message_p).enb_index = eNB_index;
......
......@@ -187,6 +187,9 @@ typedef enum HO_STATE_e {
#define CBA_OFFSET 0xfff4
// #define NUM_MAX_CBA_GROUP 4 // in the platform_constants
/* TS 36.331: RRC-TransactionIdentifier ::= INTEGER (0..3) */
#define RRC_TRANSACTION_IDENTIFIER_NUMBER 3
typedef struct UE_RRC_INFO_s {
UE_STATE_t State;
uint8_t SIB1systemInfoValueTag;
......@@ -283,7 +286,7 @@ typedef struct SRB_INFO_TABLE_ENTRY_s {
SRB_INFO Srb_info;
uint8_t Active;
uint8_t Status;
uint32_t Next_check_frame;
uint32_t Next_check_frame;
} SRB_INFO_TABLE_ENTRY;
typedef struct MEAS_REPORT_LIST_s {
......@@ -303,8 +306,9 @@ typedef struct eNB_RRC_UE_s {
SCellToAddMod_r10_t sCell_config[2];
#endif
SRB_ToAddModList_t* SRB_configList;
SRB_ToAddModList_t* SRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
DRB_ToAddModList_t* DRB_configList;
DRB_ToAddModList_t* DRB_configList2[8];
DRB_ToAddModList_t* DRB_configList2[RRC_TRANSACTION_IDENTIFIER_NUMBER];
uint8_t DRB_active[8];
struct PhysicalConfigDedicated* physicalConfigDedicated;
struct SPS_Config* sps_Config;
......@@ -412,10 +416,10 @@ typedef struct {
#endif
SRB_INFO SI;
SRB_INFO Srb0;
} rcc_eNB_carrier_data_t;
} rrc_eNB_carrier_data_t;
typedef struct eNB_RRC_INST_s {
rcc_eNB_carrier_data_t carrier[MAX_NUM_CCs];
rrc_eNB_carrier_data_t carrier[MAX_NUM_CCs];
uid_allocator_t uid_allocator; // for rrc_ue_head
RB_HEAD(rrc_ue_tree_s, rrc_eNB_ue_context_s) rrc_ue_head; // ue_context tree key search by rnti
uint8_t HO_flag;
......
......@@ -228,19 +228,21 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
void
rrc_eNB_process_RRCConnectionSetupComplete(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
rrc_eNB_ue_context_t* ue_context_pP,
RRCConnectionSetupComplete_r8_IEs_t* rrcConnectionSetupComplete
);
/**\brief Process the RRCConnectionReconfigurationComplete based on information coming from UE
\param ctxt_pP Running context
\param ue_context_pP RRC UE context
\param rrcConnectionReconfigurationComplete Pointer to RRCConnectionReconfigurationComplete message*/
\param rrcConnectionReconfigurationComplete Pointer to RRCConnectionReconfigurationComplete message
\param xid the transaction id for the rrcconnectionreconfiguration procedure
*/
void
rrc_eNB_process_RRCConnectionReconfigurationComplete(
const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_t* const ue_context_pP,
RRCConnectionReconfigurationComplete_r8_IEs_t* rrcConnectionReconfigurationComplete
rrc_eNB_ue_context_t* ue_context_pP,
const uint8_t xid
);
/**\brief Generate the RRCConnectionRelease
......
This diff is collapsed.
......@@ -759,12 +759,15 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
uint32_t eNB_ue_s1ap_id;
uint32_t length;
uint8_t *buffer;
uint8_t srb_id;
struct rrc_eNB_ue_context_s* ue_context_p = NULL;
protocol_ctxt_t ctxt;
ue_initial_id = S1AP_DOWNLINK_NAS (msg_p).ue_initial_id;
eNB_ue_s1ap_id = S1AP_DOWNLINK_NAS (msg_p).eNB_ue_s1ap_id;
ue_context_p = rrc_eNB_get_ue_context_from_s1ap_ids(instance, ue_initial_id, eNB_ue_s1ap_id);
srb_id = ue_context_p->ue_context.Srb2.Srb_info.Srb_id;
LOG_I(RRC, "[eNB %d] Received %s: ue_initial_id %d, eNB_ue_s1ap_id %d\n",
instance,
msg_name,
......@@ -845,10 +848,13 @@ rrc_eNB_process_S1AP_DOWNLINK_NAS(
LOG_F(RRC,"\n");
#endif
/*
* switch UL or DL NAS message without RRC piggybacked to SRB2 if active.
*/
/* Transfer data to PDCP */
rrc_data_req (
&ctxt,
DCCH,
srb_id,
*rrc_eNB_mui++,
SDU_CONFIRM_NO,
length,
......
......@@ -306,6 +306,11 @@ void ComputeOPc( u8 op_c_pP[16] )
for (i=0; i<16; i++)
op_c_pP[i] ^= OP[i];
LOG_TRACE(DEBUG,
"USIM-API - OPc[0..15]=%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X%02X",
op_c_pP[0],op_c_pP[1],op_c_pP[2], op_c_pP[3], op_c_pP[4], op_c_pP[5], op_c_pP[6], op_c_pP[7],
op_c_pP[8],op_c_pP[9],op_c_pP[10],op_c_pP[11],op_c_pP[12],op_c_pP[13],op_c_pP[14],op_c_pP[15]);
return;
} /* end of function ComputeOPc */
......
......@@ -51,6 +51,20 @@
int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
{
itti_wait_ready(1);
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(PDCP, "Create task for L2L1 failed\n");
return -1;
}
if (enb_nb > 0) {
/* Last task to create, others task must be ready before its start */
if (itti_create_task (TASK_ENB_APP, eNB_app_task, NULL) < 0) {
LOG_E(ENB_APP, "Create task for eNB APP failed\n");
return -1;
}
}
# ifdef OPENAIR2
{
# if defined(ENABLE_USE_MME)
......@@ -120,20 +134,8 @@ int create_tasks(uint32_t enb_nb, uint32_t ue_nb)
# endif
}
}
# endif
# endif // openair2: NN: should be openair3
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(PDCP, "Create task for L2L1 failed\n");
return -1;
}
if (enb_nb > 0) {
/* Last task to create, others task must be ready before its start */
if (itti_create_task (TASK_ENB_APP, eNB_app_task, NULL) < 0) {
LOG_E(ENB_APP, "Create task for eNB APP failed\n");
return -1;
}
}
itti_wait_ready(0);
......
......@@ -605,6 +605,16 @@ l2l1_task (void *args_p)
}
#endif
module_id_t enb_id;
module_id_t UE_id;
for (enb_id = 0; enb_id < NB_eNB_INST; enb_id++)
mac_xface->mrbch_phy_sync_failure (enb_id, 0, enb_id);
if (abstraction_flag == 1) {
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++)
mac_xface->dl_phy_sync_success (UE_id, 0, 0,1); //UE_id%NB_eNB_INST);
}
start_meas (&oaisim_stats);
for (frame = 0;
......
......@@ -1057,14 +1057,6 @@ void init_openair2(void)
oai_emulation.info.cba_group_active,
oai_emulation.info.handover_active);
for (enb_id = 0; enb_id < NB_eNB_INST; enb_id++)
mac_xface->mrbch_phy_sync_failure (enb_id, 0, enb_id);
if (abstraction_flag == 1) {
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++)
mac_xface->dl_phy_sync_success (UE_id, 0, 0,1); //UE_id%NB_eNB_INST);
}
mac_xface->macphy_exit = exit_fun;
#endif
......
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