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
wangjie
OpenXG-RAN
Commits
13122a27
Commit
13122a27
authored
Oct 31, 2019
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ul in parallel monolithic case, ul in parallel memory leak fix
parent
f0759d6e
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
267 additions
and
464 deletions
+267
-464
common/utils/threadPool/thread-pool.c
common/utils/threadPool/thread-pool.c
+4
-3
common/utils/threadPool/thread-pool.h
common/utils/threadPool/thread-pool.h
+28
-11
executables/main-fs6.c
executables/main-fs6.c
+1
-1
executables/main-ocp.c
executables/main-ocp.c
+5
-4
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
+1
-0
openair1/PHY/LTE_TRANSPORT/transport_eNB.h
openair1/PHY/LTE_TRANSPORT/transport_eNB.h
+1
-0
openair1/PHY/LTE_TRANSPORT/transport_proto.h
openair1/PHY/LTE_TRANSPORT/transport_proto.h
+2
-0
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+130
-202
openair1/PHY/defs_eNB.h
openair1/PHY/defs_eNB.h
+4
-5
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+91
-238
No files found.
common/utils/threadPool/thread-pool.c
View file @
13122a27
...
@@ -84,7 +84,7 @@ void *one_thread(void *arg) {
...
@@ -84,7 +84,7 @@ void *one_thread(void *arg) {
delNotifiedFIFO_elt
(
elt
);
delNotifiedFIFO_elt
(
elt
);
else
else
pushNotifiedFIFO
(
elt
->
reponseFifo
,
elt
);
pushNotifiedFIFO
(
elt
->
reponseFifo
,
elt
);
myThread
->
runningOnKey
=-
1
;
mutexunlock
(
tp
->
incomingFifo
.
lockF
);
mutexunlock
(
tp
->
incomingFifo
.
lockF
);
}
}
}
while
(
true
);
}
while
(
true
);
...
@@ -116,7 +116,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -116,7 +116,7 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
pool
->
nbThreads
=
0
;
pool
->
nbThreads
=
0
;
pool
->
restrictRNTI
=
false
;
pool
->
restrictRNTI
=
false
;
curptr
=
strtok_r
(
params
,
","
,
&
saveptr
);
curptr
=
strtok_r
(
params
,
","
,
&
saveptr
);
struct
one_thread
*
ptr
;
while
(
curptr
!=
NULL
)
{
while
(
curptr
!=
NULL
)
{
int
c
=
toupper
(
curptr
[
0
]);
int
c
=
toupper
(
curptr
[
0
]);
...
@@ -130,8 +130,9 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
...
@@ -130,8 +130,9 @@ void initTpool(char *params,tpool_t *pool, bool performanceMeas) {
break
;
break
;
default:
default:
ptr
=
pool
->
allthreads
;
pool
->
allthreads
=
(
struct
one_thread
*
)
malloc
(
sizeof
(
struct
one_thread
));
pool
->
allthreads
=
(
struct
one_thread
*
)
malloc
(
sizeof
(
struct
one_thread
));
pool
->
allthreads
->
next
=
p
ool
->
allthreads
;
pool
->
allthreads
->
next
=
p
tr
;
printf
(
"create a thread for core %d
\n
"
,
atoi
(
curptr
));
printf
(
"create a thread for core %d
\n
"
,
atoi
(
curptr
));
pool
->
allthreads
->
coreID
=
atoi
(
curptr
);
pool
->
allthreads
->
coreID
=
atoi
(
curptr
);
pool
->
allthreads
->
id
=
pool
->
nbThreads
;
pool
->
allthreads
->
id
=
pool
->
nbThreads
;
...
...
common/utils/threadPool/thread-pool.h
View file @
13122a27
...
@@ -137,8 +137,9 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
...
@@ -137,8 +137,9 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
// This function aborts all messages matching the key
// This function aborts all messages matching the key
// If the queue is used in thread pools, it doesn't cancels already running processing
// If the queue is used in thread pools, it doesn't cancels already running processing
// because the message has already been picked
// because the message has already been picked
static
inline
void
abortNotifiedFIFO
(
notifiedFIFO_t
*
nf
,
uint64_t
key
)
{
static
inline
int
abortNotifiedFIFO
(
notifiedFIFO_t
*
nf
,
uint64_t
key
)
{
mutexlock
(
nf
->
lockF
);
mutexlock
(
nf
->
lockF
);
int
nbDeleted
=
0
;
notifiedFIFO_elt_t
**
start
=&
nf
->
outF
;
notifiedFIFO_elt_t
**
start
=&
nf
->
outF
;
while
(
*
start
!=
NULL
)
{
while
(
*
start
!=
NULL
)
{
...
@@ -146,13 +147,15 @@ static inline void abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) {
...
@@ -146,13 +147,15 @@ static inline void abortNotifiedFIFO(notifiedFIFO_t *nf, uint64_t key) {
notifiedFIFO_elt_t
*
request
=*
start
;
notifiedFIFO_elt_t
*
request
=*
start
;
*
start
=
(
*
start
)
->
next
;
*
start
=
(
*
start
)
->
next
;
delNotifiedFIFO_elt
(
request
);
delNotifiedFIFO_elt
(
request
);
}
nbDeleted
++
;
}
else
if
(
*
start
!=
NULL
)
start
=&
(
*
start
)
->
next
;
start
=&
(
*
start
)
->
next
;
}
}
if
(
nf
->
outF
==
NULL
)
nf
->
inF
=
NULL
;
mutexunlock
(
nf
->
lockF
);
mutexunlock
(
nf
->
lockF
);
return
nbDeleted
;
}
}
struct
one_thread
{
struct
one_thread
{
...
@@ -181,8 +184,17 @@ typedef struct thread_pool {
...
@@ -181,8 +184,17 @@ typedef struct thread_pool {
static
inline
void
pushTpool
(
tpool_t
*
t
,
notifiedFIFO_elt_t
*
msg
)
{
static
inline
void
pushTpool
(
tpool_t
*
t
,
notifiedFIFO_elt_t
*
msg
)
{
if
(
t
->
measurePerf
)
msg
->
creationTime
=
rdtsc
();
if
(
t
->
measurePerf
)
msg
->
creationTime
=
rdtsc
();
if
(
t
->
activated
)
pushNotifiedFIFO
(
&
t
->
incomingFifo
,
msg
);
pushNotifiedFIFO
(
&
t
->
incomingFifo
,
msg
);
else
{
if
(
t
->
measurePerf
)
msg
->
startProcessingTime
=
rdtsc
();
msg
->
processingFunc
(
NotifiedFifoData
(
msg
));
if
(
t
->
measurePerf
)
msg
->
endProcessingTime
=
rdtsc
();
if
(
msg
->
reponseFifo
)
pushNotifiedFIFO
(
msg
->
reponseFifo
,
msg
);
}
}
}
static
inline
notifiedFIFO_elt_t
*
pullTpool
(
notifiedFIFO_t
*
responseFifo
,
tpool_t
*
t
)
{
static
inline
notifiedFIFO_elt_t
*
pullTpool
(
notifiedFIFO_t
*
responseFifo
,
tpool_t
*
t
)
{
...
@@ -212,7 +224,8 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo
...
@@ -212,7 +224,8 @@ static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpo
return
msg
;
return
msg
;
}
}
static
inline
void
abortTpool
(
tpool_t
*
t
,
uint64_t
key
)
{
static
inline
int
abortTpool
(
tpool_t
*
t
,
uint64_t
key
)
{
int
nbRemoved
=
0
;
notifiedFIFO_t
*
nf
=&
t
->
incomingFifo
;
notifiedFIFO_t
*
nf
=&
t
->
incomingFifo
;
mutexlock
(
nf
->
lockF
);
mutexlock
(
nf
->
lockF
);
notifiedFIFO_elt_t
**
start
=&
nf
->
outF
;
notifiedFIFO_elt_t
**
start
=&
nf
->
outF
;
...
@@ -222,22 +235,26 @@ static inline void abortTpool(tpool_t *t, uint64_t key) {
...
@@ -222,22 +235,26 @@ static inline void abortTpool(tpool_t *t, uint64_t key) {
notifiedFIFO_elt_t
*
request
=*
start
;
notifiedFIFO_elt_t
*
request
=*
start
;
*
start
=
(
*
start
)
->
next
;
*
start
=
(
*
start
)
->
next
;
delNotifiedFIFO_elt
(
request
);
delNotifiedFIFO_elt
(
request
);
}
nbRemoved
++
;
}
else
if
(
*
start
!=
NULL
)
start
=&
(
*
start
)
->
next
;
start
=&
(
*
start
)
->
next
;
}
}
if
(
t
->
incomingFifo
.
outF
==
NULL
)
t
->
incomingFifo
.
inF
=
NULL
;
struct
one_thread
*
ptr
=
t
->
allthreads
;
struct
one_thread
*
ptr
=
t
->
allthreads
;
while
(
ptr
!=
NULL
)
{
while
(
ptr
!=
NULL
)
{
if
(
ptr
->
runningOnKey
==
key
)
if
(
ptr
->
runningOnKey
==
key
)
{
ptr
->
abortFlag
=
true
;
ptr
->
abortFlag
=
true
;
nbRemoved
++
;
}
ptr
=
ptr
->
next
;
ptr
=
ptr
->
next
;
}
}
mutexunlock
(
nf
->
lockF
);
mutexunlock
(
nf
->
lockF
);
return
nbRemoved
;
}
}
void
initTpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
);
void
initTpool
(
char
*
params
,
tpool_t
*
pool
,
bool
performanceMeas
);
...
...
executables/main-fs6.c
View file @
13122a27
...
@@ -615,7 +615,7 @@ void pusch_procedures_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *
...
@@ -615,7 +615,7 @@ void pusch_procedures_fromsplit(uint8_t *bufferZone, int bufSize, PHY_VARS_eNB *
&
ulsch_harq
->
Kplus
,
&
ulsch_harq
->
Kplus
,
&
ulsch_harq
->
Kminus
,
&
ulsch_harq
->
Kminus
,
&
ulsch_harq
->
F
);
&
ulsch_harq
->
F
);
int
ret
=
ulsch_decoding_data
(
eNB
,
i
,
harq_pid
,
int
ret
=
ulsch_decoding_data
(
eNB
,
proc
,
i
,
harq_pid
,
ulsch_harq
->
nb_rb
>
20
?
1
:
0
);
ulsch_harq
->
nb_rb
>
20
?
1
:
0
);
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
stop_meas
(
&
eNB
->
ulsch_decoding_stats
);
LOG_D
(
PHY
,
LOG_D
(
PHY
,
...
...
executables/main-ocp.c
View file @
13122a27
...
@@ -692,13 +692,14 @@ static void *ru_thread( void *param ) {
...
@@ -692,13 +692,14 @@ static void *ru_thread( void *param ) {
L1_rxtx_proc_t
L1proc
;
L1_rxtx_proc_t
L1proc
;
L1_rxtx_proc_t
*
proc
=&
L1proc
;
L1_rxtx_proc_t
*
proc
=&
L1proc
;
if
(
strlen
(
get_softmodem_params
()
->
threadPoolConfig
)
>
0
)
{
if
(
strlen
(
get_softmodem_params
()
->
threadPoolConfig
)
>
0
)
initTpool
(
get_softmodem_params
()
->
threadPoolConfig
,
&
L1proc
.
threadPool
,
true
);
initTpool
(
get_softmodem_params
()
->
threadPoolConfig
,
&
L1proc
.
threadPool
,
true
);
initNotifiedFIFO
(
&
L1proc
.
respEncode
);
else
initNotifiedFIFO
(
&
L1proc
.
respDecode
);
}
else
initTpool
(
"n"
,
&
L1proc
.
threadPool
,
true
);
initTpool
(
"n"
,
&
L1proc
.
threadPool
,
true
);
initNotifiedFIFO
(
&
L1proc
.
respEncode
);
initNotifiedFIFO
(
&
L1proc
.
respDecode
);
if
(
ru
->
if_south
==
LOCAL_RF
)
{
// configure RF parameters only
if
(
ru
->
if_south
==
LOCAL_RF
)
{
// configure RF parameters only
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
init_frame_parms
(
&
ru
->
frame_parms
,
1
);
init_frame_parms
(
&
ru
->
frame_parms
,
1
);
...
...
openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
View file @
13122a27
...
@@ -398,6 +398,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
...
@@ -398,6 +398,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
proc
->
nbEncode
++
;
proc
->
nbEncode
++
;
}
else
{
}
else
{
TPencode
(
rdata
);
TPencode
(
rdata
);
delNotifiedFIFO_elt
(
req
);
}
}
int
Qm
=
hadlsch
->
Qm
;
int
Qm
=
hadlsch
->
Qm
;
...
...
openair1/PHY/LTE_TRANSPORT/transport_eNB.h
View file @
13122a27
...
@@ -288,6 +288,7 @@ typedef struct {
...
@@ -288,6 +288,7 @@ typedef struct {
uint8_t
rvidx
;
uint8_t
rvidx
;
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t
w
[
MAX_NUM_ULSCH_SEGMENTS
][
3
*
(
6144
+
64
)];
int16_t
w
[
MAX_NUM_ULSCH_SEGMENTS
][
3
*
(
6144
+
64
)];
int16_t
pusch_rep_buffer
[
MAX_NUM_ULSCH_SEGMENTS
][
3
*
(
6144
+
64
)];
/// soft bits for each received segment ("d"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
/// soft bits for each received segment ("d"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
//TBD
//TBD
int16_t
*
d
[
MAX_NUM_ULSCH_SEGMENTS
];
int16_t
*
d
[
MAX_NUM_ULSCH_SEGMENTS
];
...
...
openair1/PHY/LTE_TRANSPORT/transport_proto.h
View file @
13122a27
...
@@ -469,6 +469,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
...
@@ -469,6 +469,7 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
int
ulsch_decoding_data_all
(
PHY_VARS_eNB
*
eNB
,
int
ulsch_decoding_data_all
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
int
UE_id
,
int
UE_id
,
int
harq_pid
,
int
harq_pid
,
int
llr8_flag
);
int
llr8_flag
);
...
@@ -513,6 +514,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,
...
@@ -513,6 +514,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,
@returns 0 on success
@returns 0 on success
*/
*/
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
int
ulsch_decoding_data
(
PHY_VARS_eNB
*
eNB
,
L1_rxtx_proc_t
*
proc
,
int
UE_id
,
int
UE_id
,
int
harq_pid
,
int
harq_pid
,
int
llr8_flag
);
int
llr8_flag
);
...
...
openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
View file @
13122a27
This diff is collapsed.
Click to expand it.
openair1/PHY/defs_eNB.h
View file @
13122a27
...
@@ -871,20 +871,19 @@ union turboReqUnion {
...
@@ -871,20 +871,19 @@ union turboReqUnion {
};
};
typedef
struct
TurboDecode_s
{
typedef
struct
TurboDecode_s
{
decoder_if_t
*
function
;
PHY_VARS_eNB
*
eNB
;
int16_t
soft_bits
[
3
*
8
*
6144
+
12
+
96
]
__attribute__
((
aligned
(
32
)))
;
decoder_if_t
*
function
;
uint8_t
decoded_bytes
[
3
+
768
]
__attribute__
((
aligned
(
32
)));
uint8_t
decoded_bytes
[
3
+
1
768
]
__attribute__
((
aligned
(
32
)));
int
UEid
;
int
UEid
;
int
harq_pid
;
int
harq_pid
;
int
frame
;
int
frame
;
int
subframe
;
int
subframe
;
int
iind
;
int
Fbits
;
int
Fbits
;
int
Kr
;
int
Kr
;
LTE_UL_eNB_HARQ_t
*
ulsch_harq
;
LTE_UL_eNB_HARQ_t
*
ulsch_harq
;
PHY_VARS_eNB
*
eNB
;
int
nbSegments
;
int
nbSegments
;
int
segment_r
;
int
segment_r
;
int
r_offset
;
int
offset
;
int
offset
;
int
maxIterations
;
int
maxIterations
;
int
decodeIterations
;
int
decodeIterations
;
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
13122a27
This diff is collapsed.
Click to expand it.
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