Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
Shweta Shrivastava
openairinterface5G
Commits
69ccc900
Commit
69ccc900
authored
8 years ago
by
fnabet
Browse files
Options
Downloads
Patches
Plain Diff
fix BSR long size and fill
parent
2965d79d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
openair2/LAYER2/MAC/defs.h
+4
-5
4 additions, 5 deletions
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/ue_procedures.c
+3
-5
3 additions, 5 deletions
openair2/LAYER2/MAC/ue_procedures.c
targets/SIMU/USER/oaisim.c
+2
-0
2 additions, 0 deletions
targets/SIMU/USER/oaisim.c
with
9 additions
and
10 deletions
openair2/LAYER2/MAC/defs.h
+
4
−
5
View file @
69ccc900
...
...
@@ -223,11 +223,10 @@ typedef struct {
typedef
BSR_SHORT
BSR_TRUNCATED
;
/*!\brief mac control element: long buffer status report for all logical channel group ID*/
typedef
struct
{
uint32_t
Buffer_size3
:
6
;
uint32_t
Buffer_size2
:
6
;
uint32_t
Buffer_size1
:
6
;
uint32_t
Buffer_size0
:
6
;
uint32_t
padding
:
8
;
uint8_t
Buffer_size3
:
6
;
uint8_t
Buffer_size2
:
6
;
uint8_t
Buffer_size1
:
6
;
uint8_t
Buffer_size0
:
6
;
}
__attribute__
((
__packed__
))
BSR_LONG
;
#define BSR_LONG_SIZE (sizeof(BSR_LONG))
...
...
This diff is collapsed.
Click to expand it.
openair2/LAYER2/MAC/ue_procedures.c
+
3
−
5
View file @
69ccc900
...
...
@@ -1147,8 +1147,6 @@ unsigned char generate_ulsch_header(uint8_t *mac_header,
*
(
ce_ptr
)
=
(
long_bsr
->
Buffer_size0
<<
2
)
|
((
long_bsr
->
Buffer_size1
&
0x30
)
>>
4
);
*
(
ce_ptr
+
1
)
=
((
long_bsr
->
Buffer_size1
&
0x0F
)
<<
4
)
|
((
long_bsr
->
Buffer_size2
&
0x3C
)
>>
2
);
*
(
ce_ptr
+
2
)
=
((
long_bsr
->
Buffer_size2
&
0x03
)
<<
2
)
|
(
long_bsr
->
Buffer_size3
&
0x3F
);
/* Padding */
*
(
ce_ptr
+
3
)
=
0
;
ce_ptr
+=
BSR_LONG_SIZE
;
// printf("(cont_res) : offset %d\n",ce_ptr-mac_header_control_elements);
...
...
@@ -1347,7 +1345,7 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
bsr_ce_len
=
sizeof
(
BSR_SHORT
);
//1 byte
}
else
{
bsr_ce_len
=
sizeof
(
BSR_LONG
)
;
//3 bytes
bsr_ce_len
=
BSR_LONG
_SIZE
;
//3 bytes
}
bsr_header_len
=
1
;
//sizeof(SCH_SUBHEADER_FIXED);
...
...
@@ -1601,7 +1599,7 @@ void ue_get_sdu(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_t subf
bsr_s
=
NULL
;
bsr_l
=
NULL
;
//TO DO : compute padding or truncated BSR
}
else
if
(
bsr_ce_len
==
sizeof
(
BSR_LONG
)
)
{
}
else
if
(
bsr_ce_len
==
BSR_LONG
_SIZE
)
{
bsr_s
=
NULL
;
bsr_l
->
Buffer_size0
=
UE_mac_inst
[
module_idP
].
scheduling_info
.
BSR
[
LCGID0
];
bsr_l
->
Buffer_size1
=
UE_mac_inst
[
module_idP
].
scheduling_info
.
BSR
[
LCGID1
];
...
...
@@ -2194,7 +2192,7 @@ uint8_t get_bsr_len (module_id_t module_idP, uint8_t eNB_index,frame_t frameP,ui
}
if
(
(
pdu
>
buflen
)
&&
(
rlc_status
.
bytes_in_buffer
>
0
)
)
{
num_lcid
+=
1
;
bsr_len
=
(
num_lcid
>=
2
)
?
sizeof
(
BSR_LONG
)
:
sizeof
(
BSR_SHORT
)
;
bsr_len
=
(
num_lcid
>=
2
)
?
BSR_LONG
_SIZE
:
sizeof
(
BSR_SHORT
)
;
}
else
if
(
rlc_status
.
bytes_in_buffer
)
{
LOG_I
(
MAC
,
"pdu smaller than TBS! pdu=%d TBS=%d lcid=%d rlc buffer=%d bsr len=%d num lcid=%d
\n
"
,
pdu
,
buflen
,
lcid
,
rlc_status
.
bytes_in_buffer
,
bsr_len
,
num_lcid
);
...
...
This diff is collapsed.
Click to expand it.
targets/SIMU/USER/oaisim.c
+
2
−
0
View file @
69ccc900
...
...
@@ -122,6 +122,8 @@ char smbv_ip[16];
//#define K 2 /* averaging coefficient */
//#define TARGET_SF_TIME_NS 1000000 /* 1ms = 1000000 ns */
uint8_t
usim_test
=
0
;
frame_t
frame
=
0
;
char
stats_buffer
[
16384
];
channel_desc_t
*
eNB2UE
[
NUMBER_OF_eNB_MAX
][
NUMBER_OF_UE_MAX
][
MAX_NUM_CCs
];
...
...
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