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
b8677833
Commit
b8677833
authored
Feb 26, 2018
by
Niccolò Iardella
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add partitioning as a separate function
parent
89e8ce29
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+31
-9
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+5
-1
No files found.
openair2/LAYER2/MAC/pre_processor.c
View file @
b8677833
...
...
@@ -611,6 +611,29 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t
#endif
}
void
dlsch_scheduler_pre_processor_partitioning
(
module_id_t
Mod_id
,
slice_id_t
slice_id
,
const
uint8_t
rbs_retx
[
MAX_NUM_CCs
])
{
int
UE_id
,
CC_id
,
N_RB_DL
,
i
;
UE_list_t
*
UE_list
=
&
RC
.
mac
[
Mod_id
]
->
UE_list
;
UE_sched_ctrl
*
ue_sched_ctl
;
for
(
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
if
(
UE_RNTI
(
Mod_id
,
UE_id
)
==
NOT_A_RNTI
)
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
UE_id
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_slice_membership
(
UE_id
,
slice_id
))
continue
;
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
for
(
i
=
0
;
i
<
UE_num_active_CC
(
UE_list
,
UE_id
);
++
i
)
{
CC_id
=
UE_list
->
ordered_CCids
[
i
][
UE_id
];
N_RB_DL
=
to_prb
(
RC
.
mac
[
Mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
);
ue_sched_ctl
->
max_rbs_allowed_slice
[
CC_id
][
slice_id
]
=
nb_rbs_allowed_slice
(
slice_percentage
[
slice_id
],
N_RB_DL
)
-
rbs_retx
[
CC_id
];
}
}
}
void
dlsch_scheduler_pre_processor_accounting
(
module_id_t
Mod_id
,
slice_id_t
slice_id
,
frame_t
frameP
,
...
...
@@ -634,7 +657,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
int
ue_count_retx
[
MAX_NUM_CCs
];
uint8_t
ue_retx_flag
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
int
N_RB_DL
;
UE_list_t
*
UE_list
=
&
RC
.
mac
[
Mod_id
]
->
UE_list
;
UE_sched_ctrl
*
ue_sched_ctl
;
COMMON_channels_t
*
cc
;
...
...
@@ -684,6 +706,10 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
}
}
// PARTITIONING
// Reduces the available RBs according to slicing configuration
dlsch_scheduler_pre_processor_partitioning
(
Mod_id
,
slice_id
,
rbs_retx
);
switch
(
accounting_policy
[
slice_id
])
{
// If greedy scheduling, try to account all the required RBs
...
...
@@ -714,19 +740,15 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
if
(
!
ue_slice_membership
(
UE_id
,
slice_id
))
continue
;
for
(
i
=
0
;
i
<
UE_num_active_CC
(
UE_list
,
UE_id
);
++
i
)
{
CC_id
=
UE_list
->
ordered_CCids
[
i
][
UE_id
];
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
N_RB_DL
=
to_prb
(
RC
.
mac
[
Mod_id
]
->
common_channels
[
CC_id
].
mib
->
message
.
dl_Bandwidth
)
-
rbs_retx
[
CC_id
];
// recalculate based on the what is left after retransmission
ue_sched_ctl
->
max_rbs_allowed_slice
[
CC_id
][
slice_id
]
=
nb_rbs_allowed_slice
(
slice_percentage
[
slice_id
],
N_RB_DL
);
available_rbs
=
ue_sched_ctl
->
max_rbs_allowed_slice
[
CC_id
][
slice_id
];
if
(
total_ue_count
[
CC_id
]
==
0
)
{
if
(
ue_count_newtx
[
CC_id
]
==
0
)
{
average_rbs_per_user
[
CC_id
]
=
0
;
}
else
if
(
(
min_rb_unit
[
CC_id
]
*
total_ue_count
[
CC_id
])
<=
available_rbs
)
{
average_rbs_per_user
[
CC_id
]
=
(
uint16_t
)
floor
(
available_rbs
/
total_ue_count
[
CC_id
]);
}
else
if
(
min_rb_unit
[
CC_id
]
*
ue_count_newtx
[
CC_id
]
<=
available_rbs
)
{
average_rbs_per_user
[
CC_id
]
=
(
uint16_t
)
floor
(
available_rbs
/
ue_count_newtx
[
CC_id
]);
}
else
{
// consider the total number of use that can be scheduled UE
average_rbs_per_user
[
CC_id
]
=
(
uint16_t
)
min_rb_unit
[
CC_id
];
...
...
openair2/LAYER2/MAC/proto.h
View file @
b8677833
...
...
@@ -228,6 +228,10 @@ void dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
unsigned
char
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
],
int
*
mbsfn_flag
);
void
dlsch_scheduler_pre_processor_partitioning
(
module_id_t
Mod_id
,
slice_id_t
slice_id
,
const
uint8_t
rbs_retx
[
MAX_NUM_CCs
]);
void
dlsch_scheduler_pre_processor_accounting
(
module_id_t
Mod_id
,
slice_id_t
slice_id
,
frame_t
frameP
,
...
...
@@ -262,7 +266,7 @@ void dlsch_scheduler_pre_processor_allocate(module_id_t Mod_id,
int
N_RBG
,
int
min_rb_unit
,
uint16_t
nb_rbs_required
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_re
quired_re
maining
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
uint16_t
nb_rbs_remaining
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
],
unsigned
char
rballoc_sub
[
MAX_NUM_CCs
][
N_RBG_MAX
],
uint8_t
slice_allocation_mask
[
MAX_NUM_CCs
][
N_RBG_MAX
],
unsigned
char
MIMO_mode_indicator
[
MAX_NUM_CCs
][
N_RBG_MAX
]);
...
...
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