Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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 UE
Commits
023763a6
Commit
023763a6
authored
May 18, 2017
by
shahab SHARIATBAGHERI
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug header
parent
6c587bad
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
46 deletions
+71
-46
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
+16
-1
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
+6
-6
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
+49
-39
No files found.
openair2/LAYER2/MAC/flexran_agent_mac_proto.h
View file @
023763a6
...
...
@@ -39,13 +39,19 @@
/*
* slice specific scheduler
*/
typedef
void
(
*
slice_scheduler
)(
module_id_t
mod_id
,
typedef
void
(
*
slice_scheduler
_dl
)(
module_id_t
mod_id
,
int
slice_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
typedef
void
(
*
slice_scheduler_ul
)(
module_id_t
mod_id
,
frame_t
frame
,
unsigned
char
cooperation_flag
,
uint32_t
subframe
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
/*
...
...
@@ -109,6 +115,15 @@ flexran_schedule_ue_dl_spec_common(mid_t mod_id,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
);
void
flexran_schedule_ue_ul_spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
cooperation_flag
,
int
subframe
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
);
uint16_t
flexran_nb_rbs_allowed_slice
(
float
rb_percentage
,
int
total_rbs
);
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_dlsch_ue.c
View file @
023763a6
...
...
@@ -88,8 +88,8 @@ typedef enum {
// number of active slices for past and current time
int
n_active_slices
=
1
;
int
n_active_slices_current
=
1
;
static
int
n_active_slices
=
1
;
static
int
n_active_slices_current
=
1
;
// ue to slice mapping
int
slicing_strategy
=
UEID_TO_SLICEID
;
...
...
@@ -115,7 +115,7 @@ char *dl_scheduler_type[MAX_NUM_SLICES] = {"flexran_schedule_ue_spec_embb",
};
// pointer to the slice specific scheduler
slice_scheduler
slice_sched
[
MAX_NUM_SLICES
]
=
{
0
};
slice_scheduler
_dl
slice_sched_dl
[
MAX_NUM_SLICES
]
=
{
0
};
/**
...
...
@@ -729,7 +729,7 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
// Load any updated functions
if
(
update_dl_scheduler
[
i
]
>
0
)
{
slice_sched
[
i
]
=
dlsym
(
NULL
,
dl_scheduler_type
[
i
]);
slice_sched
_dl
[
i
]
=
dlsym
(
NULL
,
dl_scheduler_type
[
i
]);
update_dl_scheduler
[
i
]
=
0
;
update_dl_scheduler_current
[
i
]
=
0
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
...
...
@@ -806,7 +806,7 @@ flexran_schedule_ue_dl_spec_default(mid_t mod_id,
// Run each enabled slice-specific schedulers one by one
//LOG_N(MAC,"[eNB %d]frame %d subframe %d slice %d: calling the scheduler\n", mod_id, frame, subframe,i);
slice_sched
[
i
](
mod_id
,
i
,
frame
,
subframe
,
mbsfn_flag
,
dl_info
);
slice_sched
_dl
[
i
](
mod_id
,
i
,
frame
,
subframe
,
mbsfn_flag
,
dl_info
);
}
...
...
@@ -894,7 +894,7 @@ flexran_schedule_ue_spec_urllc(mid_t mod_id,
Protocol__FlexranMessage
**
dl_info
)
{
flexran_schedule_ue_
spec_dl
_common
(
mod_id
,
flexran_schedule_ue_
dl_spec
_common
(
mod_id
,
slice_id
,
frame
,
subframe
,
...
...
openair2/LAYER2/MAC/flexran_agent_scheduler_ulsch_ue.c
View file @
023763a6
...
...
@@ -35,6 +35,7 @@
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "LAYER2/MAC/flexran_agent_mac_proto.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/extern.h"
...
...
@@ -56,22 +57,30 @@
#include "T.h"
// #define ENABLE_MAC_PAYLOAD_DEBUG
// #define DEBUG_eNB_SCHEDULER 1
/* number of active slices for past and current time*/
static
int
n_active_slices
=
1
;
static
int
n_active_slices_current
=
1
;
// RB share for each slice for past and current time
float
slice_percentage_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
/* RB share for each slice for past and current time*/
float
slice_percentage_uplink
[
MAX_NUM_SLICES
]
=
{
0
.
8
,
0
.
2
,
0
.
0
,
0
.
0
};
float
slice_percentage_current_uplink
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
total_slice_percentage_uplink
=
0
;
uint16_t
nb_rbs_allowed_slice
[
MAX_NUM_CCs
][
MAX_NUM_SLICES
];
/*resource blocks allowed*/
static
uint16_t
nb_rbs_allowed_slice
[
MAX_NUM_CCs
][
MAX_NUM_SLICES
];
/*Slice Update */
int
update_ul_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_ul_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
// name of available scheduler
char
*
ul_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"flexran_schedule_ue_ul_spec_embb"
};
/* Slice Function Pointer */
slice_scheduler_ul
slice_sched_ul
[
MAX_NUM_SLICES
]
=
{
0
};
/* name of available scheduler*/
char
*
ul_scheduler_type
[
MAX_NUM_SLICES
]
=
{
"flexran_schedule_ue_ul_spec_embb"
,
"flexran_schedule_ue_ul_spec_urllc"
,
"flexran_schedule_ue_ul_spec_mmtc"
,
"flexran_schedule_ue_ul_spec_be"
// best effort
};
uint16_t
flexran_nb_rbs_allowed_slice_uplink
(
float
rb_percentage
,
int
total_rbs
){
...
...
@@ -387,25 +396,26 @@ void _ulsch_scheduler_pre_processor(module_id_t module_idP,
void
flexran_schedule_ue_ul_spec_default
(
mid_t
mod_id
,
uint32_t
frame
,
uint32_t
subframe
,
int
*
mbsfn_flag
,
Protocol__FlexranMessage
**
dl_info
)
uint32_t
cooperation_flag
,
int
subframe
,
unsigned
char
sched_subframe
,
Protocol__FlexranMessage
**
ul_info
)
//------------------------------------------------------------------------------
{
int
i
=
0
;
flexran_agent_mac_create_empty_ul_config
(
mod
ule_idP
,
ul_info
);
flexran_agent_mac_create_empty_ul_config
(
mod
_id
,
ul_info
);
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
// Load any updated functions
if
(
update_
d
l_scheduler
[
i
]
>
0
)
{
slice_sched
[
i
]
=
dlsym
(
NULL
,
d
l_scheduler_type
[
i
]);
update_
d
l_scheduler
[
i
]
=
0
;
update_
d
l_scheduler_current
[
i
]
=
0
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
total_slice_percentage
+=
slice_percentage
[
i
];
LOG_N
(
MAC
,
"update
d
l scheduler slice %d
\n
"
,
i
);
if
(
update_
u
l_scheduler
[
i
]
>
0
)
{
slice_sched
_ul
[
i
]
=
dlsym
(
NULL
,
u
l_scheduler_type
[
i
]);
update_
u
l_scheduler
[
i
]
=
0
;
update_
u
l_scheduler_current
[
i
]
=
0
;
slice_percentage_current
_uplink
[
i
]
=
slice_percentage_uplink
[
i
];
total_slice_percentage
_uplink
+=
slice_percentage_uplink
[
i
];
LOG_N
(
MAC
,
"update
u
l scheduler slice %d
\n
"
,
i
);
}
// check if the number of slices has changed, and log
...
...
@@ -423,45 +433,45 @@ flexran_schedule_ue_ul_spec_default(mid_t mod_id,
}
// check if the slice rb share has changed, and log the console
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
]){
if
((
slice_percentage
[
i
]
>=
0
.
0
)
&&
(
slice_percentage
[
i
]
<=
1
.
0
)){
if
((
total_slice_percentage
-
slice_percentage_current
[
i
]
+
slice_percentage
[
i
])
<=
1
.
0
)
{
total_slice_percentage
=
total_slice_percentage
-
slice_percentage_current
[
i
]
+
slice_percentage
[
i
];
if
(
slice_percentage_current
_uplink
[
i
]
!=
slice_percentage_uplink
[
i
]){
if
((
slice_percentage
_uplink
[
i
]
>=
0
.
0
)
&&
(
slice_percentage_uplink
[
i
]
<=
1
.
0
)){
if
((
total_slice_percentage
_uplink
-
slice_percentage_current_uplink
[
i
]
+
slice_percentage_uplink
[
i
])
<=
1
.
0
)
{
total_slice_percentage
_uplink
=
total_slice_percentage_uplink
-
slice_percentage_current_uplink
[
i
]
+
slice_percentage_uplink
[
i
];
LOG_N
(
MAC
,
"[eNB %d][SLICE %d] frame %d subframe %d: total percentage %f, slice RB percentage has changed: %f-->%f
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
total_slice_percentage
,
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
mod_id
,
i
,
frame
,
subframe
,
total_slice_percentage
_uplink
,
slice_percentage_current_uplink
[
i
],
slice_percentage_uplink
[
i
]);
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
slice_percentage_current
_uplink
[
i
]
=
slice_percentage_uplink
[
i
];
}
else
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d] invalid total RB share (%f->%f), revert the previous value (%f->%f)
\n
"
,
mod_id
,
i
,
total_slice_percentage
,
total_slice_percentage
-
slice_percentage_current
[
i
]
+
slice_percentage
[
i
],
slice_percentage
[
i
],
slice_percentage_current
[
i
]);
total_slice_percentage
_uplink
,
total_slice_percentage
_uplink
-
slice_percentage_current_uplink
[
i
]
+
slice_percentage_uplink
[
i
],
slice_percentage
_uplink
[
i
],
slice_percentage_current_uplink
[
i
]);
slice_percentage
[
i
]
=
slice_percentage_current
[
i
];
slice_percentage
_uplink
[
i
]
=
slice_percentage_current_uplink
[
i
];
}
}
else
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d] invalid slice RB share, revert the previous value (%f->%f)
\n
"
,
mod_id
,
i
,
slice_percentage
[
i
],
slice_percentage_current
[
i
]);
LOG_W
(
MAC
,
"[eNB %d][SLICE %d] invalid slice RB share, revert the previous value (%f->%f)
\n
"
,
mod_id
,
i
,
slice_percentage
_uplink
[
i
],
slice_percentage_current_uplink
[
i
]);
slice_percentage
[
i
]
=
slice_percentage_current
[
i
];
slice_percentage
_uplink
[
i
]
=
slice_percentage_current_uplink
[
i
];
}
}
// check if a new scheduler, and log the console
if
(
update_
dl_scheduler_current
[
i
]
!=
update_d
l_scheduler
[
i
]){
if
(
update_
ul_scheduler_current
[
i
]
!=
update_u
l_scheduler
[
i
]){
LOG_N
(
MAC
,
"[eNB %d][SLICE %d] frame %d subframe %d: DL scheduler for this slice is updated: %s
\n
"
,
mod_id
,
i
,
frame
,
subframe
,
d
l_scheduler_type
[
i
]);
mod_id
,
i
,
frame
,
subframe
,
u
l_scheduler_type
[
i
]);
update_
dl_scheduler_current
[
i
]
=
update_d
l_scheduler
[
i
];
update_
ul_scheduler_current
[
i
]
=
update_u
l_scheduler
[
i
];
}
// Run each enabled slice-specific schedulers one by one
//LOG_N(MAC,"[eNB %d]frame %d subframe %d slice %d: calling the scheduler\n", mod_id, frame, subframe,i);
slice_sched
[
i
](
mod_id
,
i
,
frame
,
subframe
,
mbsfn_flag
,
d
l_info
);
slice_sched
_ul
[
i
](
mod_id
,
frame
,
cooperation_flag
,
subframe
,
sched_subframe
,
u
l_info
);
}
...
...
@@ -469,7 +479,7 @@ flexran_schedule_ue_ul_spec_default(mid_t mod_id,
void
flexran_schedule_ue_ul_spec_embb
(
mid_t
mod_id
,
frame_t
frame
P
,
frame_t
frame
,
unsigned
char
cooperation_flag
,
uint32_t
subframe
,
unsigned
char
sched_subframe
,
...
...
@@ -583,7 +593,7 @@ void flexran_agent_schedule_ulsch_rnti(module_id_t module_idP,
// LOG_I(MAC,"entering ulsch preprocesor\n");
/*TODO*/
int
slice_id
=
0
;
...
...
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