Commit 23d7b52d authored by Jerome Peraldi's avatar Jerome Peraldi

Merge branch 'private/bugz129248' into 'sqn/3GPP_TTCN_System_Simulator'

bug #129248 [L3 SIMU] being able to launch CI without root rights: RAN 4G can...

See merge request sequans/system/ttcn/openairinterface5g!39
parents 1426fd81 99a42273
...@@ -228,7 +228,12 @@ int rt_sleep_ns (uint64_t x) ...@@ -228,7 +228,12 @@ int rt_sleep_ns (uint64_t x)
void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){ void threadCreate(pthread_t* t, void * (*func)(void*), void * param, char* name, int affinity, int priority){
pthread_attr_t attr; pthread_attr_t attr;
int ret; int ret;
//To not impact HW TTCN setup with USRP, best is to keep OAI thread configuration with RT
#ifndef OAI_USRP
int settingPriority = 0;
#else
int settingPriority = 1; int settingPriority = 1;
#endif
ret=pthread_attr_init(&attr); ret=pthread_attr_init(&attr);
AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno); AssertFatal(ret==0,"ret: %d, errno: %d\n",ret, errno);
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#include <errno.h> #include <errno.h>
#include "utils.h" #include "utils.h"
const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len) const char *hexdump(const void *data, size_t data_len, char *out, size_t out_len)
{ {
char *p = out; char *p = out;
...@@ -127,6 +125,10 @@ void *memcpy1(void *dst,const void *src,size_t n) { ...@@ -127,6 +125,10 @@ void *memcpy1(void *dst,const void *src,size_t n) {
void set_priority(int priority) void set_priority(int priority)
{ {
//bug 129248, to deploy our CI on any server with strong security constraints (no possibility to be root)
// for USRP setup we can be root and let's not modify priority behaviour
// sched_setscheduler could be used potentially in the same way than TTCN simu as we don't have any constraints on performances
#ifdef OAI_USRP
struct sched_param param = struct sched_param param =
{ {
.sched_priority = priority, .sched_priority = priority,
...@@ -137,4 +139,5 @@ void set_priority(int priority) ...@@ -137,4 +139,5 @@ void set_priority(int priority)
fprintf(stderr, "sched_setscheduler: %s\n", strerror(errno)); fprintf(stderr, "sched_setscheduler: %s\n", strerror(errno));
abort(); abort();
} }
#endif
} }
...@@ -2654,6 +2654,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask, int id) { ...@@ -2654,6 +2654,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask, int id) {
((LINK_ENB_PDCP_TO_GTPV1U)?"usegtp":""), ((LINK_ENB_PDCP_TO_GTPV1U)?"usegtp":""),
((PDCP_USE_NETLINK)?"usenetlink":"")); ((PDCP_USE_NETLINK)?"usenetlink":""));
if (RC.ss.mode < SS_SOFTMODEM) {
if (PDCP_USE_NETLINK) { if (PDCP_USE_NETLINK) {
nas_getparams(); nas_getparams();
...@@ -2686,7 +2687,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask, int id) { ...@@ -2686,7 +2687,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask, int id) {
}else }else
LOG_E(PDCP, "ENB pdcp will not use tun interface\n"); LOG_E(PDCP, "ENB pdcp will not use tun interface\n");
} }
}
pthread_create(&pdcp_stats_thread_desc,NULL,pdcp_stats_thread,NULL); pthread_create(&pdcp_stats_thread_desc,NULL,pdcp_stats_thread,NULL);
return pdcp_params.optmask ; return pdcp_params.optmask ;
......
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