fix the issue with the pre-ci tests
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5756 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
* otherwise use standard fprintf as logger.
|
||||
*/
|
||||
#if defined(ENB_MODE)
|
||||
# define GTPU_DEBUG(x, args...) LOG_I(GTPU, x, ##args)
|
||||
# define GTPU_DEBUG(x, args...) LOG_D(GTPU, x, ##args)
|
||||
# define GTPU_INFO(x, args...) LOG_I(GTPU, x, ##args)
|
||||
# define GTPU_WARNING(x, args...) LOG_W(GTPU, x, ##args)
|
||||
# define GTPU_ERROR(x, args...) LOG_E(GTPU, x, ##args)
|
||||
|
||||
@@ -782,7 +782,7 @@ nwGtpv1uProcessUdpReq( NW_IN NwGtpv1uStackHandleT hGtpuStackHandle,
|
||||
break;
|
||||
|
||||
case NW_GTP_GPDU:
|
||||
GTPU_DEBUG("NW_GTP_GPDU");
|
||||
GTPU_DEBUG("NW_GTP_GPDU: DATA COMING FROM UDP\n");
|
||||
ret = nwGtpv1uProcessGpdu(thiz, udpData, udpDataLen, peerIp);
|
||||
break;
|
||||
|
||||
|
||||
@@ -614,7 +614,7 @@ inline void sctp_eNB_read_from_socket(struct sctp_cnx_list_elm_s *sctp_cnx)
|
||||
free(sctp_cnx);
|
||||
} else {
|
||||
SCTP_DEBUG("An error occured during read\n");
|
||||
SCTP_ERROR("sctp_recvmsg: %s:%d\n", strerror(errno), errno);
|
||||
SCTP_ERROR("sctp_recvmsg (fd %d, len %d ): %s:%d\n", sctp_cnx->sd, n, strerror(errno), errno);
|
||||
}
|
||||
return;
|
||||
} else if (n == 0) {
|
||||
|
||||
@@ -134,7 +134,7 @@ void udp_eNB_process_file_descriptors(struct epoll_event *events, int nb_events)
|
||||
for (i = 0; i < nb_events; i++) {
|
||||
STAILQ_FOREACH(udp_sock_p, &udp_socket_list, entries) {
|
||||
if (udp_sock_p->sd == events[i].data.fd) {
|
||||
LOG_I(UDP_, "Found matching task desc\n");
|
||||
LOG_D(UDP_, "Found matching task desc\n");
|
||||
udp_eNB_receiver(udp_sock_p);
|
||||
break;
|
||||
}
|
||||
@@ -229,9 +229,9 @@ udp_eNB_send_to(
|
||||
void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
|
||||
{
|
||||
uint8_t l_buffer[2048];
|
||||
int n;
|
||||
socklen_t from_len;
|
||||
struct sockaddr_in addr;
|
||||
int n;
|
||||
socklen_t from_len;
|
||||
struct sockaddr_in addr;
|
||||
MessageDef *message_p = NULL;
|
||||
udp_data_ind_t *udp_data_ind_p = NULL;
|
||||
uint8_t *forwarded_buffer = NULL;
|
||||
@@ -239,13 +239,12 @@ void udp_eNB_receiver(struct udp_socket_desc_s *udp_sock_pP)
|
||||
if (1) {
|
||||
from_len = (socklen_t)sizeof(struct sockaddr_in);
|
||||
|
||||
LOG_I(UDP_, "before recvfrom sd %d\n", udp_sock_pP->sd);
|
||||
if ((n = recvfrom(udp_sock_pP->sd, l_buffer, sizeof(l_buffer), 0,
|
||||
(struct sockaddr *)&addr, &from_len)) < 0) {
|
||||
LOG_E(UDP_, "Recvfrom failed %s\n", strerror(errno));
|
||||
return;
|
||||
} else if (n == 0){
|
||||
LOG_I(UDP_, "Recvfrom returned 0\n");
|
||||
LOG_W(UDP_, "Recvfrom returned 0\n");
|
||||
return;
|
||||
} else{
|
||||
forwarded_buffer = calloc(n, sizeof(uint8_t));
|
||||
@@ -289,7 +288,7 @@ void *udp_eNB_task(void *args_p)
|
||||
itti_mark_task_ready(TASK_UDP);
|
||||
while(1) {
|
||||
itti_receive_msg(TASK_UDP, &received_message_p);
|
||||
LOG_W(UDP_, "Got message %p\n", received_message_p);
|
||||
LOG_D(UDP_, "Got message %p\n", &received_message_p);
|
||||
if (received_message_p != NULL) {
|
||||
|
||||
msg_name = ITTI_MSG_NAME (received_message_p);
|
||||
@@ -298,7 +297,7 @@ void *udp_eNB_task(void *args_p)
|
||||
switch (ITTI_MSG_ID(received_message_p))
|
||||
{
|
||||
case UDP_INIT: {
|
||||
LOG_W(UDP_, "Received UDP_INIT\n");
|
||||
LOG_D(UDP_, "Received UDP_INIT\n");
|
||||
udp_init_t *udp_init_p;
|
||||
udp_init_p = &received_message_p->ittiMsg.udp_init;
|
||||
udp_eNB_create_socket(
|
||||
@@ -308,7 +307,7 @@ void *udp_eNB_task(void *args_p)
|
||||
} break;
|
||||
|
||||
case UDP_DATA_REQ: {
|
||||
LOG_W(UDP_, "Received UDP_DATA_REQ\n");
|
||||
LOG_D(UDP_, "Received UDP_DATA_REQ\n");
|
||||
int udp_sd = -1;
|
||||
ssize_t bytes_written;
|
||||
|
||||
@@ -341,7 +340,7 @@ void *udp_eNB_task(void *args_p)
|
||||
udp_sd = udp_sock_p->sd;
|
||||
pthread_mutex_unlock(&udp_socket_list_mutex);
|
||||
|
||||
LOG_W(UDP_, "[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n",
|
||||
LOG_D(UDP_, "[%d] Sending message of size %u to "IPV4_ADDR" and port %u\n",
|
||||
udp_sd,
|
||||
udp_data_req_p->buffer_length,
|
||||
IPV4_ADDR_FORMAT(udp_data_req_p->peer_address),
|
||||
@@ -381,11 +380,11 @@ on_error:
|
||||
nb_events = itti_get_events(TASK_UDP, &events);
|
||||
/* Now handle notifications for other sockets */
|
||||
if (nb_events > 0) {
|
||||
LOG_W(UDP_, "UDP task Process %d events\n",nb_events);
|
||||
LOG_D(UDP_, "UDP task Process %d events\n",nb_events);
|
||||
udp_eNB_process_file_descriptors(events, nb_events);
|
||||
}
|
||||
}
|
||||
LOG_W(UDP_, "Task UDP eNB exiting\n");
|
||||
LOG_N(UDP_, "Task UDP eNB exiting\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenAirInterface.The full GNU General Public License is
|
||||
included in this distribution in the file called "COPYING". If not,
|
||||
see <http://www.gnu.org/licenses/>.
|
||||
included in this distribution in the file called "COPYING". If not,
|
||||
see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact Information
|
||||
OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
@@ -3306,9 +3306,9 @@ void phy_UE_lte_measurement_thresholds_test_and_report(instance_t instanceP, ral
|
||||
|
||||
void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold_phy_t* threshold_phy_pP) {
|
||||
unsigned int mod_id;
|
||||
|
||||
int CC_id = 0; // this should become the function argument, requested by the upper layers.
|
||||
|
||||
mod_id = instanceP - NB_eNB_INST;
|
||||
|
||||
switch (threshold_phy_pP->link_param.link_param_type.choice) {
|
||||
|
||||
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
|
||||
@@ -3324,23 +3324,19 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
break;
|
||||
case RAL_LINK_PARAM_GEN_THROUGHPUT:
|
||||
break;
|
||||
case RAL_LINK_PARAM_GEN_PACKET_ERROR_RATE:
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_TYPE_CHOICE_LTE:
|
||||
switch (threshold_phy_pP->link_param.link_param_type._union.link_param_gen) {
|
||||
case RAL_LINK_PARAM_LTE_UE_RSRP:
|
||||
// phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id]->PHY_measurements.rx_rssi_dBm[0]);
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id]->PHY_measurements.rsrp[0]);
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id][CC_id]->PHY_measurements.rsrp[0]);
|
||||
break;
|
||||
case RAL_LINK_PARAM_LTE_UE_RSRQ:
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id]->PHY_measurements.rsrq[0]);
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id][CC_id]->PHY_measurements.rsrq[0]);
|
||||
break;
|
||||
case RAL_LINK_PARAM_LTE_UE_CQI:
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id]->PHY_measurements.wideband_cqi_avg[0]);
|
||||
phy_UE_lte_measurement_thresholds_test_and_report(instanceP, threshold_phy_pP, PHY_vars_UE_g[mod_id][CC_id]->PHY_measurements.wideband_cqi_avg[0]);
|
||||
break;
|
||||
case RAL_LINK_PARAM_LTE_AVAILABLE_BW:
|
||||
break;
|
||||
@@ -3365,6 +3361,7 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
break;
|
||||
|
||||
default:;
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
||||
@@ -3378,6 +3375,7 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
instance_t instance;
|
||||
unsigned int Mod_id;
|
||||
int result;
|
||||
int CC_id =0;
|
||||
#endif
|
||||
|
||||
#undef DEBUG_PHY_PROC
|
||||
@@ -3442,7 +3440,7 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
{
|
||||
hashtable_rc_t hashtable_rc;
|
||||
|
||||
hashtable_rc = hashtable_is_key_exists(PHY_vars_UE_g[Mod_id]->ral_thresholds_timed, (uint64_t)(TIMER_HAS_EXPIRED(msg_p).timer_id));
|
||||
hashtable_rc = hashtable_is_key_exists(PHY_vars_UE_g[Mod_id][CC_id]->ral_thresholds_timed, (uint64_t)(TIMER_HAS_EXPIRED(msg_p).timer_id));
|
||||
if (hashtable_rc == HASH_TABLE_OK) {
|
||||
phy_UE_lte_check_measurement_thresholds(instance, (ral_threshold_phy_t*)TIMER_HAS_EXPIRED(msg_p).arg);
|
||||
}
|
||||
@@ -3483,14 +3481,14 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
switch (PHY_MEAS_THRESHOLD_REQ(msg_p).cfg_param.link_param_type.choice) {
|
||||
case RAL_LINK_PARAM_TYPE_CHOICE_GEN:
|
||||
SLIST_INSERT_HEAD(
|
||||
&PHY_vars_UE_g[Mod_id]->ral_thresholds_gen_polled[PHY_MEAS_THRESHOLD_REQ(msg_p).cfg_param.link_param_type._union.link_param_gen],
|
||||
&PHY_vars_UE_g[Mod_id][CC_id]->ral_thresholds_gen_polled[PHY_MEAS_THRESHOLD_REQ(msg_p).cfg_param.link_param_type._union.link_param_gen],
|
||||
threshold_phy_p,
|
||||
ral_thresholds);
|
||||
break;
|
||||
|
||||
case RAL_LINK_PARAM_TYPE_CHOICE_LTE:
|
||||
SLIST_INSERT_HEAD(
|
||||
&PHY_vars_UE_g[Mod_id]->ral_thresholds_lte_polled[PHY_MEAS_THRESHOLD_REQ(msg_p).cfg_param.link_param_type._union.link_param_lte],
|
||||
&PHY_vars_UE_g[Mod_id][CC_id]->ral_thresholds_lte_polled[PHY_MEAS_THRESHOLD_REQ(msg_p).cfg_param.link_param_type._union.link_param_lte],
|
||||
threshold_phy_p,
|
||||
ral_thresholds);
|
||||
break;
|
||||
@@ -3512,7 +3510,7 @@ void phy_UE_lte_check_measurement_thresholds(instance_t instanceP, ral_threshold
|
||||
&timer_id);
|
||||
|
||||
if (res == 0) {
|
||||
hashtable_rc = hashtable_insert(PHY_vars_UE_g[Mod_id]->ral_thresholds_timed, (uint64_t )timer_id, (void*)threshold_phy_p);
|
||||
hashtable_rc = hashtable_insert(PHY_vars_UE_g[Mod_id][CC_id]->ral_thresholds_timed, (uint64_t )timer_id, (void*)threshold_phy_p);
|
||||
if (hashtable_rc == HASH_TABLE_OK) {
|
||||
threshold_phy_p->timer_id = timer_id;
|
||||
} else {
|
||||
|
||||
@@ -325,6 +325,8 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP];
|
||||
UE_list_t *UE_list = &eNB->UE_list;
|
||||
LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs];
|
||||
int continue_flag=0;
|
||||
|
||||
if (UE_list->head==-1)
|
||||
return;
|
||||
|
||||
@@ -376,21 +378,29 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
if (rnti==0) {
|
||||
LOG_N(MAC,"Cannot find rnti for UE_id %d (num_UEs %d)\n",UE_id,UE_list->num_UEs);
|
||||
// mac_xface->macphy_exit("Cannot find rnti for UE_id");
|
||||
continue;
|
||||
continue_flag=1;
|
||||
}
|
||||
if (eNB_UE_stats==NULL) {
|
||||
LOG_N(MAC,"[eNB] Cannot find eNB_UE_stats\n");
|
||||
// mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n");
|
||||
continue;
|
||||
continue_flag=1;
|
||||
}
|
||||
if ((pre_nb_available_rbs[CC_id][UE_id] == 0) || (nCCE[CC_id] < (1<<aggregation))) {
|
||||
LOG_D(MAC,"[eNB %d] Frame %d : no RB allocated for UE %d on CC_id %d: continue \n",
|
||||
module_idP, frameP, UE_id, CC_id, nb_rb_used0[CC_id], pre_nb_available_rbs[CC_id][UE_id], nCCE[CC_id], aggregation);
|
||||
//if(mac_xface->get_transmission_mode(module_idP,rnti)==5)
|
||||
continue; //to next user (there might be rbs availiable for other UEs in TM5
|
||||
continue_flag=1; //to next user (there might be rbs availiable for other UEs in TM5
|
||||
// else
|
||||
// break;
|
||||
}
|
||||
if (continue_flag == 1 ){
|
||||
add_ue_dlsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_DL_NONE);
|
||||
continue;
|
||||
}
|
||||
if (frame_parms[CC_id]->frame_type == TDD)
|
||||
set_ue_dai (subframeP,
|
||||
frame_parms[CC_id]->tdd_config,
|
||||
@@ -430,9 +440,10 @@ void schedule_ue_spec(module_id_t module_idP,
|
||||
UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0;
|
||||
}
|
||||
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, available rb %d, cqi %d, mcs %d, rrc status %d)\n",
|
||||
LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, ncc %d, rrc %d)\n",
|
||||
module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round,nb_available_rb,
|
||||
eNB_UE_stats->DL_cqi[0], eNB_UE_stats->dlsch_mcs1,
|
||||
nCCE[CC_id],
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status);
|
||||
|
||||
|
||||
@@ -1718,7 +1729,7 @@ void fill_DLSCH_dci(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP
|
||||
case 1:
|
||||
|
||||
case 2:
|
||||
LOG_D(MAC,"[USER-PLANE DEFAULT DRB] Adding UE spec DCI for %d PRBS (%x) => ",nb_rb,rballoc);
|
||||
LOG_D(MAC,"[eNB %d] Adding UE %d spec DCI for %d PRBS (rb alloc: %x) \n",module_idP, UE_id, nb_rb,rballoc);
|
||||
if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) {
|
||||
switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
|
||||
@@ -540,6 +540,8 @@ void add_ue_spec_dci(DCI_PDU *DCI_pdu,void *pdu,rnti_t rnti,unsigned char dci_si
|
||||
DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci].ra_flag = ra_flag;
|
||||
|
||||
DCI_pdu->Num_ue_spec_dci++;
|
||||
|
||||
LOG_D(MAC,"add ue specific dci format %d for rnti %d \n",dci_fmt,rnti);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -467,6 +467,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, uint8_t cba_group_
|
||||
mac_xface->get_TBS_DL = get_TBS_DL;
|
||||
mac_xface->get_TBS_UL = get_TBS_UL;
|
||||
mac_xface->get_nCCE_max = get_nCCE_max;
|
||||
mac_xface->get_nCCE_offset = get_nCCE_offset;
|
||||
mac_xface->get_ue_mode = get_ue_mode;
|
||||
mac_xface->phy_config_sib1_eNB = phy_config_sib1_eNB;
|
||||
mac_xface->phy_config_sib1_ue = phy_config_sib1_ue;
|
||||
|
||||
@@ -241,6 +241,9 @@ typedef struct
|
||||
/// Function to retrieve number of CCE
|
||||
uint16_t (*get_nCCE_max)(module_id_t Mod_id,uint8_t CC_id);
|
||||
|
||||
/// Function to get the CCE offset
|
||||
int (*get_nCCE_offset)(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
|
||||
|
||||
/// Function to retrieve number of PRB in an rb_alloc
|
||||
uint32_t (*get_nb_rb)(uint8_t ra_header, uint32_t rb_alloc, int n_rb_dl);
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
|
||||
for i in range(NUM_eNB) :
|
||||
for j in range(NUM_UE) :
|
||||
conf = '-a -A AWGN -l6 -u' + str(j+1) +' -b'+ str(i+1)
|
||||
conf = '-a -A AWGN -l7 -u' + str(j+1) +' -b'+ str(i+1)
|
||||
trace = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + '.txt'
|
||||
tee = ' 2>&1 > ' + trace
|
||||
|
||||
@@ -116,7 +116,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
oai.send('./oaisim.rel8.nas.' + host + ' ' + conf + ' &')
|
||||
else :
|
||||
oai.send('echo '+pw+ ' | sudo -S -E ./oaisim.rel8.nas.'+ host + ' ' + conf + tee + ' &')
|
||||
time.sleep(20)
|
||||
time.sleep(10)
|
||||
for k in range(NUM_TRIALS) :
|
||||
trace_ping = logdir + '/log_' + host + case + test + '_' + str(i) + str(j) + str(k) + '_ping.txt'
|
||||
tee_ping = ' 2>&1 | tee ' + trace_ping
|
||||
@@ -176,7 +176,7 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
|
||||
log_name = logdir + '/log_' + host + case + test + '_' + str(i) + str(j)
|
||||
itti_name = log_name + '.log'
|
||||
trace_name = log_name + '.txt'
|
||||
conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.sfr.sud.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
|
||||
conf = '-a -l7 -A AWGN --enb-conf ../../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.conf -n' + str((i+1+j) * 50) + ' -u' + str(i+1) +' -b'+ str(j+1) + ' -K' + itti_name
|
||||
tee = ' 2>&1 | tee -a ' + trace_name
|
||||
command = './oaisim.rel8.itti.' + host + ' ' + conf
|
||||
oai.send('echo ' + command + ' > ' + trace_name + ';')
|
||||
|
||||
@@ -94,7 +94,11 @@ try:
|
||||
print "username: " + user
|
||||
#print "password: " + pw
|
||||
|
||||
prompt = os.getenv("PS1")[-2]
|
||||
try:
|
||||
prompt = os.getenv("PS1")[-2]
|
||||
except :
|
||||
#prompt = input('set your shell prompt: ')
|
||||
prompt = '$'
|
||||
print "your prompt is: " + prompt
|
||||
|
||||
oai.connect(user,pw,prompt)
|
||||
|
||||
Reference in New Issue
Block a user