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
Michael Black
OpenXG-RAN
Commits
f44dd631
Commit
f44dd631
authored
Jul 28, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr_process_mac_pdu formatting
parent
478ea7ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
269 additions
and
275 deletions
+269
-275
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+269
-275
No files found.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
f44dd631
...
...
@@ -87,7 +87,7 @@ const int get_ul_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon
// F: length of L is 0:8 or 1:16 bits wide
// R: Reserved bit, set to zero.
int
nr_process_mac_pdu
(
instance_t
module_idP
,
int
nr_process_mac_pdu
(
instance_t
module_idP
,
NR_UE_info_t
*
UE
,
uint8_t
CC_id
,
frame_t
frameP
,
...
...
@@ -96,7 +96,6 @@ int nr_process_mac_pdu( instance_t module_idP,
int
pdu_len
)
{
uint8_t
done
=
0
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE
->
UE_sched_ctrl
;
...
...
@@ -104,10 +103,10 @@ int nr_process_mac_pdu( instance_t module_idP,
if
(
pduP
[
0
]
!=
UL_SCH_LCID_PADDING
)
trace_NRpdu
(
DIRECTION_UPLINK
,
pduP
,
pdu_len
,
WS_C_RNTI
,
UE
->
rnti
,
frameP
,
0
,
0
,
0
);
#ifdef ENABLE_MAC_PAYLOAD_DEBUG
#ifdef ENABLE_MAC_PAYLOAD_DEBUG
LOG_I
(
NR_MAC
,
"In %s: dumping MAC PDU in %d.%d:
\n
"
,
__func__
,
frameP
,
slot
);
log_dump
(
NR_MAC
,
pduP
,
pdu_len
,
LOG_DUMP_CHAR
,
"
\n
"
);
#endif
#endif
while
(
!
done
&&
pdu_len
>
0
){
uint16_t
mac_len
=
0
;
...
...
@@ -121,7 +120,6 @@ int nr_process_mac_pdu( instance_t module_idP,
switch
(
rx_lcid
){
// MAC CE
/*#ifdef DEBUG_HEADER_PARSING
LOG_D(NR_MAC, "[UE] LCID %d, PDU length %d\n", ((NR_MAC_SUBHEADER_FIXED *)pduP)->LCID, pdu_len);
#endif*/
...
...
@@ -132,7 +130,6 @@ int nr_process_mac_pdu( instance_t module_idP,
case
UL_SCH_LCID_CONFIGURED_GRANT_CONFIRMATION
:
// 38.321 Ch6.1.3.7
break
;
case
UL_SCH_LCID_S_BSR
:
case
UL_SCH_LCID_S_TRUNCATED_BSR
:
//38.321 section 6.1.3.1
...
...
@@ -152,7 +149,6 @@ int nr_process_mac_pdu( instance_t module_idP,
NR_SHORT_BSR_TABLE
[
bsr_s
->
Buffer_size
],
sched_ctrl
->
estimated_ul_buffer
);
break
;
case
UL_SCH_LCID_L_BSR
:
case
UL_SCH_LCID_L_TRUNCATED_BSR
:
//38.321 section 6.1.3.1
...
...
@@ -180,8 +176,7 @@ int nr_process_mac_pdu( instance_t module_idP,
LOG_D
(
NR_MAC
,
"LONG BSR, %d/%d (n/n_Lcg), BS Index %d, BS value < %d"
,
n
,
n_Lcg
,
pduP
[
mac_subheader_len
+
1
+
n
],
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]]);
sched_ctrl
->
estimated_ul_buffer
+=
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]];
sched_ctrl
->
estimated_ul_buffer
+=
NR_LONG_BSR_TABLE
[
pduP
[
mac_subheader_len
+
1
+
n
]];
LOG_D
(
NR_MAC
,
"LONG BSR at %4d.%2d, %d/%d (n/n_Lcg), BS Index %d, BS value < %d, total %d
\n
"
,
frameP
,
...
...
@@ -339,7 +334,6 @@ int nr_process_mac_pdu( instance_t module_idP,
if
(
!
get_mac_len
(
pduP
,
pdu_len
,
&
mac_len
,
&
mac_subheader_len
))
return
0
;
LOG_D
(
NR_MAC
,
"[UE %04x] %d.%d : ULSCH -> UL-%s %d (gNB %ld, %d bytes)
\n
"
,
UE
->
rnti
,
frameP
,
...
...
@@ -375,7 +369,7 @@ int nr_process_mac_pdu( instance_t module_idP,
break
;
}
#ifdef ENABLE_MAC_PAYLOAD_DEBUG
#ifdef ENABLE_MAC_PAYLOAD_DEBUG
if
(
rx_lcid
<
45
||
rx_lcid
==
52
||
rx_lcid
==
63
)
{
LOG_I
(
NR_MAC
,
"In %s: dumping UL MAC SDU sub-header with length %d (LCID = 0x%02x):
\n
"
,
__func__
,
mac_subheader_len
,
rx_lcid
);
log_dump
(
NR_MAC
,
pduP
,
mac_subheader_len
,
LOG_DUMP_CHAR
,
"
\n
"
);
...
...
@@ -385,7 +379,7 @@ int nr_process_mac_pdu( instance_t module_idP,
LOG_I
(
NR_MAC
,
"In %s: dumping UL MAC CE with length %d (LCID = 0x%02x):
\n
"
,
__func__
,
mac_len
,
rx_lcid
);
log_dump
(
NR_MAC
,
pduP
+
mac_subheader_len
+
mac_len
,
mac_len
,
LOG_DUMP_CHAR
,
"
\n
"
);
}
#endif
#endif
pduP
+=
(
mac_subheader_len
+
mac_len
);
pdu_len
-=
(
mac_subheader_len
+
mac_len
);
...
...
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