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
promise
OpenXG-RAN
Commits
dbcf8850
Commit
dbcf8850
authored
Jan 09, 2021
by
Robert Schmidt
Committed by
ChiehChun
Jan 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add estimated_ul_buffer & Update in DTCH
parent
77e38be1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
2 deletions
+26
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+23
-2
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-0
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
dbcf8850
...
...
@@ -78,6 +78,13 @@ void nr_process_mac_pdu(
uint16_t
mac_ce_len
,
mac_subheader_len
,
mac_sdu_len
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_idP
]
->
UE_info
;
int
UE_id
=
find_nr_UE_id
(
module_idP
,
rnti
);
if
(
UE_id
==
-
1
)
{
LOG_E
(
MAC
,
"%s() UE_id == -1
\n
"
,
__func__
);
return
;
}
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
// For both DL/UL-SCH
// Except:
// - UL/DL-SCH: fixed-size MAC CE(known by LCID)
...
...
@@ -136,8 +143,13 @@ void nr_process_mac_pdu(
/* Extract short BSR value */
ce_ptr
=
&
pdu_ptr
[
mac_subheader_len
];
NR_BSR_SHORT
*
bsr_s
=
(
NR_BSR_SHORT
*
)
ce_ptr
;
LOG_I
(
MAC
,
"SHORT BSR, LCG ID %d, BS Index %d, BS value < %d
\n
"
,
bsr_s
->
LcgID
,
bsr_s
->
Buffer_size
,
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
]);
sched_ctrl
->
estimated_ul_buffer
=
0
;
sched_ctrl
->
estimated_ul_buffer
=
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
];
LOG_D
(
MAC
,
"SHORT BSR, LCG ID %d, BS Index %d, BS value < %d, est buf %d
\n
"
,
bsr_s
->
LcgID
,
bsr_s
->
Buffer_size
,
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
],
sched_ctrl
->
estimated_ul_buffer
);
break
;
case
UL_SCH_LCID_L_BSR
:
...
...
@@ -153,6 +165,7 @@ void nr_process_mac_pdu(
/* Extract long BSR value */
ce_ptr
=
&
pdu_ptr
[
mac_subheader_len
];
NR_BSR_LONG
*
bsr_l
=
(
NR_BSR_LONG
*
)
ce_ptr
;
sched_ctrl
->
estimated_ul_buffer
=
0
;
n_Lcg
=
bsr_l
->
LcgID7
+
bsr_l
->
LcgID6
+
bsr_l
->
LcgID5
+
bsr_l
->
LcgID4
+
bsr_l
->
LcgID3
+
bsr_l
->
LcgID2
+
bsr_l
->
LcgID1
+
bsr_l
->
LcgID0
;
...
...
@@ -165,6 +178,8 @@ void nr_process_mac_pdu(
LOG_D
(
MAC
,
"LONG BSR, %d/%d (n/n_Lcg), BS Index %d, BS value < %d"
,
n
,
n_Lcg
,
pdu_ptr
[
mac_subheader_len
+
1
+
n
],
NR_LONG_BSR_TABLE
[
pdu_ptr
[
mac_subheader_len
+
1
+
n
]]);
sched_ctrl
->
estimated_ul_buffer
+=
NR_LONG_BSR_TABLE
[
pdu_ptr
[
mac_subheader_len
+
1
+
n
]];
}
break
;
...
...
@@ -263,6 +278,12 @@ void nr_process_mac_pdu(
1
,
NULL
);
/* Updated estimated buffer when receiving data */
if
(
sched_ctrl
->
estimated_ul_buffer
>=
mac_sdu_len
)
sched_ctrl
->
estimated_ul_buffer
-=
mac_sdu_len
;
else
sched_ctrl
->
estimated_ul_buffer
=
0
;
break
;
default:
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
dbcf8850
...
...
@@ -423,6 +423,9 @@ typedef struct {
uint16_t
rbSize
;
uint16_t
rbStart
;
/// estimation of the UL buffer size
int
estimated_ul_buffer
;
// time-domain allocation for scheduled RBs
int
time_domain_allocation
;
...
...
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