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
canghaiwuhen
OpenXG-RAN
Commits
e7f91a38
Commit
e7f91a38
authored
Dec 19, 2018
by
wujing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issues about pre_scd thread
parent
e2b99f3f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
2 deletions
+18
-2
openair2/LAYER2/MAC/eNB_scheduler_RA.c
openair2/LAYER2/MAC/eNB_scheduler_RA.c
+8
-0
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+2
-0
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+8
-2
No files found.
openair2/LAYER2/MAC/eNB_scheduler_RA.c
View file @
e7f91a38
...
@@ -568,6 +568,14 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
...
@@ -568,6 +568,14 @@ generate_Msg2(module_id_t module_idP, int CC_idP, frame_t frameP,
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_prb_per_subband
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel8
.
num_bf_vector
=
1
;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
// Rel10 fields
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
pdsch_start
=
cc
->
sib1_v13ext
->
bandwidthReducedAccessRelatedInfo_r13
->
startSymbolBR_r13
;
// Rel13 fields
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
0
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
2
;
// not BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
0xFFFF
;
// absolute SF = 0;
dl_req
->
number_pdu
++
;
dl_req
->
number_pdu
++
;
mac
->
DL_req
[
CC_idP
].
sfn_sf
=
frameP
<<
4
|
subframeP
;
mac
->
DL_req
[
CC_idP
].
sfn_sf
=
frameP
<<
4
|
subframeP
;
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
e7f91a38
...
@@ -2105,10 +2105,12 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
...
@@ -2105,10 +2105,12 @@ void schedule_PCH(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
// Rel10 fields
// Rel10 fields
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL10_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
pdsch_start
=
3
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel10
.
pdsch_start
=
3
;
#endif
#endif
// Rel13 fields
// Rel13 fields
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
tl
.
tag
=
NFAPI_DL_CONFIG_REQUEST_DLSCH_PDU_REL13_TAG
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
0
;
// regular UE
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
ue_type
=
0
;
// regular UE
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
2
;
// not BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
pdsch_payload_type
=
2
;
// not BR
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
0xFFFF
;
dl_config_pdu
->
dlsch_pdu
.
dlsch_pdu_rel13
.
initial_transmission_sf_io
=
0xFFFF
;
...
...
targets/RT/USER/lte-ru.c
View file @
e7f91a38
...
@@ -1763,6 +1763,7 @@ static void* ru_thread( void* param ) {
...
@@ -1763,6 +1763,7 @@ static void* ru_thread( void* param ) {
wakeup_slaves
(
proc
);
wakeup_slaves
(
proc
);
#if defined(PRE_SCD_THREAD)
#if defined(PRE_SCD_THREAD)
if
(
nfapi_mode
==
0
){
new_dlsch_ue_select_tbl_in_use
=
dlsch_ue_select_tbl_in_use
;
new_dlsch_ue_select_tbl_in_use
=
dlsch_ue_select_tbl_in_use
;
dlsch_ue_select_tbl_in_use
=
!
dlsch_ue_select_tbl_in_use
;
dlsch_ue_select_tbl_in_use
=
!
dlsch_ue_select_tbl_in_use
;
memcpy
(
&
pre_scd_eNB_UE_stats
,
&
RC
.
mac
[
ru
->
eNB_list
[
0
]
->
Mod_id
]
->
UE_list
.
eNB_UE_stats
,
sizeof
(
eNB_UE_STATS
)
*
MAX_NUM_CCs
*
NUMBER_OF_UE_MAX
);
memcpy
(
&
pre_scd_eNB_UE_stats
,
&
RC
.
mac
[
ru
->
eNB_list
[
0
]
->
Mod_id
]
->
UE_list
.
eNB_UE_stats
,
sizeof
(
eNB_UE_STATS
)
*
MAX_NUM_CCs
*
NUMBER_OF_UE_MAX
);
...
@@ -1788,6 +1789,7 @@ static void* ru_thread( void* param ) {
...
@@ -1788,6 +1789,7 @@ static void* ru_thread( void* param ) {
LOG_E
(
PHY
,
"[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd
\n
"
);
LOG_E
(
PHY
,
"[eNB] error unlocking mutex_pre_scd mutex for eNB pre scd
\n
"
);
exit_fun
(
"error unlocking mutex_pre_scd"
);
exit_fun
(
"error unlocking mutex_pre_scd"
);
}
}
}
#endif
#endif
// wakeup all eNB processes waiting for this RU
// wakeup all eNB processes waiting for this RU
...
@@ -1939,7 +1941,7 @@ void* pre_scd_thread( void* param ){
...
@@ -1939,7 +1941,7 @@ void* pre_scd_thread( void* param ){
break
;
break
;
}
}
pthread_mutex_lock
(
&
ru
->
proc
.
mutex_pre_scd
);
pthread_mutex_lock
(
&
ru
->
proc
.
mutex_pre_scd
);
if
(
ru
->
proc
.
instance_pre_scd
<
0
)
{
while
(
ru
->
proc
.
instance_pre_scd
<
0
)
{
pthread_cond_wait
(
&
ru
->
proc
.
cond_pre_scd
,
&
ru
->
proc
.
mutex_pre_scd
);
pthread_cond_wait
(
&
ru
->
proc
.
cond_pre_scd
,
&
ru
->
proc
.
mutex_pre_scd
);
}
}
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_pre_scd
);
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_pre_scd
);
...
@@ -2196,11 +2198,13 @@ void init_RU_proc(RU_t *ru) {
...
@@ -2196,11 +2198,13 @@ void init_RU_proc(RU_t *ru) {
pthread_create
(
&
proc
->
pthread_FH
,
attr_FH
,
ru_thread
,
(
void
*
)
ru
);
pthread_create
(
&
proc
->
pthread_FH
,
attr_FH
,
ru_thread
,
(
void
*
)
ru
);
#if defined(PRE_SCD_THREAD)
#if defined(PRE_SCD_THREAD)
if
(
nfapi_mode
==
0
){
proc
->
instance_pre_scd
=
-
1
;
proc
->
instance_pre_scd
=
-
1
;
pthread_mutex_init
(
&
proc
->
mutex_pre_scd
,
NULL
);
pthread_mutex_init
(
&
proc
->
mutex_pre_scd
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_pre_scd
,
NULL
);
pthread_cond_init
(
&
proc
->
cond_pre_scd
,
NULL
);
pthread_create
(
&
proc
->
pthread_pre_scd
,
NULL
,
pre_scd_thread
,
(
void
*
)
ru
);
pthread_create
(
&
proc
->
pthread_pre_scd
,
NULL
,
pre_scd_thread
,
(
void
*
)
ru
);
pthread_setname_np
(
proc
->
pthread_pre_scd
,
"pre_scd_thread"
);
pthread_setname_np
(
proc
->
pthread_pre_scd
,
"pre_scd_thread"
);
}
#endif
#endif
#ifdef PHY_TX_THREAD
#ifdef PHY_TX_THREAD
...
@@ -2252,6 +2256,7 @@ void kill_RU_proc(RU_t *ru)
...
@@ -2252,6 +2256,7 @@ void kill_RU_proc(RU_t *ru)
RU_proc_t
*
proc
=
&
ru
->
proc
;
RU_proc_t
*
proc
=
&
ru
->
proc
;
#if defined(PRE_SCD_THREAD)
#if defined(PRE_SCD_THREAD)
if
((
nfapi_mode
==
2
)
||
(
nfapi_mode
==
0
)){
pthread_mutex_lock
(
&
proc
->
mutex_pre_scd
);
pthread_mutex_lock
(
&
proc
->
mutex_pre_scd
);
ru
->
proc
.
instance_pre_scd
=
0
;
ru
->
proc
.
instance_pre_scd
=
0
;
pthread_cond_signal
(
&
proc
->
cond_pre_scd
);
pthread_cond_signal
(
&
proc
->
cond_pre_scd
);
...
@@ -2259,6 +2264,7 @@ void kill_RU_proc(RU_t *ru)
...
@@ -2259,6 +2264,7 @@ void kill_RU_proc(RU_t *ru)
pthread_join
(
proc
->
pthread_pre_scd
,
NULL
);
pthread_join
(
proc
->
pthread_pre_scd
,
NULL
);
pthread_mutex_destroy
(
&
proc
->
mutex_pre_scd
);
pthread_mutex_destroy
(
&
proc
->
mutex_pre_scd
);
pthread_cond_destroy
(
&
proc
->
cond_pre_scd
);
pthread_cond_destroy
(
&
proc
->
cond_pre_scd
);
}
#endif
#endif
#ifdef PHY_TX_THREAD
#ifdef PHY_TX_THREAD
pthread_mutex_lock
(
&
proc
->
mutex_phy_tx
);
pthread_mutex_lock
(
&
proc
->
mutex_phy_tx
);
...
@@ -2909,7 +2915,7 @@ void init_ru_vnf(void) {
...
@@ -2909,7 +2915,7 @@ void init_ru_vnf(void) {
}
// for ru_id
}
// for ru_id
RC
.
ru_mask
=
0
;
// sleep(1);
// sleep(1);
LOG_D
(
HW
,
"[lte-softmodem.c] RU threads created
\n
"
);
LOG_D
(
HW
,
"[lte-softmodem.c] RU threads created
\n
"
);
...
...
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