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
620e1219
Commit
620e1219
authored
Mar 06, 2018
by
Niccolò Iardella
Committed by
Robert Schmidt
Apr 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix: value of available RBs per slice could be negative
parent
949a2221
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
239 additions
and
262 deletions
+239
-262
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
+19
-19
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
+21
-21
openair2/LAYER2/MAC/pre_processor.c
openair2/LAYER2/MAC/pre_processor.c
+199
-222
No files found.
openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
View file @
620e1219
...
...
@@ -417,8 +417,8 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
int
i
=
0
;
total_slice_percentage
=
0
;
avg_slice_percentage
=
1
.
0
/
n_active_slices
;
slice_percentage_total
=
0
;
slice_percentage_avg
=
1
.
0
/
n_active_slices
;
// reset the slice percentage for inactive slices
for
(
i
=
n_active_slices
;
i
<
MAX_NUM_SLICES
;
i
++
)
{
...
...
@@ -430,7 +430,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
module_idP
,
frameP
,
subframeP
,
i
,
slice_percentage
[
i
]);
slice_percentage
[
i
]
=
0
;
}
total_slice_percentage
+=
slice_percentage
[
i
];
slice_percentage_total
+=
slice_percentage
[
i
];
}
for
(
i
=
0
;
i
<
n_active_slices
;
i
++
)
{
...
...
@@ -443,7 +443,7 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
LOG_N
(
MAC
,
"update dl scheduler slice %d
\n
"
,
i
);
}
if
(
total_slice_percentage
<=
1
.
0
){
// the new total RB share is within the range
if
(
slice_percentage_total
<=
1
.
0
){
// the new total RB share is within the range
// check if the number of slices has changed, and log
if
(
n_active_slices_current
!=
n_active_slices
){
...
...
@@ -462,9 +462,9 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
if
(
slice_percentage_current
[
i
]
!=
slice_percentage
[
i
])
{
// new slice percentage
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: total percentage %f-->%f, slice RB percentage has changed: %f-->%f
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
total_slice_percentage_current
,
total_slice_percentage
,
module_idP
,
i
,
frameP
,
subframeP
,
slice_percentage_total_current
,
slice_percentage_total
,
slice_percentage_current
[
i
],
slice_percentage
[
i
]);
total_slice_percentage_current
=
total_slice_percentage
;
slice_percentage_total_current
=
slice_percentage_total
;
slice_percentage_current
[
i
]
=
slice_percentage
[
i
];
}
...
...
@@ -493,14 +493,14 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
if
(
n_active_slices
==
n_active_slices_current
){
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), reduce proportionally the RB share by 0.1
\n
"
,
module_idP
,
i
,
total_slice_percentage_current
,
total_slice_percentage
);
if
(
slice_percentage
[
i
]
>=
avg_slice_percentage
){
module_idP
,
i
,
slice_percentage_total_current
,
slice_percentage_total
);
if
(
slice_percentage
[
i
]
>=
slice_percentage_avg
){
slice_percentage
[
i
]
-=
0
.
1
;
total_slice_percentage
-=
0
.
1
;
slice_percentage_total
-=
0
.
1
;
}
}
else
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] invalid total RB share (%f->%f), revert the number of slice to its previous value (%d->%d)
\n
"
,
module_idP
,
i
,
total_slice_percentage_current
,
total_slice_percentage
,
module_idP
,
i
,
slice_percentage_total_current
,
slice_percentage_total
,
n_active_slices
,
n_active_slices_current
);
n_active_slices
=
n_active_slices_current
;
slice_percentage
[
i
]
=
slice_percentage_current
[
i
];
...
...
@@ -531,22 +531,22 @@ schedule_dlsch(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, in
}
// Check for new sorting policy
if
(
s
orting_policy_current
[
i
]
!=
sorting_policy
[
i
])
{
if
(
s
lice_sorting_policy_current
[
i
]
!=
slice_
sorting_policy
[
i
])
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
s
orting_policy_current
[
i
],
sorting_policy
[
i
]);
s
orting_policy_current
[
i
]
=
sorting_policy
[
i
];
module_idP
,
i
,
frameP
,
subframeP
,
s
lice_sorting_policy_current
[
i
],
slice_
sorting_policy
[
i
]);
s
lice_sorting_policy_current
[
i
]
=
slice_
sorting_policy
[
i
];
}
// Check for new accounting policy
if
(
accounting_policy_current
[
i
]
!=
accounting_policy
[
i
])
{
if
(
accounting_policy
[
i
]
>
1
||
accounting_policy
[
i
]
<
0
)
{
if
(
slice_accounting_policy_current
[
i
]
!=
slice_
accounting_policy
[
i
])
{
if
(
slice_accounting_policy
[
i
]
>
1
||
slice_
accounting_policy
[
i
]
<
0
)
{
LOG_W
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: invalid accounting policy (%d), revert to its previous value (%d)
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
accounting_policy
[
i
],
accounting_policy_current
[
i
]);
accounting_policy
[
i
]
=
accounting_policy_current
[
i
];
module_idP
,
i
,
frameP
,
subframeP
,
slice_accounting_policy
[
i
],
slice_
accounting_policy_current
[
i
]);
slice_accounting_policy
[
i
]
=
slice_
accounting_policy_current
[
i
];
}
else
{
LOG_N
(
MAC
,
"[eNB %d][SLICE %d][DL] frame %d subframe %d: UE sorting policy has changed (%x-->%x)
\n
"
,
module_idP
,
i
,
frameP
,
subframeP
,
accounting_policy_current
[
i
],
accounting_policy
[
i
]);
accounting_policy_current
[
i
]
=
accounting_policy
[
i
];
module_idP
,
i
,
frameP
,
subframeP
,
slice_accounting_policy_current
[
i
],
slice_
accounting_policy
[
i
]);
slice_accounting_policy_current
[
i
]
=
slice_
accounting_policy
[
i
];
}
}
...
...
openair2/LAYER2/MAC/eNB_scheduler_dlsch.h
View file @
620e1219
...
...
@@ -38,26 +38,34 @@
#define __LAYER2_MAC_ENB_SCHEDULER_DLSCH_H__
// number of active slices for past and current time
int
n_active_slices
=
1
;
int
n_active_slices_current
=
1
;
int
n_active_slices
=
1
;
int
n_active_slices_current
=
1
;
// RB share for each slice for past and current time
float
avg_slice_percentage
=
0
.
25
;
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
}
;
float
total_slice_percentage
=
0
;
float
total_slice_percentage_current
=
0
;
float
slice_percentage
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
}
;
float
slice_percentage_current
[
MAX_NUM_SLICES
]
=
{
1
.
0
,
0
.
0
,
0
.
0
,
0
.
0
};
float
slice_percentage_total
=
0
;
float
slice_percentage_total_current
=
0
;
float
slice_percentage_avg
=
0
.
25
;
// Frequency ranges for slice positioning
int
slice_position
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
int
slice_position_current
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
int
slice_position
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
int
slice_position_current
[
MAX_NUM_SLICES
*
2
]
=
{
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
,
0
,
N_RBG_MAX
};
// MAX MCS for each slice for past and current time
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
slice_maxmcs_current
[
MAX_NUM_SLICES
]
=
{
28
,
28
,
28
,
28
};
int
update_dl_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_dl_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
// The lists of criteria that enforce the sorting policies of the slices
uint32_t
slice_sorting_policy
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
uint32_t
slice_sorting_policy_current
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
// Accounting policy (just greedy(1) or fair(0) setting for now)
int
slice_accounting_policy
[
MAX_NUM_SLICES
]
=
{
0
,
0
,
0
,
0
};
int
slice_accounting_policy_current
[
MAX_NUM_SLICES
]
=
{
0
,
0
,
0
,
0
};
int
update_dl_scheduler
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
int
update_dl_scheduler_current
[
MAX_NUM_SLICES
]
=
{
1
,
1
,
1
,
1
};
// name of available scheduler
char
*
dl_scheduler_type
[
MAX_NUM_SLICES
]
=
...
...
@@ -67,14 +75,6 @@ char *dl_scheduler_type[MAX_NUM_SLICES] =
"schedule_ue_spec"
};
// The lists of criteria that enforce the sorting policies of the slices
uint32_t
sorting_policy
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
uint32_t
sorting_policy_current
[
MAX_NUM_SLICES
]
=
{
0x01234
,
0x01234
,
0x01234
,
0x01234
};
// Accounting policy (just greedy(1) or fair(0) setting for now)
int
accounting_policy
[
MAX_NUM_SLICES
]
=
{
0
,
0
,
0
,
0
};
int
accounting_policy_current
[
MAX_NUM_SLICES
]
=
{
0
,
0
,
0
,
0
};
// pointer to the slice specific scheduler
slice_scheduler_dl
slice_sched_dl
[
MAX_NUM_SLICES
]
=
{
0
};
...
...
openair2/LAYER2/MAC/pre_processor.c
View file @
620e1219
This diff is collapsed.
Click to expand it.
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