Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
OpenXG
OpenXG UE
Commits
67a3efb1
Commit
67a3efb1
authored
Dec 08, 2021
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove async ru_tx_func and simplify
parent
3745b5b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
56 deletions
+33
-56
executables/nr-gnb.c
executables/nr-gnb.c
+33
-53
executables/nr-ru.c
executables/nr-ru.c
+0
-2
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+0
-1
No files found.
executables/nr-gnb.c
View file @
67a3efb1
...
...
@@ -366,55 +366,43 @@ void *nrL1_stats_thread(void *param) {
// two parallel L1 tx threads.
void
*
tx_reorder_thread
(
void
*
param
)
{
PHY_VARS_gNB
*
gNB
=
(
PHY_VARS_gNB
*
)
param
;
notifiedFIFO_elt_t
*
resL1
;
notifiedFIFO_elt_t
*
resL1Reserve
=
NULL
;
notifiedFIFO_elt_t
*
resRU
;
processingData_L1tx_t
*
syncMsgL1
;
processingData_RU_t
*
syncMsgRU
;
notifiedFIFO_elt_t
*
resL1Reserve
=
NULL
;
resL1Reserve
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
int
next_tx_slot
=
((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
))
->
slot
;
while
(
!
oai_exit
)
{
// check if there is a message in reserve
notifiedFIFO_elt_t
*
resL1
;
if
(
resL1Reserve
)
{
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
);
if
(
syncMsgL1
->
slot
==
gNB
->
next_tx_slot
)
{
resRU
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
// processing of last ru_tx_func finished
syncMsgRU
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
resRU
);
syncMsgRU
->
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
->
slot_tx
=
syncMsgL1
->
slot
;
syncMsgRU
->
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
syncMsgRU
->
ru
=
gNB
->
RU_list
[
0
];
resRU
->
key
=
syncMsgL1
->
slot
;
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
->
frame_tx
,
syncMsgRU
->
slot_tx
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1Reserve
);
pushTpool
(
gNB
->
threadPool
,
resRU
);
resL1Reserve
=
NULL
;
}
else
{
#if DEBUG_THREADS
printf
(
"Waiting for reserve L1 Tx message to be sent to RU for slot %d
\n
"
,
syncMsgL1
->
slot
);
#endif
}
}
// pull message from output FIFO of tx_func
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
if
(
syncMsgL1
->
slot
==
gNB
->
next_tx_slot
)
{
resRU
=
pullTpool
(
gNB
->
resp_RU_tx
,
gNB
->
threadPool
);
// processing of last ru_tx_func finished
syncMsgRU
=
(
processingData_RU_t
*
)
NotifiedFifoData
(
resRU
);
syncMsgRU
->
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
->
slot_tx
=
syncMsgL1
->
slot
;
syncMsgRU
->
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
syncMsgRU
->
ru
=
gNB
->
RU_list
[
0
];
resRU
->
key
=
syncMsgL1
->
slot
;
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
->
frame_tx
,
syncMsgRU
->
slot_tx
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1
);
pushTpool
(
gNB
->
threadPool
,
resRU
);
}
else
{
AssertFatal
(
resL1Reserve
==
NULL
,
"Error! There is already a waiting message
\n
"
);
resL1Reserve
=
resL1
;
resL1
=
resL1Reserve
;
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
LOG_E
(
PHY
,
"order mistake"
);
resL1Reserve
=
NULL
;
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
}
}
else
{
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
if
(
resL1Reserve
)
LOG_E
(
PHY
,
"error, have a stored packet, then a second one
\n
"
);
resL1Reserve
=
resL1
;
resL1
=
pullTpool
(
gNB
->
L1_tx_out
,
gNB
->
threadPool
);
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
LOG_E
(
PHY
,
"error, pull two msg, none is good
\n
"
);
}
}
processingData_L1tx_t
*
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
processingData_RU_t
syncMsgRU
;
syncMsgRU
.
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
.
slot_tx
=
syncMsgL1
->
slot
;
syncMsgRU
.
timestamp_tx
=
syncMsgL1
->
timestamp_tx
;
syncMsgRU
.
ru
=
gNB
->
RU_list
[
0
];
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
syncMsgRU
.
frame_tx
,
syncMsgRU
.
slot_tx
);
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
resL1
);
if
(
resL1
==
resL1Reserve
)
resL1Reserve
=
NULL
;
ru_tx_func
((
void
*
)
&
syncMsgRU
);
}
return
(
NULL
);
}
...
...
@@ -473,14 +461,6 @@ void init_gNB_Tpool(int inst) {
gNB
->
phy_proc_tx_1
=
&
msgDataTx
->
phy_proc_tx
;
pushNotifiedFIFO
(
gNB
->
L1_tx_free
,
msgL1Tx
);
// to unblock the process in the beginning
// RU TX result FIFO
gNB
->
resp_RU_tx
=
(
notifiedFIFO_t
*
)
malloc
(
sizeof
(
notifiedFIFO_t
));
initNotifiedFIFO
(
gNB
->
resp_RU_tx
);
notifiedFIFO_elt_t
*
msgRUTx
=
newNotifiedFIFO_elt
(
sizeof
(
processingData_RU_t
),
0
,
gNB
->
resp_RU_tx
,
ru_tx_func
);
int
first_tx_slot
=
sf_ahead
*
gNB
->
frame_parms
.
slots_per_subframe
;
pushNotifiedFIFO
(
gNB
->
resp_RU_tx
,
msgRUTx
);
// to unblock the process in the beginning
gNB
->
next_tx_slot
=
get_next_downlink_slot
(
gNB
,
&
gNB
->
gNB_config
,
0
,
first_tx_slot
-
1
);
threadCreate
(
&
proc
->
L1_stats_thread
,
nrL1_stats_thread
,(
void
*
)
gNB
,
"L1_stats"
,
-
1
,
OAI_PRIORITY_RT_LOW
);
threadCreate
(
&
proc
->
pthread_tx_reorder
,
tx_reorder_thread
,
(
void
*
)
gNB
,
"thread_tx_reorder"
,
-
1
,
OAI_PRIORITY_RT_MAX
);
}
...
...
executables/nr-ru.c
View file @
67a3efb1
...
...
@@ -1449,8 +1449,6 @@ void *ru_thread( void *param ) {
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
L1_tx_free
);
delNotifiedFIFO_elt
(
res
);
res
=
pullNotifiedFIFO
(
gNB
->
resp_RU_tx
);
delNotifiedFIFO_elt
(
res
);
ru_thread_status
=
0
;
return
&
ru_thread_status
;
...
...
openair1/PHY/defs_gNB.h
View file @
67a3efb1
...
...
@@ -906,7 +906,6 @@ typedef struct PHY_VARS_gNB_s {
tpool_t
*
threadPool
;
int
nbDecode
;
uint8_t
pusch_proc_threads
;
int
next_tx_slot
;
int
number_of_nr_dlsch_max
;
int
number_of_nr_ulsch_max
;
void
*
scopeData
;
...
...
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