timeout for UDP recvfrom
This commit is contained in:
@@ -229,7 +229,7 @@ void recv_IF4p5(PHY_VARS_eNB *eNB, int *frame, int *subframe, uint16_t *packet_t
|
|||||||
|
|
||||||
*packet_type = packet_header->sub_type;
|
*packet_type = packet_header->sub_type;
|
||||||
|
|
||||||
printf("CC_id %d : frame %d, subframe %d\n",eNB->CC_id,*frame,*subframe);
|
// printf("CC_id %d : frame %d, subframe %d\n",eNB->CC_id,*frame,*subframe);
|
||||||
|
|
||||||
if (*packet_type == IF4p5_PDLFFT) {
|
if (*packet_type == IF4p5_PDLFFT) {
|
||||||
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
|
*symbol_number = ((packet_header->frame_status)>>26)&0x000f;
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
|||||||
if (bytes_received ==-1) {
|
if (bytes_received ==-1) {
|
||||||
eth->num_rx_errors++;
|
eth->num_rx_errors++;
|
||||||
if (errno == EAGAIN) {
|
if (errno == EAGAIN) {
|
||||||
|
/*
|
||||||
again_cnt++;
|
again_cnt++;
|
||||||
usleep(10);
|
usleep(10);
|
||||||
if (again_cnt == 1000) {
|
if (again_cnt == 1000) {
|
||||||
@@ -169,6 +170,9 @@ int trx_eth_read_udp_IF4p5(openair0_device *device, openair0_timestamp *timestam
|
|||||||
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
|
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
printf("Lost IF4p5 connection with %s\n", inet_ntoa(eth->dest_addr.sin_addr));
|
||||||
|
exit(-1);
|
||||||
} else if (errno == EWOULDBLOCK) {
|
} else if (errno == EWOULDBLOCK) {
|
||||||
block_cnt++;
|
block_cnt++;
|
||||||
usleep(10);
|
usleep(10);
|
||||||
|
|||||||
@@ -96,6 +96,7 @@ int trx_eth_start(openair0_device *device) {
|
|||||||
} else {
|
} else {
|
||||||
if(eth_get_dev_conf_udp(device)!=0) return -1;
|
if(eth_get_dev_conf_udp(device)!=0) return -1;
|
||||||
}
|
}
|
||||||
|
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
|
||||||
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
} else if (eth->flags == ETH_RAW_IF5_MOBIPASS) {
|
||||||
printf("Setting ETHERNET to RAW_IF5_MODE\n");
|
printf("Setting ETHERNET to RAW_IF5_MODE\n");
|
||||||
if (eth_socket_init_raw(device)!=0) return -1;
|
if (eth_socket_init_raw(device)!=0) return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user