Commit ba24109d authored by Raymond Knopp's avatar Raymond Knopp

added UDP configuration in ORI data structures

parent 0e419d23
......@@ -47,7 +47,7 @@
#include "ethernet_lib.h"
#include "common/ran_context.h"
#define DEBUG 0
#define DEBUG 1
// These are for IF5 and must be put into the device structure if multiple RUs in the same RAU !!!!!!!!!!!!!!!!!
uint16_t pck_seq_num = 1;
......@@ -142,8 +142,8 @@ int eth_socket_init_udp(openair0_device *device) {
perror("ETHERNET: Cannot set SO_REUSEADDR option on socket (control)");
exit(0);
}
if (setsockopt(eth->sockfdd, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int))) {
perror("ETHERNET: Cannot set SO_REUSEADDR option on socket (user)");
if (setsockopt(eth->sockfdd, SOL_SOCKET, SO_NO_CHECK, &enable, sizeof(int))) {
perror("ETHERNET: Cannot set SO_NO_CHECK option on socket (user)");
exit(0);
}
......@@ -404,7 +404,7 @@ int trx_eth_read_udp(openair0_device *device, openair0_timestamp *timestamp, voi
perror("ETHERNET READ: ");
exit(-1);
} else {
printf("AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN AGAIN \n");
bytes_received=0;
goto again;
}
} else if (errno == EWOULDBLOCK) {
......
......@@ -60,6 +60,7 @@ int trx_eth_start(openair0_device *device) {
if (eth->flags == ETH_UDP_IF5_ORI_MODE) {
AssertFatal(device->thirdparty_init != NULL, "device->thirdparty_init is null\n");
AssertFatal(device->thirdparty_init(device) == 0, "third-party init failed\n");
device->openair0_cfg->samples_per_packet = 256;
}
/* initialize socket */
if (eth->flags == ETH_RAW_MODE) {
......@@ -136,8 +137,7 @@ int trx_eth_start(openair0_device *device) {
if(eth_get_dev_conf_udp(device)!=0) return -1;
}*/
/* adjust MTU wrt number of samples per packet */
if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
//if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
if(ethernet_tune (device,RCV_TIMEOUT,999999)!=0) return -1;
}
......
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