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
3aedea26
Commit
3aedea26
authored
Apr 06, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add slice association in UE_list, test against it in slice_membership()
parent
55386c25
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
29 deletions
+43
-29
openair2/LAYER2/MAC/defs.h
openair2/LAYER2/MAC/defs.h
+3
-0
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+1
-1
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+19
-6
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+1
-1
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+17
-20
openair2/LAYER2/MAC/proto.h
openair2/LAYER2/MAC/proto.h
+2
-1
No files found.
openair2/LAYER2/MAC/defs.h
View file @
3aedea26
...
...
@@ -984,6 +984,9 @@ typedef struct {
uint16_t
sorting_criteria
[
MAX_NUM_SLICES
][
CR_NUM
];
uint16_t
first_rb_offset
[
MAX_NUM_CCs
][
MAX_NUM_SLICES
];
slice_id_t
assoc_dl_slice
[
NUMBER_OF_UE_MAX
];
slice_id_t
assoc_ul_slice
[
NUMBER_OF_UE_MAX
];
}
UE_list_t
;
/// Structure for saving the output of each pre_processor instance
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
3aedea26
...
...
@@ -772,7 +772,7 @@ schedule_ue_spec(module_id_t module_idP, slice_id_t slice_idP,
continue_flag
=
1
;
}
if
(
!
ue_
slice_membership
(
UE_id
,
slice_idP
,
RC
.
mac
[
module_idP
]
->
slice_info
.
n_dl
))
if
(
!
ue_
dl_slice_membership
(
module_idP
,
UE_id
,
slice_idP
))
continue
;
if
(
continue_flag
!=
1
)
{
...
...
openair2/LAYER2/MAC/eNB_scheduler_primitives.c
View file @
3aedea26
...
...
@@ -1866,6 +1866,9 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
sizeof
(
eNB_UE_STATS
));
UE_list
->
UE_sched_ctrl
[
UE_id
].
ue_reestablishment_reject_timer
=
0
;
/* default slice in case there was something different */
UE_list
->
assoc_dl_slice
[
UE_id
]
=
0
;
UE_list
->
assoc_ul_slice
[
UE_id
]
=
0
;
UE_list
->
UE_sched_ctrl
[
UE_id
].
ta_update
=
31
;
...
...
@@ -4138,14 +4141,24 @@ uint16_t nb_rbs_allowed_slice(float rb_percentage, int total_rbs)
return
(
uint16_t
)
floor
(
rb_percentage
*
total_rbs
);
}
int
ue_
slice_membership
(
int
UE_id
,
int
slice_id
,
int
n_active_slices
)
int
ue_
dl_slice_membership
(
module_id_t
mod_id
,
int
UE_id
,
slice_id_t
slice_id
)
{
if
((
slice_id
<
0
)
||
(
slice_id
>
n_active_slices
))
if
((
slice_id
<
0
)
||
(
slice_id
>=
RC
.
mac
[
mod_id
]
->
slice_info
.
n_dl
))
{
LOG_W
(
MAC
,
"out of range slice id %d
\n
"
,
slice_id
);
return
0
;
}
return
RC
.
mac
[
mod_id
]
->
UE_list
.
active
[
UE_id
]
==
TRUE
&&
RC
.
mac
[
mod_id
]
->
UE_list
.
assoc_dl_slice
[
UE_id
]
==
slice_id
;
}
if
((
UE_id
%
n_active_slices
)
==
slice_id
)
{
return
1
;
// this ue is a member of this slice
int
ue_ul_slice_membership
(
module_id_t
mod_id
,
int
UE_id
,
slice_id_t
slice_id
)
{
if
((
slice_id
<
0
)
||
(
slice_id
>=
RC
.
mac
[
mod_id
]
->
slice_info
.
n_ul
))
{
LOG_W
(
MAC
,
"out of range slice id %d
\n
"
,
slice_id
);
return
0
;
}
return
0
;
return
RC
.
mac
[
mod_id
]
->
UE_list
.
active
[
UE_id
]
==
TRUE
&&
RC
.
mac
[
mod_id
]
->
UE_list
.
assoc_ul_slice
[
UE_id
]
==
slice_id
;
}
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
3aedea26
...
...
@@ -1141,7 +1141,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
for
(
UE_id
=
UE_list
->
head_ul
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next_ul
[
UE_id
])
{
if
(
!
ue_
slice_membership
(
UE_id
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
UE_id
,
slice_id
))
continue
;
// don't schedule if Msg4 is not received yet
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
3aedea26
...
...
@@ -105,7 +105,7 @@ store_dlsch_buffer(module_id_t Mod_id,
if
(
UE_list
->
active
[
UE_id
]
!=
TRUE
)
continue
;
if
(
!
ue_
slice_membership
(
UE_id
,
slice_id
,
RC
.
mac
[
Mod_id
]
->
slice_info
.
n_dl
))
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
UE_id
,
slice_id
))
continue
;
UE_template
=
&
UE_list
->
UE_template
[
UE_PCCID
(
Mod_id
,
UE_id
)][
UE_id
];
...
...
@@ -190,7 +190,7 @@ assign_rbs_required(module_id_t Mod_id,
// clear rb allocations across all CC_id
for
(
UE_id
=
0
;
UE_id
<
NUMBER_OF_UE_MAX
;
++
UE_id
)
{
if
(
UE_list
->
active
[
UE_id
]
!=
TRUE
)
continue
;
if
(
!
ue_
slice_membership
(
UE_id
,
slice_id
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
UE_id
,
slice_id
))
continue
;
pCCid
=
UE_PCCID
(
Mod_id
,
UE_id
);
//update CQI information across component carriers
...
...
@@ -509,7 +509,7 @@ void sort_UEs(module_id_t Mod_idP, slice_id_t slice_id, int frameP, sub_frame_t
if
(
UE_list
->
active
[
i
]
==
FALSE
)
continue
;
if
(
UE_RNTI
(
Mod_idP
,
i
)
==
NOT_A_RNTI
)
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_
slice_membership
(
i
,
slice_id
,
RC
.
mac
[
Mod_idP
]
->
slice_info
.
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_idP
,
i
,
slice_id
))
continue
;
list
[
list_size
]
=
i
;
list_size
++
;
...
...
@@ -613,7 +613,7 @@ void dlsch_scheduler_pre_processor_partitioning(module_id_t Mod_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
,
RC
.
mac
[
Mod_id
]
->
slice_info
.
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
UE_id
,
slice_id
))
continue
;
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
...
...
@@ -653,7 +653,6 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
uint8_t
ue_retx_flag
[
MAX_NUM_CCs
][
NUMBER_OF_UE_MAX
];
UE_list_t
*
UE_list
=
&
RC
.
mac
[
Mod_id
]
->
UE_list
;
slice_info_t
*
sli
=
&
RC
.
mac
[
Mod_id
]
->
slice_info
;
UE_sched_ctrl
*
ue_sched_ctl
;
COMMON_channels_t
*
cc
;
...
...
@@ -674,7 +673,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
rnti
=
UE_RNTI
(
Mod_id
,
UE_id
);
if
(
rnti
==
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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -714,7 +713,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
rnti
=
UE_RNTI
(
Mod_id
,
UE_id
);
if
(
rnti
==
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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -734,7 +733,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
if
(
rnti
==
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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
UE_id
,
slice_id
))
continue
;
for
(
i
=
0
;
i
<
UE_num_active_CC
(
UE_list
,
UE_id
);
++
i
)
{
...
...
@@ -759,7 +758,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
rnti
=
UE_RNTI
(
Mod_id
,
UE_id
);
if
(
rnti
==
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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -778,7 +777,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
rnti
=
UE_RNTI
(
Mod_id
,
UE_id
);
if
(
rnti
==
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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -815,7 +814,6 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
uint8_t
transmission_mode
;
uint8_t
slice_allocation_mask
[
MAX_NUM_CCs
][
N_RBG_MAX
];
UE_list_t
*
UE_list
=
&
RC
.
mac
[
Mod_id
]
->
UE_list
;
slice_info_t
*
sli
=
&
RC
.
mac
[
Mod_id
]
->
slice_info
;
decode_slice_positioning
(
Mod_id
,
slice_id
,
slice_allocation_mask
);
...
...
@@ -824,7 +822,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -1045,7 +1043,7 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_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
,
sli
->
n_dl
))
continue
;
if
(
!
ue_
dl_slice_membership
(
Mod_id
,
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
];
...
...
@@ -1427,7 +1425,6 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
rnti_t
rnti
;
UE_list_t
*
UE_list
;
slice_info_t
*
sli
=
&
RC
.
mac
[
module_idP
]
->
slice_info
;
UE_sched_ctrl
*
ue_sched_ctl
;
uint8_t
*
vrb_map
;
COMMON_channels_t
*
cc
;
...
...
@@ -1455,7 +1452,7 @@ dlsch_scheduler_pre_processor_reset(module_id_t module_idP,
if
(
UE_list
->
active
[
UE_id
]
!=
TRUE
)
continue
;
if
(
!
ue_
slice_membership
(
UE_id
,
slice_id
,
sli
->
n_dl
))
if
(
!
ue_
dl_slice_membership
(
module_idP
,
UE_id
,
slice_id
))
continue
;
vrb_map
=
RC
.
mac
[
module_idP
]
->
common_channels
[
CC_id
].
vrb_map
;
...
...
@@ -1727,7 +1724,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
// This is the actual CC_id in the list
CC_id
=
UE_list
->
ordered_ULCCids
[
n
][
i
];
UE_template
=
&
UE_list
->
UE_template
[
CC_id
][
i
];
if
(
!
ue_
slice_membership
(
i
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
i
,
slice_id
))
continue
;
if
(
UE_template
->
pre_allocated_nb_rb_ul
[
slice_id
]
>
0
)
{
total_ue_count
[
CC_id
]
+=
1
;
...
...
@@ -1748,7 +1745,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
if
(
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_
slice_membership
(
UE_id
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
UE_id
,
slice_id
))
continue
;
LOG_D
(
MAC
,
"In ulsch_preprocessor: handling UE %d/%x
\n
"
,
UE_id
,
...
...
@@ -1805,7 +1802,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_
slice_membership
(
i
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
i
,
slice_id
))
continue
;
...
...
@@ -1846,7 +1843,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_
slice_membership
(
i
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
i
,
slice_id
))
continue
;
UE_id
=
i
;
...
...
@@ -1924,7 +1921,7 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
i
].
ul_out_of_sync
==
1
)
continue
;
if
(
!
ue_
slice_membership
(
i
,
slice_id
,
sli
->
n_ul
))
if
(
!
ue_
ul_slice_membership
(
module_idP
,
i
,
slice_id
))
continue
;
if
(
UE_list
->
UE_sched_ctrl
[
i
].
phr_received
==
1
)
{
...
...
openair2/LAYER2/MAC/proto.h
View file @
3aedea26
...
...
@@ -1200,7 +1200,8 @@ int l2_init_ue(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
/*Slice related functions */
uint16_t
nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
int
ue_slice_membership
(
int
UE_id
,
int
slice_id
,
int
n_active_slices
);
int
ue_dl_slice_membership
(
module_id_t
mod_id
,
int
UE_id
,
slice_id_t
slice_id
);
int
ue_ul_slice_membership
(
module_id_t
mod_id
,
int
UE_id
,
slice_id_t
slice_id
);
#endif
/** @}*/
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