Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
173f10e5
Commit
173f10e5
authored
May 27, 2019
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding uhd priority setting in ru_thread_tx
parent
eaa83242
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
21 deletions
+40
-21
executables/nr-gnb.c
executables/nr-gnb.c
+0
-11
executables/nr-ru.c
executables/nr-ru.c
+6
-0
targets/ARCH/COMMON/common_lib.c
targets/ARCH/COMMON/common_lib.c
+31
-7
targets/ARCH/COMMON/common_lib.h
targets/ARCH/COMMON/common_lib.h
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
+1
-1
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
.../GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
+1
-1
No files found.
executables/nr-gnb.c
View file @
173f10e5
...
@@ -415,9 +415,6 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
...
@@ -415,9 +415,6 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
RU_proc_t
*
ru_proc
;
RU_proc_t
*
ru_proc
;
int
waitret
,
ret
;
int
waitret
,
ret
;
struct
timespec
wait
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
10000000L
;
...
@@ -484,10 +481,6 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
...
@@ -484,10 +481,6 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
int
ret
;
int
ret
;
struct
timespec
wait
;
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc_tx
->
mutex
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc_tx
->
mutex
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
...
@@ -524,7 +517,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
...
@@ -524,7 +517,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
RU_proc_t
*
ru_proc
=&
ru
->
proc
;
RU_proc_t
*
ru_proc
=&
ru
->
proc
;
int
ret
;
int
ret
;
int
i
;
int
i
;
struct
timespec
wait
;
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_RU
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
proc
->
mutex_RU
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
for
(
i
=
0
;
i
<
gNB
->
num_RU
;
i
++
)
{
for
(
i
=
0
;
i
<
gNB
->
num_RU
;
i
++
)
{
...
@@ -546,9 +538,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
...
@@ -546,9 +538,6 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
}
}
wait
.
tv_sec
=
0
;
wait
.
tv_nsec
=
5000000L
;
// wake up TX for subframe n+sl_ahead
// wake up TX for subframe n+sl_ahead
// lock the TX mutex and make sure the thread is ready
// lock the TX mutex and make sure the thread is ready
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc
->
mutex
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
L1_proc
->
mutex
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
...
...
executables/nr-ru.c
View file @
173f10e5
...
@@ -1208,6 +1208,12 @@ static void *ru_thread_tx( void *param ) {
...
@@ -1208,6 +1208,12 @@ static void *ru_thread_tx( void *param ) {
int
i
=
0
;
int
i
=
0
;
int
ret
;
int
ret
;
if
(
ru
->
if_south
==
LOCAL_RF
)
{
uhd_set_thread_prio
();
LOG_I
(
PHY
,
"set ru_thread_tx uhd priority"
);
}
wait_on_condition
(
&
proc
->
mutex_FH1
,
&
proc
->
cond_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
wait_on_condition
(
&
proc
->
mutex_FH1
,
&
proc
->
cond_FH1
,
&
proc
->
instance_cnt_FH1
,
"ru_thread_tx"
);
printf
(
"ru_thread_tx ready
\n
"
);
printf
(
"ru_thread_tx ready
\n
"
);
...
...
targets/ARCH/COMMON/common_lib.c
View file @
173f10e5
...
@@ -43,6 +43,8 @@
...
@@ -43,6 +43,8 @@
int
set_device
(
openair0_device
*
device
)
{
int
set_device
(
openair0_device
*
device
)
{
switch
(
device
->
type
)
{
switch
(
device
->
type
)
{
printf
(
"/////////////HW device type %s
\n
"
,
device
->
type
);
case
EXMIMO_DEV
:
case
EXMIMO_DEV
:
LOG_I
(
HW
,
"[%s] has loaded EXPRESS MIMO device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
LOG_I
(
HW
,
"[%s] has loaded EXPRESS MIMO device.
\n
"
,((
device
->
host_type
==
RAU_HOST
)
?
"RAU"
:
"RRU"
));
...
@@ -95,34 +97,56 @@ int set_transport(openair0_device *device) {
...
@@ -95,34 +97,56 @@ int set_transport(openair0_device *device) {
}
}
typedef
int
(
*
devfunc_t
)(
openair0_device
*
,
openair0_config_t
*
,
eth_params_t
*
);
typedef
int
(
*
devfunc_t
)(
openair0_device
*
,
openair0_config_t
*
,
eth_params_t
*
);
//loader_shlibfunc_t shlib_fdesc[2];
/* look for the interface library and load it */
/* look for the interface library and load it */
int
load_lib
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
cfg
,
uint8_t
flag
)
{
int
load_lib
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
cfg
,
uint8_t
flag
)
{
loader_shlibfunc_t
shlib_fdesc
[
2
];
loader_shlibfunc_t
shlib_fdesc
[
1
];
int
ret
=
0
;
int
ret
=
0
;
char
*
libname
;
char
*
libname
;
if
(
flag
==
RAU_LOCAL_RADIO_HEAD
)
{
if
(
flag
==
RAU_LOCAL_RADIO_HEAD
)
{
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
)
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
)
libname
=
"rfsimulator"
;
libname
=
"rfsimulator"
;
else
else
libname
=
OAI_RF_LIBNAME
;
libname
=
OAI_RF_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"device_init"
;
shlib_fdesc
[
0
].
fname
=
"device_init"
;
shlib_fdesc
[
1
].
fname
=
"uhd_set_thread_priority"
;
//
shlib_fdesc[1].fname="uhd_set_thread_priority";
}
else
{
}
else
{
libname
=
OAI_TP_LIBNAME
;
libname
=
OAI_TP_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"transport_init"
;
shlib_fdesc
[
0
].
fname
=
"transport_init"
;
}
}
ret
=
load_module_shlib
(
libname
,
shlib_fdesc
,
2
,
NULL
);
ret
=
load_module_shlib
(
libname
,
shlib_fdesc
,
1
,
NULL
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
LOG_E
(
HW
,
"Library %s couldn't be loaded
\n
"
,
libname
);
LOG_E
(
HW
,
"Library %s couldn't be loaded
\n
"
,
libname
);
}
else
{
}
else
{
ret
=
((
devfunc_t
)
shlib_fdesc
[
0
].
fptr
)(
device
,
openair0_cfg
,
cfg
);
ret
=
((
devfunc_t
)
shlib_fdesc
[
0
].
fptr
)(
device
,
openair0_cfg
,
cfg
);
uhd_set_thread_priority_fun
=
(
set_prio_func_t
)
shlib_fdesc
[
1
].
fptr
;
//
uhd_set_thread_priority_fun = (set_prio_func_t)shlib_fdesc[1].fptr;
}
}
return
ret
;
return
ret
;
}
}
void
uhd_set_thread_prio
(
void
)
{
loader_shlibfunc_t
shlib_fdesc
[
1
];
int
ret
=
0
;
char
*
libname
;
if
(
getenv
(
"RFSIMULATOR"
)
!=
NULL
)
libname
=
"rfsimulator"
;
else
libname
=
OAI_RF_LIBNAME
;
shlib_fdesc
[
0
].
fname
=
"uhd_set_thread_priority"
;
ret
=
load_module_shlib
(
libname
,
shlib_fdesc
,
1
,
NULL
);
if
(
ret
<
0
)
{
LOG_E
(
HW
,
"Library %s couldn't be loaded
\n
"
,
libname
);
}
else
{
(
set_prio_func_t
)
shlib_fdesc
[
0
].
fptr
();
}
return
ret
;
}
int
openair0_device_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
int
openair0_device_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
)
{
...
...
targets/ARCH/COMMON/common_lib.h
View file @
173f10e5
...
@@ -445,7 +445,7 @@ int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *open
...
@@ -445,7 +445,7 @@ int openair0_set_rx_frequencies(openair0_device *device, openair0_config_t *open
#define gettid() syscall(__NR_gettid)
#define gettid() syscall(__NR_gettid)
/*@}*/
/*@}*/
void
uhd_set_thread_prio
rity
(
void
);
void
uhd_set_thread_prio
(
void
);
typedef
void
(
*
set_prio_func_t
)(
void
);
typedef
void
(
*
set_prio_func_t
)(
void
);
set_prio_func_t
uhd_set_thread_priority_fun
;
set_prio_func_t
uhd_set_thread_priority_fun
;
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpx300.conf
View file @
173f10e5
...
@@ -254,7 +254,7 @@ RUs = (
...
@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
114
;
max_rxgain
=
114
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
sdr_addrs
=
"addr=192.168.30.2
"
;
sdr_addrs
=
"type=x300
"
;
}
}
);
);
...
...
targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.217PRB.usrpx300.conf
View file @
173f10e5
...
@@ -254,7 +254,7 @@ RUs = (
...
@@ -254,7 +254,7 @@ RUs = (
max_pdschReferenceSignalPower
= -
27
;
max_pdschReferenceSignalPower
= -
27
;
max_rxgain
=
114
;
max_rxgain
=
114
;
eNB_instances
= [
0
];
eNB_instances
= [
0
];
sdr_addrs
=
"
addr=192.168.30.2
"
;
sdr_addrs
=
"
type=x300
"
;
}
}
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment