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
d270eae4
Commit
d270eae4
authored
Oct 25, 2019
by
Ding Yumei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix Assert(NPRB==0) issue
parent
5df8d199
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
14 deletions
+24
-14
common/utils/ocp_itti/intertask_interface.cpp
common/utils/ocp_itti/intertask_interface.cpp
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
+19
-1
targets/RT/USER/lte-ru.c
targets/RT/USER/lte-ru.c
+4
-12
No files found.
common/utils/ocp_itti/intertask_interface.cpp
View file @
d270eae4
...
...
@@ -48,7 +48,7 @@ extern "C" {
// AssertFatal(leP!=NULL,"");
if
(
leP
!=
NULL
)
{
free
(
leP
);
LOG_
I
(
TMR
,
"intertask_interface free_mem_block is called, after free leP is %p
\n
"
,
leP
);
LOG_
D
(
TMR
,
"intertask_interface free_mem_block is called, after free leP is %p
\n
"
,
leP
);
leP
=
NULL
;
//prevent double free
}
else
{
LOG_I
(
TMR
,
"intertask_interface free_mem_block is called, but before free leP is NULL
\n
"
);
...
...
openair2/LAYER2/MAC/eNB_scheduler_fairRR.c
View file @
d270eae4
...
...
@@ -111,6 +111,8 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
mac_rlc_status_resp_t
rlc_status
;
uint16_t
step_size
=
2
;
N_RB_DL
=
to_prb
(
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
int
header_length_last
;
int
header_length_total
;
if
(
N_RB_DL
==
50
)
step_size
=
3
;
...
...
@@ -123,6 +125,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
if
(
pre_scd_activeUE
[
UE_id
]
!=
TRUE
)
continue
;
header_length_total
=
0
;
// store dlsch buffer
// clear logical channel interface variables
UE_template
.
dl_buffer_total
=
0
;
...
...
@@ -137,8 +140,18 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
#endif
);
UE_template
.
dl_buffer_total
+=
rlc_status
.
bytes_in_buffer
;
//storing the total dlsch buffer
if
(
rlc_status
.
bytes_in_buffer
>
0
){
header_length_last
=
1
+
1
+
(
rlc_status
.
bytes_in_buffer
>=
128
);
header_length_total
+=
header_length_last
;
}
}
if
(
header_length_total
)
{
header_length_total
-=
header_length_last
;
header_length_total
++
;
}
UE_template
.
dl_buffer_total
+=
header_length_total
;
// end of store dlsch buffer
// assgin rbs required
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
...
...
@@ -1834,7 +1847,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
}
}
else
{
/* This is a potentially new SDU opportunity */
// 1st TB
first_TB_pdu_create_flg
=
0
;
ue_sched_ctl
->
swap_flag
[
CC_id
][
harq_pid
]
=
0
;
rlc_status
.
bytes_in_buffer
=
0
;
...
...
@@ -2360,6 +2373,11 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
first_TB_pdu_create_flg
=
1
;
}
//1st TB end
else
{
LOG_D
(
MAC
,
"[eNB %d][DLSCH] Frame %d Subframe %d UE_id %x/%d sdu_length_total %d header_len_dcch %d header_len_dtch %d TBS %d
\n
"
,
module_idP
,
frameP
,
subframeP
,
rnti
,
UE_id
,
sdu_length_total
,
header_len_dcch
,
header_len_dtch
,
TBS
);
}
// printf("dl sfn=%d, sf=%d, buffer=%d, TBS=%d\n", frameP, subframeP, UE_list->UE_template[CC_id][UE_id].dl_buffer_total, UE_list->eNB_UE_stats[CC_id][UE_id].TBS[select_tb]);
...
...
targets/RT/USER/lte-ru.c
View file @
d270eae4
...
...
@@ -1935,7 +1935,6 @@ void *pre_scd_thread( void *param ) {
int
CC_id
;
int
Mod_id
;
RU_t
*
ru
=
(
RU_t
*
)
param
;
int
ret
;
// L2-emulator can work only one eNB
if
(
NFAPI_MODE
==
NFAPI_MODE_VNF
)
...
...
@@ -1945,20 +1944,15 @@ void *pre_scd_thread( void *param ) {
frame
=
0
;
subframe
=
4
;
thread_top_init
(
"pre_scd_thread"
,
0
,
870000
,
1000000
,
1000000
);
thread_top_init
(
"pre_scd_thread"
,
1
,
870000
,
1000000
,
1000000
);
while
(
!
oai_exit
)
{
if
(
wait_on_condition
(
&
ru
->
proc
.
mutex_pre_scd
,
&
ru
->
proc
.
cond_pre_scd
,
&
ru
->
proc
.
instance_pre_scd
,
"pre_scd_thread"
)
<
0
)
break
;
if
(
oai_exit
)
{
break
;
}
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
ru
->
proc
.
mutex_pre_scd
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
if
(
ru
->
proc
.
instance_pre_scd
<
0
)
{
pthread_cond_wait
(
&
ru
->
proc
.
cond_pre_scd
,
&
ru
->
proc
.
mutex_pre_scd
);
}
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_pre_scd
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
Mod_id
,
ENB_FLAG_YES
,
NOT_A_RNTI
,
frame
,
subframe
,
Mod_id
);
pdcp_run
(
&
ctxt
);
...
...
@@ -1978,9 +1972,7 @@ void *pre_scd_thread( void *param ) {
subframe
++
;
}
AssertFatal
((
ret
=
pthread_mutex_lock
(
&
ru
->
proc
.
mutex_pre_scd
))
==
0
,
"mutex_lock returns %d
\n
"
,
ret
);
ru
->
proc
.
instance_pre_scd
--
;
AssertFatal
((
ret
=
pthread_mutex_unlock
(
&
ru
->
proc
.
mutex_pre_scd
))
==
0
,
"mutex_unlock returns %d
\n
"
,
ret
);
if
(
release_thread
(
&
ru
->
proc
.
mutex_pre_scd
,
&
ru
->
proc
.
instance_pre_scd
,
"pre_scd_thread"
)
<
0
)
break
;
}
eNB_pre_scd_status
=
0
;
...
...
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