Commit 2e76cb7e authored by fnabet's avatar fnabet

Merge branch 'develop1B' into 6-bugfix-wireshark-sfn

parents 754cab7e af09f298
......@@ -99,25 +99,31 @@ Obj.# Case# Test# Description
01 51 06 mbmssim (TBD)
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX
01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX (TM2)
01 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 03 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 04 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 05 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 1TX/1RX
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX
01 55 06 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 07 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 08 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 09 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 10 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 11 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 55 12 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 13 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 14 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 15 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 16 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 17 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -135,7 +141,7 @@ Obj.# Case# Test# Description
01 57 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX (TM1), 2TX/2RX(TM2)
01 58 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
01 58 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
......@@ -148,6 +154,18 @@ Obj.# Case# Test# Description
01 58 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
01 58 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
01 58 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 58 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE
......@@ -160,7 +178,7 @@ Obj.# Case# Test# Description
01 60 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 60 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX
01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX, 2TX/2RX
01 61 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 61 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 61 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -178,7 +196,7 @@ Obj.# Case# Test# Description
01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX
01 65 00 lte-softmodem tests with BladeRF RF as eNB and ALU EPC w/ Bandrich COTS UE for 1TX/1RX
01 65 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX
01 65 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX
01 65 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX
......@@ -220,7 +238,7 @@ Obj.# Case# Test# Description
01 85 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX
01 85 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for TX/1RX
02 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Sony Experia M4 COTS UE for 1TX/1RX and 2TX/2RX (TM2)
02 55 00 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 01 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
02 55 02 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 1TX/1RX
......@@ -233,7 +251,18 @@ Obj.# Case# Test# Description
02 55 09 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 10 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 11 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 1TX/1RX
02 55 12 Band 7 FDD 5MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 13 Band 7 FDD 10MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 14 Band 7 FDD 20MHz UL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 15 Band 7 FDD 5MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 16 Band 7 FDD 10MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 17 Band 7 FDD 20MHz DL Throughput (UDP) for 300 sec for 2TX/2RX (TM2)
02 55 18 Band 7 FDD 5MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 19 Band 7 FDD 10MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 20 Band 7 FDD 20MHz UL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 21 Band 7 FDD 5MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 22 Band 7 FDD 10MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
02 55 23 Band 7 FDD 20MHz DL Throughput (TCP) for 300 sec for 2TX/2RX (TM2)
01 64 lte-softmodem-noS1 tests
......@@ -249,4 +278,4 @@ Obj.# Case# Test# Description
#TODO: Add test cases for 10,20 MHz
#TODO: Add test cases for TDD/FDD
#TODO: Test and compile seperately for Rel8/Rel10
#TODO: Case03.py eMBMS test case
\ No newline at end of file
#TODO: Case03.py eMBMS test case
......@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'sudo -E killall -9 -q -r ' + programList
cmd = 'sudo -E killall -s INT -q -r ' + programList + ' ; sleep 5 ; sudo -E killall -9 -q -r ' + programList
result = oai.send(cmd, True)
print "Killing old programs..." + result
programArray = programList.split()
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ def start_ue () :
time.sleep ( 2)
#Now we check if ppp0 interface is up and running
try:
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep 192.'
cmd = 'sudo adb -s ' + device_id + ' shell netcfg |grep UP'
status, out = commands.getstatusoutput(cmd)
if (out == '') :
print "Waiting for UE to connect and get IP Address..."
......
......@@ -220,6 +220,14 @@ typedef struct broadcast_info_ind_s {
#define AS_HSDUPA (1 << NET_ACCESS_HSDUPA)
#define AS_EUTRAN (1 << NET_ACCESS_EUTRAN)
/*
* NAS->AS -K_eNB refresh request
* NAS request AS to refresh its KeNB key
*/
typedef struct kenb_refresh_req_s {
Byte_t kenb[32];
} kenb_refresh_req_t;
/*
* NAS->AS - Cell Information request
* NAS request AS to search for a suitable cell belonging to the selected
......
......@@ -64,6 +64,7 @@ MESSAGE_DEF(RRC_STATE_IND, MESSAGE_PRIORITY_MED, RrcStateInd,
MESSAGE_DEF(RRC_CONFIGURATION_REQ, MESSAGE_PRIORITY_MED, RrcConfigurationReq, rrc_configuration_req)
// UE: NAS -> RRC messages
MESSAGE_DEF(NAS_KENB_REFRESH_REQ, MESSAGE_PRIORITY_MED, NasKenbRefreshReq, nas_kenb_refresh_req)
MESSAGE_DEF(NAS_CELL_SELECTION_REQ, MESSAGE_PRIORITY_MED, NasCellSelectionReq, nas_cell_selection_req)
MESSAGE_DEF(NAS_CONN_ESTABLI_REQ, MESSAGE_PRIORITY_MED, NasConnEstabliReq, nas_conn_establi_req)
MESSAGE_DEF(NAS_UPLINK_DATA_REQ, MESSAGE_PRIORITY_MED, NasUlDataReq, nas_ul_data_req)
......
......@@ -70,6 +70,7 @@ typedef UL_DCCH_Message_t RrcUlDcchMessage;
#define RRC_CONFIGURATION_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_configuration_req
#define NAS_KENB_REFRESH_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_kenb_refresh_req
#define NAS_CELL_SELECTION_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_cell_selection_req
#define NAS_CONN_ESTABLI_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_conn_establi_req
#define NAS_UPLINK_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_req
......@@ -183,6 +184,7 @@ typedef struct RrcConfigurationReq_s {
} RrcConfigurationReq;
// UE: NAS -> RRC messages
typedef kenb_refresh_req_t NasKenbRefreshReq;
typedef cell_info_req_t NasCellSelectionReq;
typedef nas_establish_req_t NasConnEstabliReq;
typedef ul_info_transfer_req_t NasUlDataReq;
......
......@@ -151,7 +151,7 @@ unsigned char *parse_header(unsigned char *mac_header,
unsigned short tb_length)
{
unsigned char not_done=1,num_ces=0,num_sdus=0,lcid, num_sdu_cnt;
unsigned char not_done=1,num_ces=0,num_cont_res = 0,num_padding = 0,num_sdus=0,lcid, num_sdu_cnt;
unsigned char *mac_header_ptr = mac_header;
unsigned short length,ce_len=0;
......@@ -165,6 +165,14 @@ unsigned char *parse_header(unsigned char *mac_header,
lcid = ((SCH_SUBHEADER_FIXED *)mac_header_ptr)->LCID;
if (lcid < UE_CONT_RES) {
//FNA: Contention Resolution check according to Annex B of 36.321
// if this is for CCCH then a Contention Resolution must have been parsed before
if ((lcid == 0) && (num_cont_res == 0)) {
LOG_W(MAC,"[UE] Msg4 Wrong received format: CCCH received without Contention Resolution before\n");
// exit parsing
return NULL;
}
//printf("[MAC][UE] header %x.%x.%x\n",mac_header_ptr[0],mac_header_ptr[1],mac_header_ptr[2]);
if (not_done==0) {// last MAC SDU, length is implicit
mac_header_ptr++;
......@@ -196,6 +204,7 @@ unsigned char *parse_header(unsigned char *mac_header,
num_sdus++;
} else { // This is a control element subheader
if (lcid == SHORT_PADDING) {
num_padding ++;
mac_header_ptr++;
} else {
rx_ces[num_ces] = lcid;
......@@ -205,6 +214,23 @@ unsigned char *parse_header(unsigned char *mac_header,
if (lcid==TIMING_ADV_CMD) {
ce_len++;
} else if (lcid==UE_CONT_RES) {
// FNA: check MAC Header is one of thoses defined in Annex B of 36.321
// Check there is only 1 Contention Resolution
if (num_cont_res) {
LOG_W(MAC,"[UE] Msg4 Wrong received format: More than 1 Contention Resolution\n");
// exit parsing
return NULL;
}
// UE_CONT_RES shall never be the last subheader unless this is the only MAC subheader
if ((not_done == 0) && ((num_sdus) || (num_ces > 1) || (num_padding))) {
LOG_W(MAC,"[UE] Msg4 Wrong received format: Contention Resolution after num_ces=%d num_sdus=%d num_padding=%d\n",num_ces,num_sdus,num_padding);
// exit parsing
return NULL;
}
num_cont_res ++;
ce_len+=6;
}
}
......@@ -343,6 +369,8 @@ ue_send_sdu(module_id_t module_idP,
LOG_T(MAC,"\n");
#endif
if (payload_ptr != NULL) {
for (i=0; i<num_ce; i++) {
// printf("ce %d : %d\n",i,rx_ces[i]);
switch (rx_ces[i]) {
......@@ -467,6 +495,7 @@ ue_send_sdu(module_id_t module_idP,
}
payload_ptr+= rx_lengths[i];
}
} // end if (payload_ptr != NULL)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_OUT);
stop_meas(&UE_mac_inst[module_idP].rx_dlsch_sdu);
......
......@@ -1065,6 +1065,7 @@ rrc_pdcp_config_asn1_req (
#ifdef Rel10
,PMCH_InfoList_r9_t* const pmch_InfoList_r9_pP
#endif
,rb_id_t *const defaultDRB
)
//-----------------------------------------------------------------------------
{
......@@ -1086,6 +1087,8 @@ rrc_pdcp_config_asn1_req (
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
hash_key_t key_defaultDRB = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_defaultDRB_rc;
#ifdef Rel10
int i,j;
MBMS_SessionInfoList_r9_t *mbms_SessionInfoList_r9_p = NULL;
......@@ -1106,7 +1109,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;
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);
......@@ -1186,8 +1189,19 @@ rrc_pdcp_config_asn1_req (
drb_toaddmod_p = drb2add_list_pP->list.array[cnt];
drb_id = drb_toaddmod_p->drb_Identity;// + drb_id_offset;
if (drb_toaddmod_p->logicalChannelIdentity) {
lc_id = *(drb_toaddmod_p->logicalChannelIdentity);
} else {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" logicalChannelIdentity is missing in DRB-ToAddMod information element!\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p));
continue;
}
if (lc_id == 1 || lc_id == 2) {
LOG_E(RLC, PROTOCOL_CTXT_FMT" logicalChannelIdentity = %d is invalid in RRC message when adding DRB!\n", PROTOCOL_CTXT_ARGS(ctxt_pP), lc_id);
continue;
}
lc_id = drb_id + 2;
DevCheck4(drb_id < maxDRB, drb_id, maxDRB, ctxt_pP->module_id, ctxt_pP->rnti);
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, drb_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
......@@ -1203,7 +1217,21 @@ rrc_pdcp_config_asn1_req (
pdcp_p = calloc(1, sizeof(pdcp_t));
h_rc = hashtable_insert(pdcp_coll_p, key, pdcp_p);
if (h_rc != HASH_TABLE_OK) {
// save the first configured DRB-ID as the default DRB-ID
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag);
h_defaultDRB_rc = hashtable_insert(pdcp_coll_p, key_defaultDRB, pdcp_p);
} else {
h_defaultDRB_rc = HASH_TABLE_OK; // do not trigger any error handling if this is not a default DRB
}
if (h_defaultDRB_rc != HASH_TABLE_OK) {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD default DRB key 0x%"PRIx64" FAILED\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
key_defaultDRB);
free(pdcp_p);
return TRUE;
} else if (h_rc != HASH_TABLE_OK) {
LOG_E(PDCP, PROTOCOL_PDCP_CTXT_FMT" CONFIG_ACTION_ADD ADD key 0x%"PRIx64" FAILED\n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
key);
......@@ -1297,7 +1325,6 @@ rrc_pdcp_config_asn1_req (
for (cnt=0; cnt<drb2release_list_pP->list.count; cnt++) {
pdrb_id_p = drb2release_list_pP->list.array[cnt];
drb_id = *pdrb_id_p;
lc_id = drb_id + 2;
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag, srb_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
......@@ -1307,6 +1334,7 @@ rrc_pdcp_config_asn1_req (
drb_id);
continue;
}
lc_id = pdcp_p->lcid;
action = CONFIG_ACTION_REMOVE;
pdcp_config_req_asn1 (
......@@ -1326,6 +1354,20 @@ rrc_pdcp_config_asn1_req (
kRRCint_pP,
kUPenc_pP);
h_rc = hashtable_remove(pdcp_coll_p, key);
if ((defaultDRB != NULL) && (*defaultDRB == drb_id)) {
// default DRB being removed. nevertheless this shouldn't happen as removing default DRB is not allowed in standard
key_defaultDRB = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt_pP->module_id, ctxt_pP->rnti, ctxt_pP->enb_flag);
h_defaultDRB_rc = hashtable_get(pdcp_coll_p, key_defaultDRB, (void**)&pdcp_p);
if (h_defaultDRB_rc == HASH_TABLE_OK) {
h_defaultDRB_rc = hashtable_remove(pdcp_coll_p, key_defaultDRB);
} else {
LOG_E(PDCP, PROTOCOL_CTXT_FMT" PDCP REMOVE FAILED default DRB\n", PROTOCOL_CTXT_ARGS(ctxt_pP));
}
} else {
key_defaultDRB = HASH_TABLE_OK; // do not trigger any error handling if this is not a default DRB
}
}
}
......
......@@ -279,6 +279,7 @@ public_pdcp(void rrc_pdcp_config_req (
* \param[in] kRRCenc RRC encryption key
* \param[in] kRRCint RRC integrity key
* \param[in] kUPenc User-Plane encryption key
* \param[in] defaultDRB Default DRB ID
* \return A status about the processing, OK or error code.
*/
public_pdcp(
......@@ -294,6 +295,7 @@ public_pdcp(
#ifdef Rel10
,PMCH_InfoList_r9_t *pmch_InfoList_r9
#endif
,rb_id_t *const defaultDRB
));
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
......@@ -467,12 +469,25 @@ protected_pdcp(unsigned char pdcp_input_sdu_buffer[MAX_IP_PACKET_SIZE];
protected_pdcp(sdu_size_t pdcp_input_index_header;)
protected_pdcp(sdu_size_t pdcp_input_sdu_size_read;)
protected_pdcp(sdu_size_t pdcp_input_sdu_remaining_size_to_read;)
#define PDCP_COLL_KEY_VALUE(mODULE_iD, rNTI, iS_eNB, rB_iD, iS_sRB) \
((hash_key_t)mODULE_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(rB_iD)) << 25) | \
(((hash_key_t)(iS_sRB)) << 33))
(((hash_key_t)(iS_sRB)) << 33) | \
(((hash_key_t)(0x55)) << 34))
// hash key to the same PDCP as indexed by PDCP_COLL_KEY_VALUE(... rB_iD, iS_sRB=0) where rB_iD
// is the default DRB ID. The hidden code 0x55 indicates the key is indexed by (rB_iD,is_sRB)
// whereas the hidden code 0xaa indicates the key is for default DRB only
#define PDCP_COLL_KEY_DEFAULT_DRB_VALUE(mODULE_iD, rNTI, iS_eNB) \
((hash_key_t)mODULE_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(0xff)) << 25) | \
(((hash_key_t)(0x00)) << 33) | \
(((hash_key_t)(0xaa)) << 34))
// service id max val is maxServiceCount = 16 (asn1_constants.h)
......
......@@ -75,6 +75,7 @@ extern int otg_enabled;
#ifdef PDCP_USE_NETLINK
#include <sys/socket.h>
#include <linux/netlink.h>
#include "NETWORK_DRIVER/UE_IP/constant.h"
extern char nl_rx_buf[NL_MAX_PAYLOAD];
extern struct sockaddr_nl nas_src_addr, nas_dest_addr;
......@@ -194,7 +195,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t* const ctxt_pP)
ret = sendmsg(nas_sock_fd,&nas_msg_tx,0);
if (ret<0) {
LOG_D(PDCP, "[PDCP_FIFOS] sendmsg returns %d (errno: %d)\n", ret, errno);
LOG_E(PDCP, "[PDCP_FIFOS] sendmsg returns %d (errno: %d)\n", ret, errno);
MSC_LOG_TX_MESSAGE_FAILED(
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_PDCP_ENB:MSC_PDCP_UE,
(ctxt_pP->enb_flag == ENB_FLAG_YES) ? MSC_IP_ENB:MSC_IP_UE,
......@@ -499,6 +500,10 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
ctxt.frame = ctxt_cpy.frame;
ctxt.enb_flag = ctxt_cpy.enb_flag;
#ifdef PDCP_DEBUG
LOG_I(PDCP, "[PDCP][NETLINK] pdcp_read_header_g.rb_id = %d\n", pdcp_read_header_g.rb_id);
#endif
if (ctxt_cpy.enb_flag) {
ctxt.module_id = 0;
rab_id = pdcp_read_header_g.rb_id % maxDRB;
......@@ -594,11 +599,21 @@ int pdcp_fifo_read_input_sdus (const protocol_ctxt_t* const ctxt_pP)
}
} else { // enb_flag
if (rab_id != 0) {
rab_id = rab_id % maxDRB;
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
if (rab_id == UE_IP_DEFAULT_RAB_ID) {
LOG_D(PDCP, "PDCP_COLL_KEY_DEFAULT_DRB_VALUE(module_id=%d, rnti=%x, enb_flag=%d)\n",
ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
key = PDCP_COLL_KEY_DEFAULT_DRB_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
} else {
rab_id = rab_id % maxDRB;
LOG_D(PDCP, "PDCP_COLL_KEY_VALUE(module_id=%d, rnti=%x, enb_flag=%d, rab_id=%d, SRB_FLAG=%d)\n",
ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
key = PDCP_COLL_KEY_VALUE(ctxt.module_id, ctxt.rnti, ctxt.enb_flag, rab_id, SRB_FLAG_NO);
h_rc = hashtable_get(pdcp_coll_p, key, (void**)&pdcp_p);
}
if (h_rc == HASH_TABLE_OK) {
rab_id = pdcp_p->rb_id;
#ifdef PDCP_DEBUG
LOG_D(PDCP, "[FRAME %5u][UE][NETLINK][IP->PDCP] INST %d: Received socket with length %d (nlmsg_len = %d) on Rab %d \n",
ctxt.frame,
......
......@@ -120,7 +120,8 @@ config_req_rlc_am (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
rlc_am_info_t * const config_am_pP,
const rb_id_t rb_idP
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP
)
{
rlc_union_t *rlc_union_p = NULL;
......@@ -142,7 +143,7 @@ config_req_rlc_am (
config_am_pP->t_reordering,
config_am_pP->t_status_prohibit);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_am_configure(ctxt_pP, l_rlc_p,
config_am_pP->max_retx_threshold,
config_am_pP->poll_pdu,
......@@ -167,7 +168,8 @@ void config_req_rlc_am_asn1 (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const struct RLC_Config__am * const config_am_pP,
const rb_id_t rb_idP)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
rlc_union_t *rlc_union_p = NULL;
rlc_am_entity_t *l_rlc_p = NULL;
......@@ -208,7 +210,7 @@ void config_req_rlc_am_asn1 (
t_StatusProhibit_tab[config_am_pP->dl_AM_RLC.t_StatusProhibit]);
rlc_am_init(ctxt_pP, l_rlc_p);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP);
rlc_am_set_debug_infos(ctxt_pP, l_rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_am_configure(ctxt_pP, l_rlc_p,
maxRetxThreshold_tab[config_am_pP->ul_AM_RLC.maxRetxThreshold],
pollPDU_tab[config_am_pP->ul_AM_RLC.pollPDU],
......
......@@ -135,31 +135,35 @@ public_rlc_am(void rlc_am_release (
* @{
*/
/*! \fn void config_req_rlc_am (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, rlc_am_info_t * config_amP, rb_id_t rb_idP)
/*! \fn void config_req_rlc_am (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, rlc_am_info_t * config_amP, rb_id_t rb_idP, logical_chan_id_t chan_idP)
* \brief Configure the UL and DL parameters of the RLC AM
* \param[in] ctxt_pP Running context.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] config_amP Configuration parameters for RLC AM instance.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am(void config_req_rlc_am (
const protocol_ctxt_t* const ctxtP,
const srb_flag_t srb_flagP,
const rlc_am_info_t * const config_amP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP)
/*! \fn void config_req_rlc_am_asn1 (const protocol_ctxt_t* const ctxtP, const srb_flag_t srb_flagP, struct RLC_Config__am * config_amP, rb_id_t rb_idP, logical_chan_id_t chan_idP)
* \brief Configure the UL and DL parameters of the RLC AM with the asn1c autogenerated pameters structs
* \param[in] ctxt_pP Running context.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] config_amP Configuration parameters for RLC AM instance.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am(void config_req_rlc_am_asn1 (
const protocol_ctxt_t* const ctxtP,
const srb_flag_t srb_flagP,
const struct RLC_Config__am * const config_amP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/** @} */
......
......@@ -253,10 +253,11 @@ rlc_am_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_am_entity_t *const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
rlc_pP->rb_id = rb_idP;
rlc_pP->channel_id = chan_idP;
if (srb_flagP) {
rlc_pP->is_data_plane = 0;
......
......@@ -112,13 +112,15 @@ public_rlc_am_init( void rlc_am_configure(const protocol_ctxt_t* const ctxtP,
const uint32_t t_reorderingP,
const uint32_t t_status_prohibitP);)
/*! \fn void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP)
* \brief Set informations that will be displayed in traces, helping the debug process.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC AM protocol instance pointer.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_am_init( void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP);)
public_rlc_am_init( void rlc_am_set_debug_infos(const protocol_ctxt_t* const ctxtP, rlc_am_entity_t * const rlc_pP, const srb_flag_t srb_flagP, const rb_id_t rb_idP, const logical_chan_id_t chan_idP);)
/** @} */
#endif
......@@ -420,8 +420,9 @@ rlc_am_receive_process_data_pdu (
rlc_am_rx_list_reassemble_rlc_sdus(ctxt_pP, rlc_pP);
}
//FNA: fix check VrX out of receiving window
if (rlc_pP->t_reordering.running) {
if ((rlc_pP->vr_x == rlc_pP->vr_r) || ((rlc_am_in_rx_window(ctxt_pP, rlc_pP, pdu_info_p->sn) == 0) && (rlc_pP->vr_x != rlc_pP->vr_mr))) {
if ((rlc_pP->vr_x == rlc_pP->vr_r) || ((rlc_am_in_rx_window(ctxt_pP, rlc_pP, rlc_pP->vr_x) == 0) && (rlc_pP->vr_x != rlc_pP->vr_mr))) {
rlc_am_stop_and_reset_timer_reordering(ctxt_pP, rlc_pP);
}
}
......
......@@ -705,8 +705,8 @@ void rlc_am_v9_3_0_test_tx_rx()
rlc_am_init(&g_am_tx, g_frame);
rlc_am_init(&g_am_rx, g_frame);
rlc_am_set_debug_infos(&g_am_tx, g_frame, 0, 0, 0, 1);
rlc_am_set_debug_infos(&g_am_rx, g_frame, 1, 1, 1, 1);
rlc_am_set_debug_infos(&g_am_tx, g_frame, 0, 0, 0, 1, 1 /* LC-id = DRB-id */);
rlc_am_set_debug_infos(&g_am_rx, g_frame, 1, 1, 1, 1, 1 /* LC-id = DRB-id */);
rlc_am_configure(&g_am_tx, g_frame, max_retx_threshold, poll_pdu, poll_byte, t_poll_retransmit, t_reordering, t_status_prohibit);
rlc_am_configure(&g_am_rx, g_frame, max_retx_threshold, poll_pdu, poll_byte, t_poll_retransmit, t_reordering, t_status_prohibit);
......
......@@ -36,7 +36,8 @@ void config_req_rlc_tm (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_tm_info_t * const config_tmP,
const rb_id_t rb_idP
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP
)
{
rlc_union_t *rlc_union_p = NULL;
......@@ -55,7 +56,7 @@ void config_req_rlc_tm (
rlc_tm_init(ctxt_pP, rlc_p);
rlc_p->protocol_state = RLC_DATA_TRANSFER_READY_STATE;
rlc_tm_set_debug_infos(ctxt_pP, rlc_p, rb_idP, srb_flagP);
rlc_tm_set_debug_infos(ctxt_pP, rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_tm_configure(ctxt_pP, rlc_p, config_tmP->is_uplink_downlink);
} else {
LOG_E(RLC, PROTOCOL_RLC_TM_CTXT_FMT" CONFIG_REQ RB %u RLC NOT FOUND\n",
......@@ -151,9 +152,11 @@ void rlc_tm_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
rlcP->rb_id = rb_idP;
rlcP->rb_id = rb_idP;
rlcP->channel_id = chan_idP;
if (srb_flagP) {
rlcP->is_data_plane = 0;
......
......@@ -80,13 +80,14 @@ typedef volatile struct rlc_tm_info_s {
* \param[in] srb_flagP Flag to indicate SRB (1) or DRB (0)
* \param[in] config_tmP Configuration parameters for RLC TM instance.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_tm_init( void config_req_rlc_tm (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_tm_info_t * const config_tmP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/*! \fn void rlc_tm_init (const protocol_ctxt_t* const ctxt_pP, rlc_tm_entity_t * const rlcP)
* \brief Initialize a RLC TM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC TM protocol instance will be in RLC_NULL_STATE state.
......@@ -127,11 +128,14 @@ protected_rlc_tm_init(void rlc_tm_configure(
* \param[in] rlcP RLC TM protocol instance pointer.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier
*/
protected_rlc_tm_init(void rlc_tm_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_tm_entity_t * const rlcP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/** @} */
# endif
......@@ -47,7 +47,8 @@ void config_req_rlc_um (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_um_info_t * const config_um_pP,
const rb_id_t rb_idP)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
rlc_union_t *rlc_union_p = NULL;
rlc_um_entity_t *rlc_p = NULL;
......@@ -68,7 +69,7 @@ void config_req_rlc_um (
rlc_um_init(ctxt_pP, rlc_p);
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
rlc_um_set_debug_infos(ctxt_pP, rlc_p, srb_flagP, rb_idP);
rlc_um_set_debug_infos(ctxt_pP, rlc_p, srb_flagP, rb_idP, chan_idP);
rlc_um_configure(
ctxt_pP,
rlc_p,
......@@ -94,7 +95,8 @@ void config_req_rlc_um_asn1 (
const mbms_service_id_t mbms_service_idP,
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
uint32_t ul_sn_FieldLength = 0;
uint32_t dl_sn_FieldLength = 0;
......@@ -142,7 +144,7 @@ void config_req_rlc_um_asn1 (
if (rlc_um_fsm_notify_event (ctxt_pP, rlc_p, RLC_UM_RECEIVE_CRLC_CONFIG_REQ_ENTER_DATA_TRANSFER_READY_STATE_EVENT)) {
rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP);
rlc_um_set_debug_infos(ctxt_pP,rlc_p, srb_flagP, rb_idP, chan_idP);
if (ul_rlc_pP != NULL) {
switch (ul_rlc_pP->sn_FieldLength) {
......@@ -423,14 +425,16 @@ void rlc_um_configure(
void rlc_um_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP)
const srb_flag_t srb_flagP,
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP)
{
LOG_D(RLC, PROTOCOL_RLC_UM_CTXT_FMT" [SET DEBUG INFOS] rb_id %d srb_flag %d\n",
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,rlc_pP),
rb_idP,
srb_flagP);
rlc_pP->rb_id = rb_idP;
rlc_pP->rb_id = rb_idP;
rlc_pP->channel_id = chan_idP;
if (srb_flagP) {
rlc_pP->is_data_plane = 0;
......
......@@ -84,12 +84,14 @@ typedef volatile struct {
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] config_umP Configuration parameters for RLC UM instance.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_um_control_primitives( void config_req_rlc_um (
const protocol_ctxt_t* const ctxt_pP,
const srb_flag_t srb_flagP,
const rlc_um_info_t * const config_umP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/*! \fn void config_req_rlc_um_asn1 (
* const protocol_ctxt_t* const ctxt_pP,
......@@ -109,6 +111,7 @@ public_rlc_um_control_primitives( void config_req_rlc_um (
* \param[in] ul_rlc_pP Configuration parameters for RLC UM UL instance.
* \param[in] dl_rlc_pP Configuration parameters for RLC UM DL instance.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
const protocol_ctxt_t* const ctxt_pP,
......@@ -118,7 +121,8 @@ public_rlc_um_control_primitives( void config_req_rlc_um_asn1 (
const mbms_service_id_t mbms_service_idP,
const UL_UM_RLC_t * const ul_rlc_pP,
const DL_UM_RLC_t * const dl_rlc_pP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/*! \fn void rlc_um_init (const protocol_ctxt_t* const ctxt_pP, rlc_um_entity_t * const rlc_pP)
* \brief Initialize a RLC UM protocol instance, initialize all variables, lists, allocate buffers for making this instance ready to be configured with protocol configuration parameters. After this initialization the RLC UM protocol instance will be in RLC_NULL_STATE state.
......@@ -176,13 +180,15 @@ protected_rlc_um_control_primitives(void rlc_um_configure(
* \brief Set debug informations for a RLC UM protocol instance, these informations are only for trace purpose.
* \param[in] ctxtP Running context.
* \param[in] rlc_pP RLC UM protocol instance pointer.
* \param[in] rb_idP Radio bearer identifier.
* \param[in] srb_flagP Flag to indicate signalling radio bearer (1) or data radio bearer (0).
* \param[in] rb_idP Radio bearer identifier.
* \param[in] chan_idP Transport channel identifier.
*/
protected_rlc_um_control_primitives(void rlc_um_set_debug_infos(
const protocol_ctxt_t* const ctxt_pP,
rlc_um_entity_t * const rlc_pP,
const srb_flag_t srb_flagP,
const rb_id_t rb_idP);)
const rb_id_t rb_idP,
const logical_chan_id_t chan_idP);)
/** @} */
# endif
......@@ -195,8 +195,8 @@ void rlc_um_v9_3_0_test_windows_10()
rlc_um_init(&um1);
rlc_um_init(&um2);
rlc_um_set_debug_infos(&um1, g_frame, 0, 0, 0, 1);
rlc_um_set_debug_infos(&um2, g_frame, 1, 1, 1, 1);
rlc_um_set_debug_infos(&um1, g_frame, 0, 0, 0, 1, 1 /*LC-id = RAB-id*/);
rlc_um_set_debug_infos(&um2, g_frame, 1, 1, 1, 1, 1 /*LC-id = RAB-id*/);
rlc_um_configure(&um1, g_frame, timer_reordering, sn_field_length, sn_field_length, is_mXch);
rlc_um_configure(&um2, g_frame, timer_reordering, sn_field_length, sn_field_length, is_mXch);
......@@ -249,8 +249,8 @@ void rlc_um_v9_3_0_test_windows_5()
rlc_um_init(&um1);
rlc_um_init(&um2);
rlc_um_set_debug_infos(&um1, g_frame, 0, 0, 0, 1);
rlc_um_set_debug_infos(&um2, g_frame, 1, 1, 1, 1);
rlc_um_set_debug_infos(&um1, g_frame, 0, 0, 0, 1, 1 /* LC-id = DRB-id */);
rlc_um_set_debug_infos(&um2, g_frame, 1, 1, 1, 1, 1 /* LC-id = DRB-id */);
rlc_um_configure(&um1, g_frame, timer_reordering, sn_field_length, sn_field_length, is_mXch);
rlc_um_configure(&um2, g_frame, timer_reordering, sn_field_length, sn_field_length, is_mXch);
......@@ -621,8 +621,8 @@ void rlc_um_v9_3_0_test_reordering(uint32_t sn_field_lengthP)
um_info.is_mXch = 0;
srand (0);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
rlc_um_display_rx_window(&um_tx);
......@@ -743,8 +743,8 @@ void rlc_um_v9_3_0_test_tx_rx_10(void)
um_info.is_mXch = 0;
srand (0);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
rlc_um_display_rx_window(&um_tx);
......@@ -1072,8 +1072,8 @@ void rlc_um_v9_3_0_test_tx_rx_5(void)
um_info.is_mXch = 0;
srand (0);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER);
config_req_rlc_um (&um_tx, 0,0,0, &um_info, 0, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
config_req_rlc_um (&um_rx, 0,1,1, &um_info, 1, SIGNALLING_RADIO_BEARER, SIGNALLING_RADIO_BEARER /*LC-id = DRB-id*/);
rlc_um_display_rx_window(&um_tx);
......
......@@ -269,7 +269,18 @@ public_rlc(logical_chan_id_t rlc_mbms_rbid2lcid_eNB[NUMBER_OF_eNB_MAX][NB_RB_
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(rB_iD)) << 25) | \
(((hash_key_t)(iS_sRB)) << 33))
(((hash_key_t)(iS_sRB)) << 33) | \
(((hash_key_t)(0x05)) << 34))
// index to the same RLC entity as RLC_COLL_KEY_VALUE(), but using LC_id instead
// the hidden last key indicates if this is a hash-key with RB_id (0x05) or LC_id (0x0a)
#define RLC_COLL_KEY_LCID_VALUE(eNB_iD, rNTI, iS_eNB, lC_iD, iS_sRB) \
((hash_key_t)eNB_iD | \
(((hash_key_t)(rNTI)) << 8) | \
(((hash_key_t)(iS_eNB)) << 24) | \
(((hash_key_t)(lC_iD)) << 25) | \
(((hash_key_t)(iS_sRB)) << 33) | \
(((hash_key_t)(0x0a)) << 34))
// service id max val is maxServiceCount = 16 (asn1_constants.h)
......
......@@ -136,7 +136,6 @@ tbs_size_t mac_rlc_data_req(
{
//-----------------------------------------------------------------------------
struct mac_data_req data_request;
rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE;
rlc_mbms_id_t *mbms_id_p = NULL;
rlc_union_t *rlc_union_p = NULL;
......@@ -179,13 +178,7 @@ tbs_size_t mac_rlc_data_req(
return (tbs_size_t)0;
}
} else {
if (channel_idP > 2) {
rb_id = channel_idP - 2;
} else {
rb_id = channel_idP;
}
key = RLC_COLL_KEY_VALUE(module_idP, rntiP, enb_flagP, rb_id, srb_flag);
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
......@@ -194,7 +187,7 @@ tbs_size_t mac_rlc_data_req(
rlc_mode = rlc_union_p->mode;
} else {
rlc_mode = RLC_MODE_NONE;
AssertFatal (0 , "RLC not configured rb id %u lcid %u RNTI %x!\n", rb_id, channel_idP, rntiP);
AssertFatal (0 , "RLC not configured lcid %u RNTI %x!\n", channel_idP, rntiP);
}
switch (rlc_mode) {
......@@ -244,7 +237,6 @@ void mac_rlc_data_ind (
crc_t *crcs_pP)
{
//-----------------------------------------------------------------------------
rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE;
rlc_mbms_id_t *mbms_id_p = NULL;
rlc_union_t *rlc_union_p = NULL;
......@@ -294,13 +286,7 @@ void mac_rlc_data_ind (
return;
}
} else {
if (channel_idP > 2) {
rb_id = channel_idP - 2;
} else {
rb_id = channel_idP;
}
key = RLC_COLL_KEY_VALUE(module_idP, rntiP, enb_flagP, rb_id, srb_flag);
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
......@@ -350,7 +336,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
mac_rlc_status_resp_t mac_rlc_status_resp;
struct mac_status_ind tx_status;
struct mac_status_resp status_resp;
rb_id_t rb_id = 0;
rlc_mode_t rlc_mode = RLC_MODE_NONE;
rlc_mbms_id_t *mbms_id_p = NULL;
rlc_union_t *rlc_union_p = NULL;
......@@ -399,13 +384,7 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
key = RLC_COLL_KEY_MBMS_VALUE(module_idP, rntiP, enb_flagP, mbms_id_p->service_id, mbms_id_p->session_id);
} else {
if (channel_idP > 2) {
rb_id = channel_idP - 2;
} else {
rb_id = channel_idP;
}
key = RLC_COLL_KEY_VALUE(module_idP, rntiP, enb_flagP, rb_id, srb_flag);
key = RLC_COLL_KEY_LCID_VALUE(module_idP, rntiP, enb_flagP, channel_idP, srb_flag);
}
h_rc = hashtable_get(rlc_coll_p, key, (void**)&rlc_union_p);
......
This diff is collapsed.
......@@ -182,7 +182,7 @@ typedef enum HO_STATE_e {
#define PAYLOAD_SIZE_MAX 1024
#define RRC_BUF_SIZE 255
#define UNDEF_SECURITY_MODE 0xff
#define NO_SECURITY_MODE 0x33
#define NO_SECURITY_MODE 0x20
#define CBA_OFFSET 0xfff4
// #define NUM_MAX_CBA_GROUP 4 // in the platform_constants
......@@ -506,6 +506,7 @@ typedef struct UE_RRC_INST_s {
struct SRB_ToAddMod *SRB1_config[NB_CNX_UE];
struct SRB_ToAddMod *SRB2_config[NB_CNX_UE];
struct DRB_ToAddMod *DRB_config[NB_CNX_UE][8];
rb_id_t *defaultDRB; // remember the ID of the default DRB
MeasObjectToAddMod_t *MeasObj[NB_CNX_UE][MAX_MEAS_OBJ];
struct ReportConfigToAddMod *ReportConfig[NB_CNX_UE][MAX_MEAS_CONFIG];
struct QuantityConfig *QuantityConfig[NB_CNX_UE];
......
......@@ -39,6 +39,7 @@
#define RRC_UE_C
#include "assertions.h"
#include "hashtable.h"
#include "asn1_conversions.h"
#include "defs.h"
#include "PHY/TOOLS/dB_routines.h"
......@@ -107,6 +108,15 @@ extern void *bigphys_malloc(int);
extern int8_t dB_fixed2(uint32_t x,uint32_t y);
extern void pdcp_config_set_security(
const protocol_ctxt_t* const ctxt_pP,
pdcp_t * const pdcp_pP,
const rb_id_t rb_idP,
const uint16_t lc_idP,
const uint8_t security_modeP,
uint8_t * const kRRCenc,
uint8_t * const kRRCint,
uint8_t * const kUPenc);
// internal prototypes
......@@ -1060,7 +1070,7 @@ rrc_ue_process_radioResourceConfigDedicated(
#ifdef Rel10
,(PMCH_InfoList_r9_t *)NULL
#endif
);
,NULL);
// Refresh SRBs
rrc_rlc_config_asn1_req(ctxt_pP,
......@@ -1200,6 +1210,15 @@ rrc_ue_process_radioResourceConfigDedicated(
// Establish DRBs if present
if (radioResourceConfigDedicated->drb_ToAddModList) {
if ( (UE_rrc_inst[ctxt_pP->module_id].defaultDRB == NULL) &&
(radioResourceConfigDedicated->drb_ToAddModList->list.count >= 1) ) {
// configure the first DRB ID as the default DRB ID
UE_rrc_inst[ctxt_pP->module_id].defaultDRB = malloc(sizeof(rb_id_t));
*UE_rrc_inst[ctxt_pP->module_id].defaultDRB = radioResourceConfigDedicated->drb_ToAddModList->list.array[0]->drb_Identity;
LOG_I(RRC,"[UE %d] default DRB = %d\n",ctxt_pP->module_id, *UE_rrc_inst[ctxt_pP->module_id].defaultDRB);
}
uint8_t *kUPenc = NULL;
#if defined(ENABLE_SECURITY)
......@@ -1231,7 +1250,7 @@ rrc_ue_process_radioResourceConfigDedicated(
#ifdef Rel10
,(PMCH_InfoList_r9_t *)NULL
#endif
);
, UE_rrc_inst[ctxt_pP->module_id].defaultDRB);
// Refresh DRBs
rrc_rlc_config_asn1_req(ctxt_pP,
......@@ -1392,6 +1411,62 @@ rrc_ue_process_securityModeCommand(
ul_dcch_msg.message.choice.c1.present = UL_DCCH_MessageType__c1_PR_securityModeFailure;
}
#if defined(ENABLE_SECURITY)
uint8_t *kRRCenc = NULL;
uint8_t *kUPenc = NULL;
uint8_t *kRRCint = NULL;
pdcp_t *pdcp_p = NULL;
hash_key_t key = HASHTABLE_NOT_A_KEY_VALUE;
hashtable_rc_t h_rc;
key = PDCP_COLL_KEY_VALUE(ctxt_pP->module_id, ctxt_pP->rnti,
ctxt_pP->enb_flag, DCCH, SRB_FLAG_YES);
h_rc = hashtable_get(pdcp_coll_p, key, (void**) &pdcp_p);
if (h_rc == HASH_TABLE_OK) {
LOG_D(RRC, "PDCP_COLL_KEY_VALUE() returns valid key = %d\n", key);
LOG_D(RRC, "driving kRRCenc, kRRCint and kUPenc from KeNB="
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x\n",
UE_rrc_inst[ctxt_pP->module_id].kenb[0], UE_rrc_inst[ctxt_pP->module_id].kenb[1], UE_rrc_inst[ctxt_pP->module_id].kenb[2], UE_rrc_inst[ctxt_pP->module_id].kenb[3],
UE_rrc_inst[ctxt_pP->module_id].kenb[4], UE_rrc_inst[ctxt_pP->module_id].kenb[5], UE_rrc_inst[ctxt_pP->module_id].kenb[6], UE_rrc_inst[ctxt_pP->module_id].kenb[7],
UE_rrc_inst[ctxt_pP->module_id].kenb[8], UE_rrc_inst[ctxt_pP->module_id].kenb[9], UE_rrc_inst[ctxt_pP->module_id].kenb[10], UE_rrc_inst[ctxt_pP->module_id].kenb[11],
UE_rrc_inst[ctxt_pP->module_id].kenb[12], UE_rrc_inst[ctxt_pP->module_id].kenb[13], UE_rrc_inst[ctxt_pP->module_id].kenb[14], UE_rrc_inst[ctxt_pP->module_id].kenb[15],
UE_rrc_inst[ctxt_pP->module_id].kenb[16], UE_rrc_inst[ctxt_pP->module_id].kenb[17], UE_rrc_inst[ctxt_pP->module_id].kenb[18], UE_rrc_inst[ctxt_pP->module_id].kenb[19],
UE_rrc_inst[ctxt_pP->module_id].kenb[20], UE_rrc_inst[ctxt_pP->module_id].kenb[21], UE_rrc_inst[ctxt_pP->module_id].kenb[22], UE_rrc_inst[ctxt_pP->module_id].kenb[23],
UE_rrc_inst[ctxt_pP->module_id].kenb[24], UE_rrc_inst[ctxt_pP->module_id].kenb[25], UE_rrc_inst[ctxt_pP->module_id].kenb[26], UE_rrc_inst[ctxt_pP->module_id].kenb[27],
UE_rrc_inst[ctxt_pP->module_id].kenb[28], UE_rrc_inst[ctxt_pP->module_id].kenb[29], UE_rrc_inst[ctxt_pP->module_id].kenb[30], UE_rrc_inst[ctxt_pP->module_id].kenb[31]);
derive_key_rrc_enc(UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm,
UE_rrc_inst[ctxt_pP->module_id].kenb, &kRRCenc);
derive_key_rrc_int(UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm,
UE_rrc_inst[ctxt_pP->module_id].kenb, &kRRCint);
derive_key_up_enc(UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm,
UE_rrc_inst[ctxt_pP->module_id].kenb, &kUPenc);
if (securityMode != 0xff) {
pdcp_config_set_security(ctxt_pP, pdcp_p, 0, 0,
UE_rrc_inst[ctxt_pP->module_id].ciphering_algorithm
| (UE_rrc_inst[ctxt_pP->module_id].integrity_algorithm << 4),
kRRCenc, kRRCint, kUPenc);
} else {
LOG_W(RRC, "skipped pdcp_config_set_security() as securityMode == 0x%02x",
securityMode);
}
} else {
LOG_W(RRC, "Could not get PDCP instance where key=0x%\n", key);
}
#endif //#if defined(ENABLE_SECURITY)
if (securityModeCommand->criticalExtensions.present == SecurityModeCommand__criticalExtensions_PR_c1) {
if (securityModeCommand->criticalExtensions.choice.c1.present == SecurityModeCommand__criticalExtensions__c1_PR_securityModeCommand_r8) {
......@@ -1725,7 +1800,7 @@ rrc_ue_process_mobilityControlInfo(
#ifdef Rel10
,NULL
#endif
);
,NULL);
rrc_rlc_config_asn1_req(NB_eNB_INST+ue_mod_idP, frameP,0,eNB_index,
NULL,// SRB_ToAddModList
......@@ -1734,7 +1809,7 @@ rrc_ue_process_mobilityControlInfo(
#ifdef Rel10
,NULL
#endif
);
,NULL);
*/
......@@ -3906,7 +3981,7 @@ static void decode_MBSFNAreaConfiguration( module_id_t ue_mod_idP, uint8_t eNB_i
#ifdef Rel10
,&(UE_rrc_inst[ue_mod_idP].mcch_message[eNB_index]->pmch_InfoList_r9)
#endif
);
,NULL);
rrc_rlc_config_asn1_req(&ctxt,
NULL,// SRB_ToAddModList
......@@ -4063,6 +4138,30 @@ void *rrc_ue_task( void *args_p )
# if defined(ENABLE_USE_MME)
case NAS_KENB_REFRESH_REQ:
memcpy((void*)UE_rrc_inst[ue_mod_id].kenb, (void*)NAS_KENB_REFRESH_REQ(msg_p).kenb, sizeof(UE_rrc_inst[ue_mod_id].kenb));
LOG_D(RRC, "[UE %d] Received %s: refreshed RRC::KeNB = "
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x\n",
ue_mod_id, msg_name,
UE_rrc_inst[ue_mod_id].kenb[0], UE_rrc_inst[ue_mod_id].kenb[1], UE_rrc_inst[ue_mod_id].kenb[2], UE_rrc_inst[ue_mod_id].kenb[3],
UE_rrc_inst[ue_mod_id].kenb[4], UE_rrc_inst[ue_mod_id].kenb[5], UE_rrc_inst[ue_mod_id].kenb[6], UE_rrc_inst[ue_mod_id].kenb[7],
UE_rrc_inst[ue_mod_id].kenb[8], UE_rrc_inst[ue_mod_id].kenb[9], UE_rrc_inst[ue_mod_id].kenb[10], UE_rrc_inst[ue_mod_id].kenb[11],
UE_rrc_inst[ue_mod_id].kenb[12], UE_rrc_inst[ue_mod_id].kenb[13], UE_rrc_inst[ue_mod_id].kenb[14], UE_rrc_inst[ue_mod_id].kenb[15],
UE_rrc_inst[ue_mod_id].kenb[16], UE_rrc_inst[ue_mod_id].kenb[17], UE_rrc_inst[ue_mod_id].kenb[18], UE_rrc_inst[ue_mod_id].kenb[19],
UE_rrc_inst[ue_mod_id].kenb[20], UE_rrc_inst[ue_mod_id].kenb[21], UE_rrc_inst[ue_mod_id].kenb[22], UE_rrc_inst[ue_mod_id].kenb[23],
UE_rrc_inst[ue_mod_id].kenb[24], UE_rrc_inst[ue_mod_id].kenb[25], UE_rrc_inst[ue_mod_id].kenb[26], UE_rrc_inst[ue_mod_id].kenb[27],
UE_rrc_inst[ue_mod_id].kenb[28], UE_rrc_inst[ue_mod_id].kenb[29], UE_rrc_inst[ue_mod_id].kenb[30], UE_rrc_inst[ue_mod_id].kenb[31]);
break;
/* NAS messages */
case NAS_CELL_SELECTION_REQ:
ue_mod_id = 0; /* TODO force ue_mod_id to first UE, NAS UE not virtualized yet */
......
......@@ -481,7 +481,7 @@ static void init_MBMS(
# ifdef Rel10
, &(eNB_rrc_inst[enb_mod_idP].carrier[CC_id].mcch_message->pmch_InfoList_r9)
# endif
);
,NULL);
rrc_rlc_config_asn1_req(&ctxt,
NULL, // SRB_ToAddModList
......@@ -3282,7 +3282,7 @@ rrc_eNB_generate_RRCConnectionReconfiguration_handover(
#ifdef Rel10
, (PMCH_InfoList_r9_t *) NULL
#endif
);
,NULL);
rrc_rlc_config_asn1_req(&ctxt,
ue_context_pP->ue_context.SRB_configList,
......@@ -3524,7 +3524,7 @@ rrc_eNB_process_RRCConnectionReconfigurationComplete(
#ifdef Rel10
, (PMCH_InfoList_r9_t *) NULL
#endif
);
,NULL);
// Refresh SRBs/DRBs
rrc_rlc_config_asn1_req(
ctxt_pP,
......@@ -4336,7 +4336,7 @@ rrc_eNB_decode_ccch(
# ifdef Rel10
, (PMCH_InfoList_r9_t *) NULL
# endif
);
,NULL);
rrc_rlc_config_asn1_req(ctxt_pP,
ue_context_p->ue_context.SRB_configList,
......
......@@ -116,6 +116,14 @@ Description Defines the messages supported by the Access Stratum sublayer
#define AS_HSDUPA (1 << NET_ACCESS_HSDUPA)
#define AS_EUTRAN (1 << NET_ACCESS_EUTRAN)
/*
* NAS->AS -K_eNB refresh request
* NAS request AS to refresh its KeNB key
*/
typedef struct kenb_refresh_req_s {
Byte_t kenb[32];
} kenb_refresh_req_t;
/*
* NAS->AS - Cell Information request
* NAS request AS to search for a suitable cell belonging to the selected
......
......@@ -72,6 +72,10 @@ Description Defines the security mode control EMM procedure executed by the
#include "secu_defs.h"
#include "msc.h"
#if defined(NAS_BUILT_IN_UE)
#include "nas_itti_messaging.h"
#endif
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
......@@ -293,7 +297,9 @@ int emm_proc_security_mode_command(int native_ksi, int ksi,
_emm_data.security->selected_algorithms.encryption = seea;
_emm_data.security->selected_algorithms.integrity = seia;
#if defined(NAS_BUILT_IN_UE)
nas_itti_kenb_refresh_req(_security_data.kenb.value);
#endif
}
/*
* NAS security mode command not accepted by the UE
......
......@@ -187,6 +187,39 @@ int nas_itti_protected_msg(const char *buffer, const nas_message_t *msg, const i
extern unsigned char NB_eNB_INST;
int nas_itti_kenb_refresh_req(const Byte_t kenb[32])
{
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, NAS_KENB_REFRESH_REQ);
memcpy(NAS_KENB_REFRESH_REQ(message_p).kenb, kenb, sizeof(NAS_KENB_REFRESH_REQ(message_p).kenb));
MSC_LOG_TX_MESSAGE(
MSC_NAS_UE,
MSC_RRC_UE,
NULL,0,
"0 NAS_KENB_REFRESH_REQ KeNB "
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x"
"%02x%02x%02x%02x",
kenb[0], kenb[1], kenb[2], kenb[3],
kenb[4], kenb[5], kenb[6], kenb[7],
kenb[8], kenb[9], kenb[10], kenb[11],
kenb[12], kenb[13], kenb[14], kenb[15],
kenb[16], kenb[17], kenb[18], kenb[19],
kenb[20], kenb[21], kenb[22], kenb[23],
kenb[24], kenb[25], kenb[26], kenb[27],
kenb[28], kenb[29], kenb[30], kenb[31]);
return itti_send_msg_to_task(TASK_RRC_UE, NB_eNB_INST + 0 /* TODO to be virtualized */, message_p);
}
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat)
{
MessageDef *message_p;
......
......@@ -54,6 +54,9 @@ int nas_itti_protected_msg(
# if defined(NAS_BUILT_IN_UE)
int nas_itti_kenb_refresh_req(const Byte_t kenb[32]);
int nas_itti_cell_info_req(const plmn_t plmnID, const Byte_t rat);
int nas_itti_nas_establish_req(as_cause_t cause, as_call_type_t type, as_stmsi_t s_tmsi, plmn_t plmnID, Byte_t *data_pP, uint32_t lengthP);
......
......@@ -33,6 +33,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 100;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
......@@ -46,7 +47,7 @@ eNBs =
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -26;
pdsch_referenceSignalPower = -32;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
......
......@@ -32,6 +32,7 @@ eNBs =
Nid_cell = 0;
N_RB_DL = 100;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 32;
......@@ -96,6 +97,7 @@ eNBs =
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 1;
}
);
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "94";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 100;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 90;
rx_gain = 125;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -32;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 100;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 32;
rx_gain = 116;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -23;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 2;
ue_TransmissionMode = 2;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "94";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 90;
rx_gain = 125;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -28;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.171";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.150/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.150/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2660000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 2;
nb_antennas_tx = 2;
nb_antennas_rx = 2;
tx_gain = 32;
rx_gain = 116;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -18;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -108;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
ue_TransmissionMode = 2;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "192.168.12.26";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
};
log_config :
{
global_log_level ="debug";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
}
);
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