Merge remote-tracking branch 'origin/various-fixes-w12' into develop_integration_w12
This commit is contained in:
@@ -418,7 +418,6 @@ int trx_eth_read_raw_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
int trx_eth_read_raw_IF5_mobipass(openair0_device *device, openair0_timestamp *timestamp, void **buff, int nsamps, int cc) {
|
||||
// Read nblocks info from packet itself
|
||||
|
||||
int nblocks = nsamps;
|
||||
int bytes_received=0;
|
||||
eth_state_t *eth = (eth_state_t*)device->priv;
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
||||
IF4p5_header_t *test_header = (IF4p5_header_t*)(buff[0]);
|
||||
|
||||
int block_cnt=0;
|
||||
int again_cnt=0;
|
||||
//int again_cnt=0;
|
||||
packet_size = max(UDP_IF4p5_PRACH_SIZE_BYTES, max(UDP_IF4p5_PULFFT_SIZE_BYTES(nblocks), UDP_IF4p5_PDLFFT_SIZE_BYTES(nblocks)));
|
||||
|
||||
while(bytes_received == -1) {
|
||||
@@ -410,7 +410,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
|
||||
eth->pck_seq_num_cur = *(uint16_t *)buff2;
|
||||
if ( ( eth->pck_seq_num_cur != (eth->pck_seq_num_prev + 1) ) && !((eth->pck_seq_num_prev==MAX_PACKET_SEQ_NUM(nsamps,device->openair0_cfg->samples_per_frame)) && (eth->pck_seq_num_cur==1 )) && !((eth->pck_seq_num_prev==1) && (eth->pck_seq_num_cur==1))) {
|
||||
//#if DEBUG
|
||||
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%llu\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
|
||||
printf("Out of order packet received: current_packet=%d previous_packet=%d timestamp=%"PRId64"\n",eth->pck_seq_num_cur,eth->pck_seq_num_prev,*timestamp);
|
||||
//#endif
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_RX_SEQ_NUM,eth->pck_seq_num_cur);
|
||||
@@ -448,7 +448,7 @@ int eth_set_dev_conf_udp(openair0_device *device) {
|
||||
|
||||
if (sendto(eth->sockfd,msg,msg_len,0,(struct sockaddr *)ð->dest_addr,eth->addr_len)==-1) {
|
||||
perror("ETHERNET: sendto conf_udp");
|
||||
printf("addr_len : %d, msg_len %d\n",eth->addr_len,msg_len);
|
||||
printf("addr_len : %d, msg_len %zd\n",eth->addr_len,msg_len);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ int exmimo_assign_shm_vars(int card_id)
|
||||
int exmimo_allocate_rx_tx_buffers(int card_id)
|
||||
{
|
||||
size_t size;
|
||||
int j,i;
|
||||
int j;
|
||||
dma_addr_t dma_addr_dummy;
|
||||
// Round up to the next PAGE_SIZE (typ. 4096 bytes)
|
||||
size = (ADAC_BUFFERSZ_PERCHAN_B >> PAGE_SHIFT) + 1;
|
||||
@@ -243,8 +243,6 @@ int exmimo_allocate_rx_tx_buffers(int card_id)
|
||||
*/
|
||||
int exmimo_memory_alloc(int card)
|
||||
{
|
||||
int i;
|
||||
|
||||
if ( bigshm_init( card ) ) {
|
||||
printk("exmimo_memory_alloc(): bigshm_init failed for card %d.\n", card);
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1,25 +1,30 @@
|
||||
#ifndef OPENAIRINTERFACE5G_LIMITS_H_
|
||||
#define OPENAIRINTERFACE5G_LIMITS_H_
|
||||
|
||||
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP)
|
||||
#define NUMBER_OF_eNB_MAX 1
|
||||
#define NUMBER_OF_UE_MAX 16
|
||||
#define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_LMSSDR)
|
||||
# define NUMBER_OF_eNB_MAX 1
|
||||
# define NUMBER_OF_UE_MAX 16
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
#else
|
||||
#define NUMBER_OF_eNB_MAX 7
|
||||
#define NUMBER_OF_UE_MAX 20
|
||||
#define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
# define NUMBER_OF_eNB_MAX 7
|
||||
# define NUMBER_OF_UE_MAX 20
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 3
|
||||
|
||||
#if STANDALONE==1
|
||||
#define NUMBER_OF_eNB_MAX 3
|
||||
#define NUMBER_OF_UE_MAX 3
|
||||
#endif
|
||||
# if defined(STANDALONE) && STANDALONE==1
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
# define NUMBER_OF_eNB_MAX 3
|
||||
# define NUMBER_OF_UE_MAX 3
|
||||
# endif
|
||||
|
||||
#if LARGE_SCALE
|
||||
#define NUMBER_OF_eNB_MAX 2
|
||||
#define NUMBER_OF_UE_MAX 120
|
||||
#define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
|
||||
#endif
|
||||
# if defined(LARGE_SCALE) && LARGE_SCALE
|
||||
# undef NUMBER_OF_eNB_MAX
|
||||
# undef NUMBER_OF_UE_MAX
|
||||
# undef NUMBER_OF_CONNECTED_eNB_MAX
|
||||
# define NUMBER_OF_eNB_MAX 2
|
||||
# define NUMBER_OF_UE_MAX 120
|
||||
# define NUMBER_OF_CONNECTED_eNB_MAX 1 // to save some memory
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif /* OPENAIRINTERFACE5G_LIMITS_H_ */
|
||||
|
||||
@@ -87,7 +87,6 @@ void config_UE_mod( rrh_module_t *dev_ue, uint8_t RT_flag,uint8_t NRT_flag) {
|
||||
|
||||
int i;
|
||||
int error_code_UE, error_code_proc_UE;
|
||||
void *tmp;
|
||||
|
||||
RT_flag_UE=RT_flag;
|
||||
NRT_flag_UE=NRT_flag;
|
||||
@@ -245,8 +244,7 @@ void *rrh_UE_thread(void *arg) {
|
||||
|
||||
struct sched_param sched_param_UE_rx, sched_param_UE_tx;
|
||||
int16_t i,cmd; //,nsamps,antenna_index;
|
||||
ssize_t bytes_received;
|
||||
struct timespec time_req_1us, time_rem_1us;
|
||||
//struct timespec time_req_1us;
|
||||
pthread_t UE_rx_thread, UE_tx_thread;
|
||||
pthread_attr_t attr_UE_rx, attr_UE_tx;
|
||||
int error_code_UE_rx, error_code_UE_tx;
|
||||
@@ -254,8 +252,8 @@ void *rrh_UE_thread(void *arg) {
|
||||
unsigned int samples_per_frame=0;
|
||||
|
||||
samples_per_frame= dev->eth_dev.openair0_cfg->samples_per_frame;
|
||||
time_req_1us.tv_sec = 0;
|
||||
time_req_1us.tv_nsec = 1000;
|
||||
//time_req_1us.tv_sec = 0;
|
||||
//time_req_1us.tv_nsec = 1000;
|
||||
|
||||
while (rrh_exit==0) {
|
||||
|
||||
@@ -338,12 +336,15 @@ void *rrh_UE_rx_thread(void *arg) {
|
||||
int trace_cnt=0;
|
||||
unsigned long long max_rx_time=0, min_rx_time=133333, total_rx_time=0, average_rx_time=133333, s_period=0, trial=0;
|
||||
unsigned int samples_per_frame=0;
|
||||
openair0_timestamp temp, last_hw_counter=0;
|
||||
openair0_timestamp last_hw_counter=0;
|
||||
|
||||
antenna_index = 0;
|
||||
nsamps = dev->eth_dev.openair0_cfg->samples_per_packet;
|
||||
samples_per_frame = dev->eth_dev.openair0_cfg->samples_per_frame;
|
||||
|
||||
/* TODO: check if setting time0 has to be done here */
|
||||
clock_gettime(CLOCK_MONOTONIC,&time0);
|
||||
|
||||
while (rrh_exit == 0) {
|
||||
if (!UE_rx_started) {
|
||||
UE_rx_started=1; //Set this flag to 1 to indicate that a UE started retrieving data
|
||||
@@ -446,7 +447,7 @@ void *rrh_UE_rx_thread(void *arg) {
|
||||
|
||||
if (s_period++ == PRINTF_PERIOD) {
|
||||
s_period=0;
|
||||
printf("Average UE RX time : %lu\tMax RX time : %lu\tMin RX time : %lu\n",average_rx_time,max_rx_time,min_rx_time);
|
||||
printf("Average UE RX time : %llu\tMax RX time : %llu\tMin RX time : %llu\n",average_rx_time,max_rx_time,min_rx_time);
|
||||
|
||||
}
|
||||
|
||||
@@ -481,7 +482,6 @@ void *rrh_UE_tx_thread(void *arg) {
|
||||
rrh_module_t *dev = (rrh_module_t *)arg;
|
||||
ssize_t bytes_received;
|
||||
int antenna_index, nsamps;
|
||||
int trace_cnt=0;
|
||||
unsigned int samples_per_frame=0;
|
||||
|
||||
antenna_index = 0;
|
||||
@@ -504,7 +504,7 @@ void *rrh_UE_tx_thread(void *arg) {
|
||||
if (NRT_flag_UE==1) {
|
||||
nrt_UE_counter[antenna_index]++;
|
||||
}
|
||||
printf(" first part size: %d second part size: %d idx=%d \n",
|
||||
printf(" first part size: %d second part size: %"PRId64" idx=%"PRId64"\n",
|
||||
(int32_t)(((samples_per_frame)<<2)-((timestamp_UE_tx[antenna_index]%(samples_per_frame))<<2)),
|
||||
(nsamps<<2)-((samples_per_frame)<<2)+((timestamp_UE_tx[antenna_index]%(samples_per_frame))<<2),
|
||||
timestamp_UE_tx[antenna_index]%(samples_per_frame));
|
||||
|
||||
@@ -539,13 +539,13 @@ void *rrh_eNB_rx_thread(void *arg) {
|
||||
|
||||
void *rrh_eNB_tx_thread(void *arg) {
|
||||
|
||||
struct timespec time0a,time0,time1,time2;
|
||||
struct timespec time0,time1,time2;
|
||||
|
||||
rrh_module_t *dev = (rrh_module_t *)arg;
|
||||
struct timespec time_req_1us, time_rem_1us;
|
||||
ssize_t bytes_received;
|
||||
int i;
|
||||
openair0_timestamp last_hw_counter=0;
|
||||
//openair0_timestamp last_hw_counter=0;
|
||||
unsigned int samples_per_frame=0,samples_per_subframe=0;
|
||||
unsigned int spp_rf=0, spp_eth=0;
|
||||
uint8_t loopback=0,measurements=0;
|
||||
@@ -634,7 +634,7 @@ void *rrh_eNB_tx_thread(void *arg) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TX_TS, timestamp_tx&0xffffffff );
|
||||
|
||||
|
||||
if (dev->devs->type == NONE_DEV) last_hw_counter=hw_counter;
|
||||
//if (dev->devs->type == NONE_DEV) last_hw_counter=hw_counter;
|
||||
|
||||
|
||||
if (loopback ==1 ) {
|
||||
|
||||
@@ -319,8 +319,8 @@ void help (void) {
|
||||
printf(" --ue-rxgain set UE RX gain\n");
|
||||
printf(" --ue-rxgain-off external UE amplifier offset\n");
|
||||
printf(" --ue-txgain set UE TX gain\n");
|
||||
printf(" --ue-nb-ant-rx set UE number of rx antennas ");
|
||||
printf(" --ue-scan_carrier set UE to scan around carrier\n");
|
||||
printf(" --ue-nb-ant-rx set UE number of rx antennas\n");
|
||||
printf(" --ue-scan-carrier set UE to scan around carrier\n");
|
||||
printf(" --dlsch-demod-shift dynamic shift for LLR compuation for TM3/4 (default 0)\n");
|
||||
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
|
||||
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
/* local IP/MAC address is detected*/
|
||||
char rrh_ip[20] = "0.0.0.0";
|
||||
unsigned char rrh_mac[6] = "0:0:0:0:0:0";
|
||||
unsigned char rrh_mac[20] = "0:0:0:0:0:0";
|
||||
int rrh_port = 50000; // has to be an option
|
||||
|
||||
/* log */
|
||||
@@ -197,7 +197,7 @@ static rrh_module_t new_module (unsigned int id) {
|
||||
openair0_cfg.my_port = rrh_port;
|
||||
LOG_I(RRH,"UDP mode selected for ethernet.\n");
|
||||
} else if (eth_mode==ETH_RAW_MODE) {
|
||||
openair0_cfg.my_addr = &rrh_mac[0];
|
||||
openair0_cfg.my_addr = (char*)&rrh_mac[0];
|
||||
openair0_cfg.my_port = rrh_port;
|
||||
LOG_I(RRH,"RAW mode selected for ethernet.\n");
|
||||
}
|
||||
@@ -342,7 +342,7 @@ static int get_address(char* if_name, uint8_t flag) {
|
||||
perror("IOCTL:");
|
||||
exit(-1);
|
||||
}
|
||||
ether_ntoa_r ((unsigned char *)ifr.ifr_hwaddr.sa_data, rrh_mac);
|
||||
ether_ntoa_r ((struct ether_addr *)ifr.ifr_hwaddr.sa_data, (char*)rrh_mac);
|
||||
LOG_I(RRH,"%s: MAC address: %s\n",if_name,rrh_mac);
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ void *timer_proc(void *arg) {
|
||||
|
||||
timer_t timerid;
|
||||
struct itimerspec *timer= (struct itimerspec *)arg ; // the timer data structure
|
||||
struct itimerspec *old_value;
|
||||
struct itimerspec old_value;
|
||||
|
||||
|
||||
#ifdef DEADLINE_SCHEDULER
|
||||
@@ -407,7 +407,7 @@ void *timer_proc(void *arg) {
|
||||
|
||||
signal(SIGALRM, timer_signal_handler);
|
||||
LOG_I(RRH,"Timer has started!\n");
|
||||
timer_settime (timerid, 0, timer, old_value);
|
||||
timer_settime (timerid, 0, timer, &old_value);
|
||||
|
||||
while (!rrh_exit) {
|
||||
sleep(1);
|
||||
|
||||
@@ -472,7 +472,7 @@ l2l1_task (void *args_p)
|
||||
// Framing variables
|
||||
int32_t sf;
|
||||
|
||||
char fname[64], vname[64];
|
||||
//char fname[64], vname[64];
|
||||
|
||||
//#ifdef XFORMS
|
||||
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
|
||||
@@ -1216,7 +1216,10 @@ main (int argc, char **argv)
|
||||
for(int i =0; i<NUMBER_OF_UE_MAX; i++){
|
||||
char command_line[100];
|
||||
sprintf(command_line, "while ip rule del table %d; do true; done",i+201);
|
||||
system(command_line);
|
||||
/* we don't care about return value from system(), but let's the
|
||||
* compiler be silent, so let's do "if (XX);"
|
||||
*/
|
||||
if (system(command_line)) /* nothing */;
|
||||
}
|
||||
// start thread for log gen
|
||||
log_thread_init ();
|
||||
@@ -1286,6 +1289,7 @@ main (int argc, char **argv)
|
||||
|
||||
init_openair2 ();
|
||||
|
||||
void init_openair0(void);
|
||||
init_openair0();
|
||||
|
||||
init_ocm ();
|
||||
@@ -1383,14 +1387,16 @@ reset_opp_meas_oaisim (void)
|
||||
|
||||
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx);
|
||||
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_channel_estimation_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_freq_offset_estimation_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1]);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_turbo_decoding_stats);
|
||||
reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats);
|
||||
@@ -1552,8 +1558,10 @@ print_opp_meas_oaisim (void)
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc, "[UE][total_phy_proc]",
|
||||
&oaisim_stats, &oaisim_stats_f);
|
||||
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx,
|
||||
"[UE][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
|
||||
"[UE][total_phy_proc_rx[0]]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1],
|
||||
"[UE][total_phy_proc_rx[1]]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats,
|
||||
"[UE][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats, "[UE][rx_dft]",
|
||||
@@ -1566,8 +1574,10 @@ print_opp_meas_oaisim (void)
|
||||
&oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_unscrambling_stats,
|
||||
"[UE][unscrambling]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats,
|
||||
"[UE][decoding]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0],
|
||||
"[UE][decoding[0]]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1],
|
||||
"[UE][decoding[1]]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats,
|
||||
"[UE][rate_unmatching]", &oaisim_stats, &oaisim_stats_f);
|
||||
print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats,
|
||||
|
||||
@@ -91,7 +91,9 @@ extern char smbv_ip[16];
|
||||
#define K 2 // averaging coefficient
|
||||
#define TARGET_SF_TIME_NS 1000000 // 1ms = 1000000 ns
|
||||
|
||||
#ifndef min
|
||||
#define min(a,b) ((a)<(b)?(a):(b))
|
||||
#endif
|
||||
|
||||
int otg_times = 0;
|
||||
int if_times = 0;
|
||||
@@ -1014,8 +1016,8 @@ int eNB_trx_stop(openair0_device *device) {
|
||||
int UE_trx_start(openair0_device *device) {
|
||||
return(0);
|
||||
}
|
||||
int UE_trx_end(openair0_device *device) {
|
||||
return(0);
|
||||
void UE_trx_end(openair0_device *device) {
|
||||
return;
|
||||
}
|
||||
int UE_trx_stop(openair0_device *device) {
|
||||
return(0);
|
||||
@@ -1293,7 +1295,7 @@ void init_devices(void){
|
||||
|
||||
void init_openair1(void)
|
||||
{
|
||||
module_id_t UE_id, eNB_id;
|
||||
module_id_t UE_id, eNB_id = 0;
|
||||
uint8_t CC_id;
|
||||
#if ENABLE_RAL
|
||||
int list_index;
|
||||
@@ -1447,6 +1449,7 @@ void init_openair1(void)
|
||||
|
||||
} // CC_id
|
||||
} // UE_id
|
||||
extern void init_UE(int);
|
||||
init_UE(NB_UE_INST);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user