Merge remote-tracking branch 'origin/develop' into NR_UE_SA
This commit is contained in:
@@ -42,7 +42,6 @@
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <linux/sysctl.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include "common_lib.h"
|
||||
#include "ethernet_lib.h"
|
||||
@@ -219,11 +218,6 @@ int ethernet_tune(openair0_device *device,
|
||||
struct timeval timeout;
|
||||
struct ifreq ifr;
|
||||
char system_cmd[256];
|
||||
int rname[] = { CTL_NET, NET_CORE, NET_CORE_RMEM_MAX };
|
||||
int wname[] = { CTL_NET, NET_CORE, NET_CORE_WMEM_MAX };
|
||||
int namelen=3;
|
||||
int newval[1];
|
||||
int newlen=sizeof(newval);
|
||||
int ret=0;
|
||||
// int i=0;
|
||||
|
||||
@@ -363,28 +357,36 @@ int ethernet_tune(openair0_device *device,
|
||||
}
|
||||
break;
|
||||
case KERNEL_RCV_BUF_MAX_SIZE:
|
||||
newval[0] = value;
|
||||
ret=sysctl(rname, namelen, NULL, 0, newval, newlen);
|
||||
if (ret) {
|
||||
fprintf(stderr,"[ETHERNET] Error using sysctl():%s\n",strerror(errno));
|
||||
} else {
|
||||
printf("[ETHERNET] Kernel network receive buffer max size is set to %u\n",(unsigned int)newval[0]);
|
||||
}
|
||||
break;
|
||||
ret=snprintf(system_cmd,sizeof(system_cmd),"sysctl -w net.core.rmem_max=%d",value);
|
||||
if (ret > 0) {
|
||||
ret=system(system_cmd);
|
||||
if (ret == -1) {
|
||||
fprintf (stderr,"[ETHERNET] Can't start shell to execute %s %s",system_cmd, strerror(errno));
|
||||
} else {
|
||||
printf ("[ETHERNET] status of %s is %d\n", system_cmd, WEXITSTATUS(ret));
|
||||
}
|
||||
printf("[ETHERNET] net core rmem %s\n",system_cmd);
|
||||
} else {
|
||||
perror("[ETHERNET] Can't set net core rmem\n");
|
||||
}
|
||||
break;
|
||||
case KERNEL_SND_BUF_MAX_SIZE:
|
||||
newval[0] = value;
|
||||
ret=sysctl(wname, namelen, NULL, 0, newval, newlen);
|
||||
if (ret) {
|
||||
fprintf(stderr,"[ETHERNET] Error using sysctl():%s\n",strerror(errno));
|
||||
} else {
|
||||
printf("[ETHERNET] Kernel network send buffer max size is set to %u\n",(unsigned int)newval[0]);
|
||||
}
|
||||
break;
|
||||
|
||||
ret=snprintf(system_cmd,sizeof(system_cmd),"sysctl -w net.core.wmem_max=%d",value);
|
||||
if (ret > 0) {
|
||||
ret=system(system_cmd);
|
||||
if (ret == -1) {
|
||||
fprintf (stderr,"[ETHERNET] Can't start shell to execute %s %s",system_cmd, strerror(errno));
|
||||
} else {
|
||||
printf ("[ETHERNET] status of %s is %d\n", system_cmd, WEXITSTATUS(ret));
|
||||
}
|
||||
printf("[ETHERNET] net core wmem %s\n",system_cmd);
|
||||
} else {
|
||||
perror("[ETHERNET] Can't set net core wmem\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -810,6 +810,7 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg) {
|
||||
device->trx_read_func = rfsimulator_read;
|
||||
/* let's pretend to be a b2x0 */
|
||||
device->type = RFSIMULATOR;
|
||||
openair0_cfg[0].rx_gain[0] = 0;
|
||||
device->openair0_cfg=&openair0_cfg[0];
|
||||
device->priv = rfsimulator;
|
||||
device->trx_write_init = rfsimulator_write_init;
|
||||
|
||||
@@ -169,8 +169,6 @@ extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
|
||||
extern void init_eNB_afterRU(void);
|
||||
|
||||
RU_t **RCconfig_RU(int nb_RU,int nb_L1_inst,PHY_VARS_eNB ***eNB,uint64_t *ru_mask,pthread_mutex_t *ru_mutex,pthread_cond_t *ru_cond);
|
||||
|
||||
int transmission_mode=1;
|
||||
|
||||
Reference in New Issue
Block a user