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
wangwenhui
OpenXG-RAN
Commits
69ccc900
Commit
69ccc900
authored
Nov 16, 2016
by
fnabet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix BSR long size and fill
parent
2965d79d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
10 deletions
+9
-10
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+4
-5
openair2/LAYER2/MAC/ue_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
+3
-5
targets/SIMU/USER/oaisim.c
targets/SIMU/USER/oaisim.c
+2
-0
No files found.
openair2/LAYER2/MAC/defs.h
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))
...
...
openair2/LAYER2/MAC/ue_procedures.c
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
);
...
...
targets/SIMU/USER/oaisim.c
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
];
...
...
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