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
d73e1a41
Commit
d73e1a41
authored
Jun 30, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle NULL return of pullTpool()
parent
178e2773
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
30 additions
and
2 deletions
+30
-2
executables/main-fs6.c
executables/main-fs6.c
+2
-0
executables/nr-gnb.c
executables/nr-gnb.c
+8
-1
executables/nr-ru.c
executables/nr-ru.c
+2
-0
executables/nr-ue.c
executables/nr-ue.c
+4
-0
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
+2
-0
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-0
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+6
-1
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+2
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+2
-0
No files found.
executables/main-fs6.c
View file @
d73e1a41
...
@@ -740,6 +740,8 @@ void pusch_procedures_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *
...
@@ -740,6 +740,8 @@ void pusch_procedures_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *
while
(
proc
->
nbDecode
>
0
)
{
while
(
proc
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
postDecode
(
proc
,
req
);
postDecode
(
proc
,
req
);
delNotifiedFIFO_elt
(
req
);
delNotifiedFIFO_elt
(
req
);
}
}
...
...
executables/nr-gnb.c
View file @
d73e1a41
...
@@ -248,6 +248,8 @@ void rx_func(void *param) {
...
@@ -248,6 +248,8 @@ void rx_func(void *param) {
// Its a FIFO so it maitains the order in which the MAC fills the messages
// Its a FIFO so it maitains the order in which the MAC fills the messages
// so no need for checking for right slot
// so no need for checking for right slot
res
=
pullTpool
(
&
gNB
->
L1_tx_filled
,
&
gNB
->
threadPool
);
res
=
pullTpool
(
&
gNB
->
L1_tx_filled
,
&
gNB
->
threadPool
);
if
(
res
==
NULL
)
return
;
// Tpool has been stopped
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
syncMsg
->
gNB
=
gNB
;
syncMsg
->
gNB
=
gNB
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
...
@@ -255,6 +257,8 @@ void rx_func(void *param) {
...
@@ -255,6 +257,8 @@ void rx_func(void *param) {
pushTpool
(
&
gNB
->
threadPool
,
res
);
pushTpool
(
&
gNB
->
threadPool
,
res
);
}
else
if
(
get_softmodem_params
()
->
continuous_tx
)
{
}
else
if
(
get_softmodem_params
()
->
continuous_tx
)
{
notifiedFIFO_elt_t
*
res
=
pullTpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
res
=
pullTpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
if
(
res
==
NULL
)
return
;
// Tpool has been stopped
processingData_L1tx_t
*
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
processingData_L1tx_t
*
syncMsg
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
syncMsg
->
gNB
=
gNB
;
syncMsg
->
gNB
=
gNB
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
syncMsg
->
timestamp_tx
=
info
->
timestamp_tx
;
...
@@ -377,6 +381,7 @@ void *tx_reorder_thread(void* param) {
...
@@ -377,6 +381,7 @@ void *tx_reorder_thread(void* param) {
resL1Reserve
=
pullTpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
resL1Reserve
=
pullTpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
AssertFatal
(
resL1Reserve
!=
NULL
,
"pullTpool() did not return start message in %s
\n
"
,
__func__
);
int
next_tx_slot
=
((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
))
->
slot
;
int
next_tx_slot
=
((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1Reserve
))
->
slot
;
while
(
!
oai_exit
)
{
while
(
!
oai_exit
)
{
...
@@ -390,7 +395,7 @@ void *tx_reorder_thread(void* param) {
...
@@ -390,7 +395,7 @@ void *tx_reorder_thread(void* param) {
}
}
}
else
{
}
else
{
resL1
=
pullTpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
resL1
=
pullTpool
(
&
gNB
->
L1_tx_out
,
&
gNB
->
threadPool
);
if
(((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
if
(
resL1
!=
NULL
&&
((
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
))
->
slot
!=
next_tx_slot
)
{
if
(
resL1Reserve
)
if
(
resL1Reserve
)
LOG_E
(
PHY
,
"error, have a stored packet, then a second one
\n
"
);
LOG_E
(
PHY
,
"error, have a stored packet, then a second one
\n
"
);
resL1Reserve
=
resL1
;
resL1Reserve
=
resL1
;
...
@@ -399,6 +404,8 @@ void *tx_reorder_thread(void* param) {
...
@@ -399,6 +404,8 @@ void *tx_reorder_thread(void* param) {
LOG_E
(
PHY
,
"error, pull two msg, none is good
\n
"
);
LOG_E
(
PHY
,
"error, pull two msg, none is good
\n
"
);
}
}
}
}
if
(
resL1
==
NULL
)
break
;
// Tpool has been stopped
processingData_L1tx_t
*
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
processingData_L1tx_t
*
syncMsgL1
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
resL1
);
processingData_RU_t
syncMsgRU
;
processingData_RU_t
syncMsgRU
;
syncMsgRU
.
frame_tx
=
syncMsgL1
->
frame
;
syncMsgRU
.
frame_tx
=
syncMsgL1
->
frame
;
...
...
executables/nr-ru.c
View file @
d73e1a41
...
@@ -1252,6 +1252,8 @@ void *ru_thread( void *param ) {
...
@@ -1252,6 +1252,8 @@ void *ru_thread( void *param ) {
// At this point, all information for subframe has been received on FH interface
// At this point, all information for subframe has been received on FH interface
res
=
pullTpool
(
&
gNB
->
resp_L1
,
&
gNB
->
threadPool
);
res
=
pullTpool
(
&
gNB
->
resp_L1
,
&
gNB
->
threadPool
);
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
syncMsg
=
(
processingData_L1_t
*
)
NotifiedFifoData
(
res
);
syncMsg
=
(
processingData_L1_t
*
)
NotifiedFifoData
(
res
);
syncMsg
->
gNB
=
gNB
;
syncMsg
->
gNB
=
gNB
;
syncMsg
->
frame_rx
=
proc
->
frame_rx
;
syncMsg
->
frame_rx
=
proc
->
frame_rx
;
...
...
executables/nr-ue.c
View file @
d73e1a41
...
@@ -692,6 +692,8 @@ void processSlotRX(void *arg) {
...
@@ -692,6 +692,8 @@ void processSlotRX(void *arg) {
// Wait for PUSCH processing to finish
// Wait for PUSCH processing to finish
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
&
rxtxD
->
txFifo
,
&
(
get_nrUE_params
()
->
Tpool
));
res
=
pullTpool
(
&
rxtxD
->
txFifo
,
&
(
get_nrUE_params
()
->
Tpool
));
if
(
res
==
NULL
)
return
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
res
);
delNotifiedFIFO_elt
(
res
);
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
// calling UL_indication to schedule things other than PUSCH (eg, PUCCH)
...
@@ -1008,6 +1010,8 @@ void *UE_thread(void *arg) {
...
@@ -1008,6 +1010,8 @@ void *UE_thread(void *arg) {
while
(
nbSlotProcessing
>=
NR_RX_NB_TH
)
{
while
(
nbSlotProcessing
>=
NR_RX_NB_TH
)
{
res
=
pullTpool
(
&
nf
,
&
(
get_nrUE_params
()
->
Tpool
));
res
=
pullTpool
(
&
nf
,
&
(
get_nrUE_params
()
->
Tpool
));
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
nbSlotProcessing
--
;
nbSlotProcessing
--
;
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
nr_rxtx_thread_data_t
*
tmp
=
(
nr_rxtx_thread_data_t
*
)
res
->
msgData
;
...
...
openair1/PHY/NR_TRANSPORT/nr_dlsch_coding.c
View file @
d73e1a41
...
@@ -430,6 +430,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
...
@@ -430,6 +430,8 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
}
}
while
(
nbJobs
)
{
while
(
nbJobs
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
&
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
&
gNB
->
threadPool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
req
);
delNotifiedFIFO_elt
(
req
);
nbJobs
--
;
nbJobs
--
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
d73e1a41
...
@@ -615,6 +615,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -615,6 +615,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
for
(
r
=
0
;
r
<
nbDecode
;
r
++
)
{
for
(
r
=
0
;
r
<
nbDecode
;
r
++
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
&
(
pool_dl
));
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
nf
,
&
(
pool_dl
));
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
bool
last
=
false
;
bool
last
=
false
;
if
(
r
==
nbDecode
-
1
)
if
(
r
==
nbDecode
-
1
)
last
=
true
;
last
=
true
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
d73e1a41
...
@@ -432,7 +432,10 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
...
@@ -432,7 +432,10 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
if
(
proc
->
threadPool
->
activated
)
{
if
(
proc
->
threadPool
->
activated
)
{
// Wait all other threads finish to process
// Wait all other threads finish to process
while
(
proc
->
nbEncode
)
{
while
(
proc
->
nbEncode
)
{
delNotifiedFIFO_elt
(
pullTpool
(
proc
->
respEncode
,
proc
->
threadPool
));
notifiedFIFO_elt_t
*
res
=
pullTpool
(
proc
->
respEncode
,
proc
->
threadPool
);
if
(
res
==
NULL
)
break
;
// Tpool has been stopped
delNotifiedFIFO_elt
(
res
);
proc
->
nbEncode
--
;
proc
->
nbEncode
--
;
}
}
}
}
...
@@ -1502,6 +1505,8 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
...
@@ -1502,6 +1505,8 @@ void pusch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
while
(
proc
->
nbDecode
>
0
)
{
while
(
proc
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
proc
->
respDecode
,
proc
->
threadPool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
postDecode
(
proc
,
req
);
postDecode
(
proc
,
req
);
delNotifiedFIFO_elt
(
req
);
delNotifiedFIFO_elt
(
req
);
}
}
...
...
openair1/SCHED_NR/fapi_nr_l1.c
View file @
d73e1a41
...
@@ -164,6 +164,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
...
@@ -164,6 +164,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
{
if
(
slot_type
==
NR_DOWNLINK_SLOT
||
slot_type
==
NR_MIXED_SLOT
)
{
notifiedFIFO_elt_t
*
res
;
notifiedFIFO_elt_t
*
res
;
res
=
pullTpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
res
=
pullTpool
(
&
gNB
->
L1_tx_free
,
&
gNB
->
threadPool
);
if
(
res
==
NULL
)
return
;
// Tpool has been stopped, nothing to process
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
processingData_L1tx_t
*
msgTx
=
(
processingData_L1tx_t
*
)
NotifiedFifoData
(
res
);
const
time_stats_t
ts
=
exec_time_stats_NotifiedFIFO
(
res
);
const
time_stats_t
ts
=
exec_time_stats_NotifiedFIFO
(
res
);
merge_meas
(
&
gNB
->
phy_proc_tx
,
&
ts
);
merge_meas
(
&
gNB
->
phy_proc_tx
,
&
ts
);
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
d73e1a41
...
@@ -364,6 +364,8 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
...
@@ -364,6 +364,8 @@ void nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int ULSCH
while
(
gNB
->
nbDecode
>
0
)
{
while
(
gNB
->
nbDecode
>
0
)
{
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
gNB
->
respDecode
,
&
gNB
->
threadPool
);
notifiedFIFO_elt_t
*
req
=
pullTpool
(
&
gNB
->
respDecode
,
&
gNB
->
threadPool
);
if
(
req
==
NULL
)
break
;
// Tpool has been stopped
nr_postDecode
(
gNB
,
req
);
nr_postDecode
(
gNB
,
req
);
delNotifiedFIFO_elt
(
req
);
delNotifiedFIFO_elt
(
req
);
}
}
...
...
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