Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
66442047
Commit
66442047
authored
8 years ago
by
calvin wang
Browse files
Options
Downloads
Patches
Plain Diff
add BSR trigger code for interoperability test
parent
0dfde2f4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
openair2/LAYER2/MAC/defs.h
+4
-0
4 additions, 0 deletions
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/ue_procedures.c
+15
-2
15 additions, 2 deletions
openair2/LAYER2/MAC/ue_procedures.c
with
19 additions
and
2 deletions
openair2/LAYER2/MAC/defs.h
+
4
−
0
View file @
66442047
...
...
@@ -947,6 +947,10 @@ typedef struct {
uint8_t
BSR
[
MAX_NUM_LCGID
];
// should be more for mesh topology
/// keep the number of bytes in rlc buffer for each lcgid
uint16_t
BSR_bytes
[
MAX_NUM_LCGID
];
#if 0 //calvin for BSR test,current buffer greater then previous one, or buffer from 0 to !0
/// after multiplexing buffer remain for each lcid
uint16_t LCID_buffer_remain[MAX_NUM_LCID];
#endif
/// buffer status for each lcid
uint8_t
LCID_status
[
MAX_NUM_LCID
];
/// SR pending as defined in 36.321
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/ue_procedures.c
+
15
−
2
View file @
66442047
...
...
@@ -1356,6 +1356,9 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
//update_bsr(module_idP, frameP, eNB_index, DCCH, UE_mac_inst[module_idP].scheduling_info.LCGID[DCCH]);
//header_len +=2;
UE_mac_inst
[
module_idP
].
scheduling_info
.
LCID_status
[
DCCH
]
=
LCID_EMPTY
;
#if 0 //calvin for BSR test,current buffer greater then previous one, or buffer from 0 to !0
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[DCCH] = rlc_status.bytes_in_buffer-sdu_lengths[0];
#endif
}
else
{
dcch_header_len
=
0
;
num_sdus
=
0
;
...
...
@@ -1391,10 +1394,13 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
sdu_length_total
+=
sdu_lengths
[
num_sdus
];
sdu_lcids
[
num_sdus
]
=
DCCH1
;
LOG_D
(
MAC
,
"[UE %d] TX Got %d bytes for DCCH1
\n
"
,
module_idP
,
sdu_lengths
[
num_sdus
]);
num_sdus
++
;
//update_bsr(module_idP, frameP, DCCH1);
//dcch_header_len +=2; // include dcch1
UE_mac_inst
[
module_idP
].
scheduling_info
.
LCID_status
[
DCCH1
]
=
LCID_EMPTY
;
#if 0 //calvin for BSR test,current buffer greater then previous one, or buffer from 0 to !0
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[DCCH1] = rlc_status.bytes_in_buffer-sdu_lengths[num_sdus];
#endif
num_sdus
++
;
}
else
{
dcch1_header_len
=
0
;
}
...
...
@@ -1449,6 +1455,9 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
dtch_header_len
--
;
dtch_header_len_last
--
;
}
#if 0 //calvin for BSR test,current buffer greater then previous one, or buffer from 0 to !0
UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[lcid] = rlc_status.bytes_in_buffer-sdu_lengths[num_sdus];
#endif
num_sdus
++
;
//UE_mac_inst[module_idP].ul_active = update_bsr(module_idP, frameP, eNB_index,lcid, UE_mac_inst[module_idP].scheduling_info.LCGID[lcid]);
}
else
{
...
...
@@ -2077,7 +2086,11 @@ boolean_t update_bsr(module_id_t module_idP, frame_t frameP, eNB_index_t eNB_in
lcid
,
0
);
if
(
rlc_status
.
bytes_in_buffer
>
0
)
{
if
((
rlc_status
.
bytes_in_buffer
>
0
)
#if 0 //calvin for BSR test,current buffer greater then previous one, or buffer from 0 to !0
&& (rlc_status.bytes_in_buffer > UE_mac_inst[module_idP].scheduling_info.LCID_buffer_remain[lcid])
#endif
){
//BSR trigger SR
sr_pending
=
TRUE
;
UE_mac_inst
[
module_idP
].
scheduling_info
.
LCID_status
[
lcid
]
=
LCID_NOT_EMPTY
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment