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
lizhongxiao
OpenXG-RAN
Commits
0f574c35
Commit
0f574c35
authored
Nov 17, 2023
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create struct for MAC DL LCs
parent
0accb601
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
12 deletions
+15
-12
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+4
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+2
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+6
-3
No files found.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
0f574c35
...
...
@@ -62,9 +62,9 @@ static void process_rlcBearerConfig(struct NR_CellGroupConfig__rlc_BearerToAddMo
if
(
rlc_bearer2release_list
)
{
for
(
int
i
=
0
;
i
<
rlc_bearer2release_list
->
list
.
count
;
i
++
)
{
for
(
int
idx
=
0
;
idx
<
sched_ctrl
->
dl_lc_num
;
idx
++
)
{
if
(
sched_ctrl
->
dl_lc
_ids
[
idx
]
==
*
rlc_bearer2release_list
->
list
.
array
[
i
])
{
if
(
sched_ctrl
->
dl_lc
[
idx
].
id
==
*
rlc_bearer2release_list
->
list
.
array
[
i
])
{
const
int
remaining_lcs
=
sched_ctrl
->
dl_lc_num
-
idx
-
1
;
memmove
(
&
sched_ctrl
->
dl_lc
_ids
[
idx
],
&
sched_ctrl
->
dl_lc_ids
[
idx
+
1
],
sizeof
(
sched_ctrl
->
dl_lc_ids
[
idx
])
*
remaining_lcs
);
memmove
(
&
sched_ctrl
->
dl_lc
[
idx
],
&
sched_ctrl
->
dl_lc
[
idx
+
1
],
sizeof
(
sched_ctrl
->
dl_lc
[
idx
])
*
remaining_lcs
);
sched_ctrl
->
dl_lc_num
--
;
break
;
}
...
...
@@ -78,7 +78,7 @@ static void process_rlcBearerConfig(struct NR_CellGroupConfig__rlc_BearerToAddMo
const
int
lcid
=
rlc_bearer2add_list
->
list
.
array
[
i
]
->
logicalChannelIdentity
;
bool
found
=
false
;
for
(
int
idx
=
0
;
idx
<
sched_ctrl
->
dl_lc_num
;
idx
++
)
{
if
(
sched_ctrl
->
dl_lc
_ids
[
idx
]
==
lcid
)
{
if
(
sched_ctrl
->
dl_lc
[
idx
].
id
==
lcid
)
{
found
=
true
;
break
;
}
...
...
@@ -86,7 +86,7 @@ static void process_rlcBearerConfig(struct NR_CellGroupConfig__rlc_BearerToAddMo
if
(
!
found
)
{
sched_ctrl
->
dl_lc_num
++
;
sched_ctrl
->
dl_lc
_ids
[
sched_ctrl
->
dl_lc_num
-
1
]
=
lcid
;
sched_ctrl
->
dl_lc
[
sched_ctrl
->
dl_lc_num
-
1
].
id
=
lcid
;
LOG_D
(
NR_MAC
,
"Adding LCID %d (%s %d)
\n
"
,
lcid
,
lcid
<
4
?
"SRB"
:
"DRB"
,
lcid
);
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
0f574c35
...
...
@@ -326,7 +326,7 @@ static void nr_store_dlsch_buffer(module_id_t module_id, frame_t frame, sub_fram
/* loop over all activated logical channels */
// Note: DL_SCH_LCID_DCCH, DL_SCH_LCID_DCCH1, DL_SCH_LCID_DTCH
for
(
int
i
=
0
;
i
<
sched_ctrl
->
dl_lc_num
;
++
i
)
{
const
int
lcid
=
sched_ctrl
->
dl_lc
_ids
[
i
]
;
const
int
lcid
=
sched_ctrl
->
dl_lc
[
i
].
id
;
const
uint16_t
rnti
=
UE
->
rnti
;
LOG_D
(
NR_MAC
,
"In %s: UE %x: LCID %d
\n
"
,
__FUNCTION__
,
rnti
,
lcid
);
if
(
lcid
==
DL_SCH_LCID_DTCH
&&
sched_ctrl
->
rrc_processing_timer
>
0
)
{
...
...
@@ -1247,7 +1247,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
/* loop over all activated logical channels */
for
(
int
i
=
0
;
i
<
sched_ctrl
->
dl_lc_num
;
++
i
)
{
const
int
lcid
=
sched_ctrl
->
dl_lc
_ids
[
i
]
;
const
int
lcid
=
sched_ctrl
->
dl_lc
[
i
].
id
;
if
(
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
==
0
)
continue
;
// no data for this LC tbs_size_t len = 0;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
0f574c35
...
...
@@ -99,7 +99,7 @@ void nr_preprocessor_phytest(module_id_t module_id,
sched_ctrl
->
num_total_bytes
=
0
;
sched_ctrl
->
dl_lc_num
=
1
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
sched_ctrl
->
dl_lc
_ids
[
sched_ctrl
->
dl_lc_num
-
1
]
=
lcid
;
sched_ctrl
->
dl_lc
[
sched_ctrl
->
dl_lc_num
-
1
].
id
=
lcid
;
const
uint16_t
rnti
=
UE
->
rnti
;
/* update sched_ctrl->num_total_bytes so that postprocessor schedules data,
* if available */
...
...
openair2/LAYER2/NR_MAC_gNB/mac_rrc_dl_handler.c
View file @
0f574c35
...
...
@@ -238,7 +238,7 @@ static void set_nssaiConfig(const int drb_len, const f1ap_drb_to_be_setup_t *req
const
f1ap_drb_to_be_setup_t
*
drb
=
&
req_drbs
[
i
];
long
lcid
=
get_lcid_from_drbid
(
drb
->
drb_id
);
sched_ctrl
->
dl_lc
_nssai
[
lcid
]
=
drb
->
nssai
;
sched_ctrl
->
dl_lc
[
lcid
].
nssai
=
drb
->
nssai
;
LOG_I
(
NR_MAC
,
"Setting NSSAI sst: %d, sd: %d for DRB: %ld
\n
"
,
drb
->
nssai
.
sst
,
drb
->
nssai
.
sd
,
drb
->
drb_id
);
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
0f574c35
...
...
@@ -166,7 +166,7 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
stats
->
ulsch_total_bytes_scheduled
,
stats
->
ul
.
total_bytes
);
for
(
int
i
=
0
;
i
<
sched_ctrl
->
dl_lc_num
;
i
++
)
{
int
lc_id
=
sched_ctrl
->
dl_lc
_ids
[
i
]
;
int
lc_id
=
sched_ctrl
->
dl_lc
[
i
].
id
;
output
+=
snprintf
(
output
,
end
-
output
,
"UE %04x: LCID %d: TX %14"
PRIu64
" RX %14"
PRIu64
" bytes
\n
"
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
0f574c35
...
...
@@ -536,6 +536,11 @@ typedef struct NR_UE_ul_harq {
NR_sched_pusch_t
sched_pusch
;
}
NR_UE_ul_harq_t
;
typedef
struct
{
uint8_t
id
;
nssai_t
nssai
;
}
NR_LC_info_t
;
/*! \brief scheduling control information set through an API */
#define MAX_CSI_REPORTS 48
typedef
struct
{
...
...
@@ -626,15 +631,13 @@ typedef struct {
NR_UE_mac_ce_ctrl_t
UE_mac_ce_ctrl
;
// MAC CE related information
/// number of active DL LCs
uint8_t
dl_lc_num
;
/// order in which DLSCH scheduler should allocate LCs
uint8_t
dl_lc_ids
[
NR_MAX_NUM_LCID
];
NR_LC_info_t
dl_lc
[
NR_MAX_NUM_LCID
];
/// Timer for RRC processing procedures
uint32_t
rrc_processing_timer
;
/// sri, ul_ri and tpmi based on SRS
nr_srs_feedback_t
srs_feedback
;
nssai_t
dl_lc_nssai
[
NR_MAX_NUM_LCID
];
}
NR_UE_sched_ctrl_t
;
typedef
struct
{
...
...
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