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
e328a6cc
Commit
e328a6cc
authored
Dec 15, 2020
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make multiple passes over RLC to get all data
parent
76d154f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
41 deletions
+57
-41
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+57
-41
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
e328a6cc
...
@@ -821,55 +821,71 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -821,55 +821,71 @@ void nr_schedule_ue_spec(module_id_t module_id,
NULL
);
// contention res id
NULL
);
// contention res id
buf
+=
written
;
buf
+=
written
;
int
size
=
TBS
-
written
;
int
size
=
TBS
-
written
;
DevAssert
(
size
>=
0
);
DevAssert
(
size
>
3
);
/* next, get RLC data */
/* next, get RLC data */
// we do not know how much data we will get from RLC, i.e., whether it
// will be longer than 256B or not. Therefore, reserve space for long header, then
// fetch data, then fill real length
NR_MAC_SUBHEADER_LONG
*
header
=
(
NR_MAC_SUBHEADER_LONG
*
)
buf
;
buf
+=
3
;
size
-=
3
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
int
dlsch_total_bytes
=
0
;
int
dlsch_total_bytes
=
0
;
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
/* this is the data from the RLC we would like to request (e.g., only
tbs_size_t
len
=
0
;
* some bytes for first LC and some more from a second one */
while
(
size
>
3
)
{
const
rlc_buffer_occupancy_t
ndata
=
min
(
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
size
);
// we do not know how much data we will get from RLC, i.e., whether it
const
tbs_size_t
len
=
mac_rlc_data_req
(
module_id
,
// will be longer than 256B or not. Therefore, reserve space for long header, then
rnti
,
// fetch data, then fill real length
module_id
,
NR_MAC_SUBHEADER_LONG
*
header
=
(
NR_MAC_SUBHEADER_LONG
*
)
buf
;
frame
,
buf
+=
3
;
ENB_FLAG_YES
,
size
-=
3
;
MBMS_FLAG_NO
,
lcid
,
/* limit requested number of bytes to what preprocessor specified, or
ndata
,
* such that TBS is full */
(
char
*
)
buf
,
const
rlc_buffer_occupancy_t
ndata
=
min
(
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
size
);
0
,
len
=
mac_rlc_data_req
(
module_id
,
0
);
rnti
,
module_id
,
LOG_D
(
MAC
,
frame
,
"%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)
\n
"
,
ENB_FLAG_YES
,
frame
,
MBMS_FLAG_NO
,
slot
,
lcid
,
rnti
,
ndata
,
len
,
(
char
*
)
buf
,
lcid
,
0
,
ndata
,
0
);
size
);
LOG_D
(
MAC
,
header
->
R
=
0
;
"%4d.%2d RNTI %04x: %d bytes from DTCH %d (ndata %d, remaining size %d)
\n
"
,
header
->
F
=
1
;
frame
,
header
->
LCID
=
lcid
;
slot
,
header
->
L1
=
(
len
>>
8
)
&
0xff
;
rnti
,
header
->
L2
=
len
&
0xff
;
len
,
size
-=
len
;
lcid
,
buf
+=
len
;
ndata
,
dlsch_total_bytes
+=
len
;
size
);
if
(
len
==
0
)
break
;
header
->
R
=
0
;
header
->
F
=
1
;
header
->
LCID
=
lcid
;
header
->
L1
=
(
len
>>
8
)
&
0xff
;
header
->
L2
=
len
&
0xff
;
size
-=
len
;
buf
+=
len
;
dlsch_total_bytes
+=
len
;
}
if
(
len
==
0
)
{
/* RLC did not have data anymore, mark buffer as unused */
buf
-=
3
;
size
+=
3
;
}
}
}
else
if
(
get_softmodem_params
()
->
phy_test
||
get_softmodem_params
()
->
do_ra
)
{
else
if
(
get_softmodem_params
()
->
phy_test
||
get_softmodem_params
()
->
do_ra
)
{
/* we will need the large header, phy-test typically allocates all
* resources and fills to the last byte below */
NR_MAC_SUBHEADER_LONG
*
header
=
(
NR_MAC_SUBHEADER_LONG
*
)
buf
;
buf
+=
3
;
size
-=
3
;
DevAssert
(
size
>
0
);
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: TBS %d with %d B of random data
\n
"
,
frame
,
slot
,
TBS
,
size
);
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: TBS %d with %d B of random data
\n
"
,
frame
,
slot
,
TBS
,
size
);
// fill dlsch_buffer with random data
// fill dlsch_buffer with random data
for
(
int
i
=
0
;
i
<
size
;
i
++
)
for
(
int
i
=
0
;
i
<
size
;
i
++
)
...
...
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