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
zzha zzha
OpenXG-RAN
Commits
9224d361
Commit
9224d361
authored
Jan 27, 2017
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug that prohibited 2 UEs to be scheduled at the same time
parent
471a7d7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
+17
-16
No files found.
openair2/LAYER2/MAC/flexran_agent_scheduler_dataplane.c
View file @
9224d361
...
@@ -97,7 +97,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -97,7 +97,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
unsigned
char
header_len
=
0
,
header_len_tmp
=
0
;
unsigned
char
header_len
=
0
,
header_len_tmp
=
0
;
unsigned
char
sdu_lcids
[
11
],
offset
,
num_sdus
=
0
;
unsigned
char
sdu_lcids
[
11
],
offset
,
num_sdus
=
0
;
uint16_t
nb_rb
;
uint16_t
nb_rb
;
uint16_t
TBS
,
j
,
sdu_lengths
[
11
],
rnti
,
padding
=
0
,
post_padding
=
0
;
uint16_t
TBS
,
sdu_lengths
[
11
],
rnti
,
padding
=
0
,
post_padding
=
0
;
unsigned
char
dlsch_buffer
[
MAX_DLSCH_PAYLOAD_BYTES
];
unsigned
char
dlsch_buffer
[
MAX_DLSCH_PAYLOAD_BYTES
];
uint8_t
round
=
0
;
uint8_t
round
=
0
;
uint8_t
harq_pid
=
0
;
uint8_t
harq_pid
=
0
;
...
@@ -112,17 +112,16 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -112,17 +112,16 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
int
last_sdu_header_len
=
0
;
int
last_sdu_header_len
=
0
;
int
i
;
int
i
,
j
;
Protocol__FlexDlData
*
dl_data
;
Protocol__FlexDlData
*
dl_data
;
Protocol__FlexDlDci
*
dl_dci
;
Protocol__FlexDlDci
*
dl_dci
;
uint32_t
rlc_size
,
n_lc
,
lcid
;
uint32_t
rlc_size
,
n_lc
,
lcid
;
// For each UE-related command
// For each UE-related command
for
(
i
=
0
;
i
<
n_dl_ue_data
;
i
++
)
{
for
(
i
=
0
;
i
<
n_dl_ue_data
;
i
++
)
{
dl_data
=
dl_ue_data
[
i
];
dl_data
=
dl_ue_data
[
i
];
dl_dci
=
dl_data
->
dl_dci
;
dl_dci
=
dl_data
->
dl_dci
;
...
@@ -165,9 +164,9 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -165,9 +164,9 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
// Go through each one of the channel commands and create SDUs
// Go through each one of the channel commands and create SDUs
header_len
=
0
;
header_len
=
0
;
last_sdu_header_len
=
0
;
last_sdu_header_len
=
0
;
for
(
i
=
0
;
i
<
n_lc
;
i
++
)
{
for
(
j
=
0
;
j
<
n_lc
;
j
++
)
{
lcid
=
dl_data
->
rlc_pdu
[
i
]
->
rlc_pdu_tb
[
0
]
->
logical_channel_id
;
lcid
=
dl_data
->
rlc_pdu
[
j
]
->
rlc_pdu_tb
[
0
]
->
logical_channel_id
;
rlc_size
=
dl_data
->
rlc_pdu
[
i
]
->
rlc_pdu_tb
[
0
]
->
size
;
rlc_size
=
dl_data
->
rlc_pdu
[
j
]
->
rlc_pdu_tb
[
0
]
->
size
;
LOG_D
(
MAC
,
"[TEST] [eNB %d] Frame %d, LCID %d, CC_id %d, Requesting %d bytes from RLC (RRC message)
\n
"
,
LOG_D
(
MAC
,
"[TEST] [eNB %d] Frame %d, LCID %d, CC_id %d, Requesting %d bytes from RLC (RRC message)
\n
"
,
mod_id
,
frame
,
lcid
,
CC_id
,
rlc_size
);
mod_id
,
frame
,
lcid
,
CC_id
,
rlc_size
);
if
(
rlc_size
>
0
)
{
if
(
rlc_size
>
0
)
{
...
@@ -196,13 +195,13 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -196,13 +195,13 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
lcid
,
lcid
,
rlc_size
);
// transport block set size
rlc_size
);
// transport block set size
sdu_lengths
[
i
]
=
0
;
sdu_lengths
[
j
]
=
0
;
LOG_D
(
MAC
,
"[TEST] RLC can give %d bytes for LCID %d during second call
\n
"
,
rlc_status
.
bytes_in_buffer
,
lcid
);
LOG_D
(
MAC
,
"[TEST] RLC can give %d bytes for LCID %d during second call
\n
"
,
rlc_status
.
bytes_in_buffer
,
lcid
);
if
(
rlc_status
.
bytes_in_buffer
>
0
)
{
if
(
rlc_status
.
bytes_in_buffer
>
0
)
{
sdu_lengths
[
i
]
=
mac_rlc_data_req
(
mod_id
,
sdu_lengths
[
j
]
=
mac_rlc_data_req
(
mod_id
,
rnti
,
rnti
,
mod_id
,
mod_id
,
frame
,
frame
,
...
@@ -211,14 +210,14 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -211,14 +210,14 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
lcid
,
lcid
,
(
char
*
)
&
dlsch_buffer
[
sdu_length_total
]);
(
char
*
)
&
dlsch_buffer
[
sdu_length_total
]);
LOG_D
(
MAC
,
"[eNB %d][LCID %d] CC_id %d Got %d bytes from RLC
\n
"
,
mod_id
,
lcid
,
CC_id
,
sdu_lengths
[
i
]);
LOG_D
(
MAC
,
"[eNB %d][LCID %d] CC_id %d Got %d bytes from RLC
\n
"
,
mod_id
,
lcid
,
CC_id
,
sdu_lengths
[
j
]);
sdu_length_total
+=
sdu_lengths
[
i
];
sdu_length_total
+=
sdu_lengths
[
j
];
sdu_lcids
[
i
]
=
lcid
;
sdu_lcids
[
j
]
=
lcid
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
lcid
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_pdu_tx
[
lcid
]
+=
1
;
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
lcid
]
+=
sdu_lengths
[
i
];
UE_list
->
eNB_UE_stats
[
CC_id
][
UE_id
].
num_bytes_tx
[
lcid
]
+=
sdu_lengths
[
j
];
if
(
sdu_lengths
[
i
]
<
128
)
{
if
(
sdu_lengths
[
j
]
<
128
)
{
header_len
+=
2
;
header_len
+=
2
;
last_sdu_header_len
=
2
;
last_sdu_header_len
=
2
;
}
else
{
}
else
{
...
@@ -259,7 +258,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -259,7 +258,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
// If there is nothing to schedule, just leave
// If there is nothing to schedule, just leave
if
((
sdu_length_total
)
<=
0
)
{
if
((
sdu_length_total
)
<=
0
)
{
return
;
continue
;
}
}
offset
=
generate_dlsch_header
((
unsigned
char
*
)
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
],
offset
=
generate_dlsch_header
((
unsigned
char
*
)
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
],
...
@@ -271,6 +270,8 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -271,6 +270,8 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
NULL
,
// contention res id
NULL
,
// contention res id
padding
,
padding
,
post_padding
);
post_padding
);
#ifdef DEBUG_eNB_SCHEDULER
#ifdef DEBUG_eNB_SCHEDULER
LOG_T
(
MAC
,
"[eNB %d] First 16 bytes of DLSCH :
\n
"
);
LOG_T
(
MAC
,
"[eNB %d] First 16 bytes of DLSCH :
\n
"
);
...
@@ -288,7 +289,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
...
@@ -288,7 +289,7 @@ void flexran_apply_ue_spec_scheduling_decisions(mid_t mod_id,
// fill remainder of DLSCH with random data
// fill remainder of DLSCH with random data
for
(
j
=
0
;
j
<
(
TBS
-
sdu_length_total
-
offset
);
j
++
)
{
for
(
j
=
0
;
j
<
(
TBS
-
sdu_length_total
-
offset
);
j
++
)
{
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
+
sdu_length_total
+
j
]
=
(
char
)(
taus
()
&
0xff
);
UE_list
->
DLSCH_pdu
[
CC_id
][
0
][
UE_id
].
payload
[
0
][
offset
+
sdu_length_total
+
j
]
=
(
char
)(
taus
()
&
0xff
);
}
}
//eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0][offset+sdu_lengths[0]+j] = (char)(taus()&0xff);
//eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0][offset+sdu_lengths[0]+j] = (char)(taus()&0xff);
if
(
opt_enabled
==
1
)
{
if
(
opt_enabled
==
1
)
{
...
...
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