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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
lizhongxiao
OpenXG-RAN
Commits
cabb4561
Commit
cabb4561
authored
Jan 03, 2018
by
Wang Tsu-Han
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
seperating rx tx process and fixixng coding threads on different cores
parent
409eadc9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
17 deletions
+37
-17
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+20
-6
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+2
-0
openair1/PHY/defs.h
openair1/PHY/defs.h
+2
-1
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1
-0
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+10
-8
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+2
-2
No files found.
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
cabb4561
...
...
@@ -555,8 +555,8 @@ void *te_thread(void *param) {
pthread_setname_np
(
pthread_self
(),
"te processing"
);
LOG_I
(
PHY
,
"thread te created id=%ld
\n
"
,
syscall
(
__NR_gettid
));
//
CPU_SET(4, &cpuset);
//
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
CPU_SET
(
4
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
PHY_VARS_eNB
*
eNB
=
((
te_params
*
)
param
)
->
eNB
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
...
...
@@ -592,8 +592,8 @@ void *te_thread1(void *param) {
pthread_setname_np
(
pthread_self
(),
"te processing 1"
);
LOG_I
(
PHY
,
"thread te 1 created id=%ld
\n
"
,
syscall
(
__NR_gettid
));
//
CPU_SET(7, &cpuset);
//
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
CPU_SET
(
7
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
PHY_VARS_eNB
*
eNB
=
((
te_params
*
)
param
)
->
eNB
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
...
...
@@ -630,8 +630,8 @@ void *te_thread2(void *param) {
pthread_setname_np
(
pthread_self
(),
"te processing 2"
);
LOG_I
(
PHY
,
"thread te 2 created id=%ld
\n
"
,
syscall
(
__NR_gettid
));
//CPU_SET(7
, &cpuset);
//
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
CPU_SET
(
8
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
PHY_VARS_eNB
*
eNB
=
((
te_params
*
)
param
)
->
eNB
;
eNB_proc_t
*
proc
=
&
eNB
->
proc
;
...
...
@@ -665,6 +665,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_main_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
)
...
...
@@ -787,6 +788,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
pthread_mutex_unlock
(
&
proc
->
mutex_te
[
2
]
);
////////////////////////////////////////////////////////////////
start_meas
(
te_main_stats
);
for
(
r
=
(
dlsch
->
harq_processes
[
harq_pid
]
->
C
>>
2
)
*
3
;
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
C
;
r
++
)
{
if
(
r
<
dlsch
->
harq_processes
[
harq_pid
]
->
Cminus
)
...
...
@@ -839,6 +841,10 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
proc
->
tep
[
1
].
eNB
=
eNB
;
proc
->
tep
[
1
].
dlsch
=
dlsch
;
proc
->
tep
[
1
].
G
=
G
;
proc
->
tep
[
2
].
eNB
=
eNB
;
proc
->
tep
[
2
].
dlsch
=
dlsch
;
proc
->
tep
[
2
].
G
=
G
;
// wakeup worker to do second half segments
if
(
pthread_cond_signal
(
&
proc
->
cond_te
[
0
])
!=
0
)
{
...
...
@@ -851,6 +857,11 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
if
(
pthread_cond_signal
(
&
proc
->
cond_te
[
2
])
!=
0
)
{
printf
(
"[eNB] ERROR pthread_cond_signal for te thread exit
\n
"
);
exit_fun
(
"ERROR pthread_cond_signal"
);
return
(
-
1
);
}
}
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
...
...
@@ -889,6 +900,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
stop_meas
(
rm_stats
);
}
}
stop_meas
(
te_main_stats
);
// wait for worker to finish
start_meas
(
te_wait_stats
);
...
...
@@ -915,6 +927,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_main_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
)
...
...
@@ -950,6 +963,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
rm_stats
,
te_stats
,
te_wait_stats
,
te_main_stats
,
te_wakeup_stats0
,
te_wakeup_stats1
,
i_stats
);
...
...
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
cabb4561
...
...
@@ -131,6 +131,7 @@ int32_t dlsch_encoding_all(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_main_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
);
...
...
@@ -179,6 +180,7 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
time_stats_t
*
rm_stats
,
time_stats_t
*
te_stats
,
time_stats_t
*
te_wait_stats
,
time_stats_t
*
te_main_stats
,
time_stats_t
*
te_wakeup_stats0
,
time_stats_t
*
te_wakeup_stats1
,
time_stats_t
*
i_stats
);
...
...
openair1/PHY/defs.h
View file @
cabb4561
...
...
@@ -965,7 +965,7 @@ typedef struct PHY_VARS_eNB_s {
eth_params_t
eth_params
;
int
rx_total_gain_dB
;
int
(
*
td
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
UE_id
,
int
harq_pid
,
int
llr8_flag
);
int
(
*
te
)(
struct
PHY_VARS_eNB_s
*
,
uint8_t
*
,
uint8_t
,
LTE_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
);
int
(
*
te
)(
struct
PHY_VARS_eNB_s
*
,
uint8_t
*
,
uint8_t
,
LTE_eNB_DLSCH_t
*
,
int
,
uint8_t
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
,
time_stats_t
*
);
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_eNB_s
*
eNB
);
uint8_t
local_flag
;
LTE_DL_FRAME_PARMS
frame_parms
;
...
...
@@ -1145,6 +1145,7 @@ typedef struct PHY_VARS_eNB_s {
time_stats_t
dlsch_rate_matching_stats
;
time_stats_t
dlsch_turbo_encoding_stats
;
time_stats_t
dlsch_turbo_encoding_waiting_stats
;
time_stats_t
dlsch_turbo_encoding_main_stats
;
time_stats_t
dlsch_turbo_encoding_wakeup_stats0
;
time_stats_t
dlsch_turbo_encoding_wakeup_stats1
;
time_stats_t
dlsch_interleaving_stats
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
cabb4561
...
...
@@ -346,6 +346,7 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
&
eNB
->
dlsch_rate_matching_stats
,
&
eNB
->
dlsch_turbo_encoding_stats
,
&
eNB
->
dlsch_turbo_encoding_waiting_stats
,
&
eNB
->
dlsch_turbo_encoding_main_stats
,
&
eNB
->
dlsch_turbo_encoding_wakeup_stats0
,
&
eNB
->
dlsch_turbo_encoding_wakeup_stats1
,
&
eNB
->
dlsch_interleaving_stats
);
...
...
targets/RT/USER/lte-enb.c
View file @
cabb4561
...
...
@@ -182,14 +182,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER
,
0
);
//
wakeup_tx(eNB,eNB->proc.ru_proc);
if
(
oai_exit
)
return
(
-
1
);
phy_procedures_eNB_TX
(
eNB
,
proc
,
no_relay
,
NULL
,
1
);
pthread_mutex_lock
(
&
eNB
->
proc
.
ru_proc
->
mutex_eNBs
);
++
eNB
->
proc
.
ru_proc
->
instance_cnt_eNBs
;
pthread_cond_signal
(
&
eNB
->
proc
.
ru_proc
->
cond_eNBs
);
pthread_mutex_unlock
(
&
eNB
->
proc
.
ru_proc
->
mutex_eNBs
);
wakeup_tx
(
eNB
,
eNB
->
proc
.
ru_proc
);
//
if(oai_exit) return(-1);
//
phy_procedures_eNB_TX(eNB, proc, no_relay, NULL, 1);
//
//
pthread_mutex_lock(&eNB->proc.ru_proc->mutex_eNBs);
//
++eNB->proc.ru_proc->instance_cnt_eNBs;
//
pthread_cond_signal(&eNB->proc.ru_proc->cond_eNBs);
//
pthread_mutex_unlock(&eNB->proc.ru_proc->mutex_eNBs);
stop_meas
(
&
softmodem_stats_rxtx_sf
);
...
...
@@ -707,6 +707,8 @@ static void* process_stats_thread(void* param) {
if
(
eNB
->
te
)
{
print_meas
(
&
eNB
->
dlsch_encoding_stats
,
"dlsch_encoding"
,
NULL
,
NULL
);
print_meas
(
&
eNB
->
dlsch_turbo_encoding_main_stats
,
"coding_main"
,
NULL
,
NULL
);
print_meas
(
&
eNB
->
dlsch_turbo_encoding_waiting_stats
,
"coding_wait"
,
NULL
,
NULL
);
print_meas
(
&
eNB
->
dlsch_turbo_encoding_wakeup_stats0
,
"coding_worker_0"
,
NULL
,
NULL
);
print_meas
(
&
eNB
->
dlsch_turbo_encoding_wakeup_stats1
,
"coding_worker_1"
,
NULL
,
NULL
);
}
...
...
targets/RT/USER/lte-ru.c
View file @
cabb4561
...
...
@@ -1474,8 +1474,8 @@ static void* ru_thread( void* param ) {
// set default return value
thread_top_init
(
"ru_thread"
,
1
,
400000
,
500000
,
500000
);
//
CPU_SET(1, &cpuset);
//
pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
CPU_SET
(
1
,
&
cpuset
);
pthread_setaffinity_np
(
pthread_self
(),
sizeof
(
cpu_set_t
),
&
cpuset
);
pthread_setname_np
(
pthread_self
(),
"ru thread"
);
LOG_I
(
PHY
,
"thread ru created id=%ld
\n
"
,
syscall
(
__NR_gettid
));
...
...
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