Commit 44481a56 authored by Robert Schmidt's avatar Robert Schmidt

FlexRAN: improve info messages

parent 472ebf56
...@@ -1042,52 +1042,52 @@ int check_ul_sorting_update(Protocol__FlexUlSlice *old, Protocol__FlexUlSlice *n ...@@ -1042,52 +1042,52 @@ int check_ul_sorting_update(Protocol__FlexUlSlice *old, Protocol__FlexUlSlice *n
return sorting_update; return sorting_update;
} }
void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update) void overwrite_slice_config_dl(mid_t mod_id, Protocol__FlexDlSlice *exist, Protocol__FlexDlSlice *update)
{ {
if (update->label != exist->label) { if (update->label != exist->label) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update label: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update label: %d -> %d\n",
update->id, exist->label, update->label); mod_id, update->id, exist->label, update->label);
exist->label = update->label; exist->label = update->label;
exist->has_label = 1; exist->has_label = 1;
} }
if (update->percentage != exist->percentage) { if (update->percentage != exist->percentage) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update percentage: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update percentage: %d -> %d\n",
update->id, exist->percentage, update->percentage); mod_id, update->id, exist->percentage, update->percentage);
exist->percentage = update->percentage; exist->percentage = update->percentage;
exist->has_percentage = 1; exist->has_percentage = 1;
} }
if (update->isolation != exist->isolation) { if (update->isolation != exist->isolation) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update isolation: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update isolation: %d -> %d\n",
update->id, exist->isolation, update->isolation); mod_id, update->id, exist->isolation, update->isolation);
exist->isolation = update->isolation; exist->isolation = update->isolation;
exist->has_isolation = 1; exist->has_isolation = 1;
} }
if (update->priority != exist->priority) { if (update->priority != exist->priority) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update priority: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update priority: %d -> %d\n",
update->id, exist->priority, update->priority); mod_id, update->id, exist->priority, update->priority);
exist->priority = update->priority; exist->priority = update->priority;
exist->has_priority = 1; exist->has_priority = 1;
} }
if (update->position_low != exist->position_low) { if (update->position_low != exist->position_low) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_low: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update position_low: %d -> %d\n",
update->id, exist->position_low, update->position_low); mod_id, update->id, exist->position_low, update->position_low);
exist->position_low = update->position_low; exist->position_low = update->position_low;
exist->has_position_low = 1; exist->has_position_low = 1;
} }
if (update->position_high != exist->position_high) { if (update->position_high != exist->position_high) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update position_high: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update position_high: %d -> %d\n",
update->id, exist->position_high, update->position_high); mod_id, update->id, exist->position_high, update->position_high);
exist->position_high = update->position_high; exist->position_high = update->position_high;
exist->has_position_high = 1; exist->has_position_high = 1;
} }
if (update->maxmcs != exist->maxmcs) { if (update->maxmcs != exist->maxmcs) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update maxmcs: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update maxmcs: %d -> %d\n",
update->id, exist->maxmcs, update->maxmcs); mod_id, update->id, exist->maxmcs, update->maxmcs);
exist->maxmcs = update->maxmcs; exist->maxmcs = update->maxmcs;
exist->has_maxmcs = 1; exist->has_maxmcs = 1;
} }
if (check_dl_sorting_update(exist, update)) { if (check_dl_sorting_update(exist, update)) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update sorting array\n", update->id); LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update sorting array\n", mod_id, update->id);
if (exist->n_sorting != update->n_sorting) { if (exist->n_sorting != update->n_sorting) {
exist->n_sorting = update->n_sorting; exist->n_sorting = update->n_sorting;
exist->sorting = realloc(exist->sorting, exist->n_sorting * sizeof(Protocol__FlexDlSorting)); exist->sorting = realloc(exist->sorting, exist->n_sorting * sizeof(Protocol__FlexDlSorting));
...@@ -1097,60 +1097,60 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli ...@@ -1097,60 +1097,60 @@ void overwrite_slice_config_dl(Protocol__FlexDlSlice *exist, Protocol__FlexDlSli
exist->sorting[i] = update->sorting[i]; exist->sorting[i] = update->sorting[i];
} }
if (update->accounting != exist->accounting) { if (update->accounting != exist->accounting) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update accounting: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update accounting: %d -> %d\n",
update->id, exist->accounting, update->accounting); mod_id, update->id, exist->accounting, update->accounting);
exist->accounting = update->accounting; exist->accounting = update->accounting;
exist->has_accounting = 1; exist->has_accounting = 1;
} }
if (!exist->scheduler_name if (!exist->scheduler_name
|| strcmp(update->scheduler_name, exist->scheduler_name) != 0) { || strcmp(update->scheduler_name, exist->scheduler_name) != 0) {
LOG_I(FLEXRAN_AGENT, "[DL slice %d] update scheduler: %s -> %s\n", LOG_I(FLEXRAN_AGENT, "[%d][DL slice %d] update scheduler: %s -> %s\n",
update->id, exist->scheduler_name, update->scheduler_name); mod_id, update->id, exist->scheduler_name, update->scheduler_name);
if (exist->scheduler_name) free(exist->scheduler_name); if (exist->scheduler_name) free(exist->scheduler_name);
exist->scheduler_name = strdup(update->scheduler_name); exist->scheduler_name = strdup(update->scheduler_name);
} }
} }
void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update) void overwrite_slice_config_ul(mid_t mod_id, Protocol__FlexUlSlice *exist, Protocol__FlexUlSlice *update)
{ {
if (update->label != exist->label) { if (update->label != exist->label) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update label: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update label: %d -> %d\n",
update->id, exist->label, update->label); mod_id, update->id, exist->label, update->label);
exist->label = update->label; exist->label = update->label;
exist->has_label = 1; exist->has_label = 1;
} }
if (update->percentage != exist->percentage) { if (update->percentage != exist->percentage) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update percentage: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update percentage: %d -> %d\n",
update->id, exist->percentage, update->percentage); mod_id, update->id, exist->percentage, update->percentage);
exist->percentage = update->percentage; exist->percentage = update->percentage;
exist->has_percentage = 1; exist->has_percentage = 1;
} }
if (update->isolation != exist->isolation) { if (update->isolation != exist->isolation) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update isolation: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update isolation: %d -> %d\n",
update->id, exist->isolation, update->isolation); mod_id, update->id, exist->isolation, update->isolation);
exist->isolation = update->isolation; exist->isolation = update->isolation;
exist->has_isolation = 1; exist->has_isolation = 1;
} }
if (update->priority != exist->priority) { if (update->priority != exist->priority) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update priority: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update priority: %d -> %d\n",
update->id, exist->priority, update->priority); mod_id, update->id, exist->priority, update->priority);
exist->priority = update->priority; exist->priority = update->priority;
exist->has_priority = 1; exist->has_priority = 1;
} }
if (update->first_rb != exist->first_rb) { if (update->first_rb != exist->first_rb) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update first_rb: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update first_rb: %d -> %d\n",
update->id, exist->first_rb, update->first_rb); mod_id, update->id, exist->first_rb, update->first_rb);
exist->first_rb = update ->first_rb; exist->first_rb = update ->first_rb;
exist->has_first_rb = 1; exist->has_first_rb = 1;
} }
/*if (update->lenght_rb != exist->lenght_rb) { /*if (update->lenght_rb != exist->lenght_rb) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update lenght_rb: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update lenght_rb: %d -> %d\n",
update->id, exist->lenght_rb, update->lenght_rb); mod_id, update->id, exist->lenght_rb, update->lenght_rb);
exist->lenght_rb = update->lenght_rb; exist->lenght_rb = update->lenght_rb;
}*/ }*/
if (update->maxmcs != exist->maxmcs) { if (update->maxmcs != exist->maxmcs) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update maxmcs: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update maxmcs: %d -> %d\n",
update->id, exist->maxmcs, update->maxmcs); mod_id, update->id, exist->maxmcs, update->maxmcs);
exist->maxmcs = update->maxmcs; exist->maxmcs = update->maxmcs;
exist->has_maxmcs = 1; exist->has_maxmcs = 1;
} }
...@@ -1163,24 +1163,24 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli ...@@ -1163,24 +1163,24 @@ void overwrite_slice_config_ul(Protocol__FlexUlSlice *exist, Protocol__FlexUlSli
i++; i++;
} }
if (sorting_update) { if (sorting_update) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update sorting array\n", update->id); LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update sorting array\n", update->id, mod_id);
if (exist->n_sorting != update->n_sorting) if (exist->n_sorting != update->n_sorting)
LOG_W(FLEXRAN_AGENT, "[UL slice %d] only writing %d elements\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] only writing %d elements\n",
update->id, n); mod_id, update->id, n);
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
exist->sorting[i] = update->sorting[i]; exist->sorting[i] = update->sorting[i];
} }
*/ */
if (update->accounting != exist->accounting) { if (update->accounting != exist->accounting) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update accounting: %d -> %d\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update accounting: %d -> %d\n",
update->id, exist->accounting, update->accounting); mod_id, update->id, exist->accounting, update->accounting);
exist->accounting = update->accounting; exist->accounting = update->accounting;
exist->has_accounting = 1; exist->has_accounting = 1;
} }
if (!exist->scheduler_name if (!exist->scheduler_name
|| strcmp(update->scheduler_name, exist->scheduler_name) != 0) { || strcmp(update->scheduler_name, exist->scheduler_name) != 0) {
LOG_I(FLEXRAN_AGENT, "[UL slice %d] update scheduler: %s -> %s\n", LOG_I(FLEXRAN_AGENT, "[%d][UL slice %d] update scheduler: %s -> %s\n",
update->id, exist->scheduler_name, update->scheduler_name); mod_id, update->id, exist->scheduler_name, update->scheduler_name);
if (exist->scheduler_name) free(exist->scheduler_name); if (exist->scheduler_name) free(exist->scheduler_name);
exist->scheduler_name = strdup(update->scheduler_name); exist->scheduler_name = strdup(update->scheduler_name);
} }
...@@ -1361,7 +1361,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) ...@@ -1361,7 +1361,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup)
* create new one and overwrite with the update */ * create new one and overwrite with the update */
Protocol__FlexDlSlice *dls = get_existing_dl_slice(mod_id, sup->dl[i]->id); Protocol__FlexDlSlice *dls = get_existing_dl_slice(mod_id, sup->dl[i]->id);
if (!dls) dls = create_new_dl_slice(mod_id, sup->dl[i]->id); if (!dls) dls = create_new_dl_slice(mod_id, sup->dl[i]->id);
overwrite_slice_config_dl(dls, sup->dl[i]); overwrite_slice_config_dl(mod_id, dls, sup->dl[i]);
} }
} else { } else {
LOG_E(FLEXRAN_AGENT, "[%d] DL slice verification failed, refusing application\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d] DL slice verification failed, refusing application\n", mod_id);
...@@ -1397,7 +1397,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup) ...@@ -1397,7 +1397,7 @@ void prepare_update_slice_config(mid_t mod_id, Protocol__FlexSliceConfig *sup)
* create new one and overwrite with the update */ * create new one and overwrite with the update */
Protocol__FlexUlSlice *uls = get_existing_ul_slice(mod_id, sup->ul[i]->id); Protocol__FlexUlSlice *uls = get_existing_ul_slice(mod_id, sup->ul[i]->id);
if (!uls) uls = create_new_ul_slice(mod_id, sup->ul[i]->id); if (!uls) uls = create_new_ul_slice(mod_id, sup->ul[i]->id);
overwrite_slice_config_ul(uls, sup->ul[i]); overwrite_slice_config_ul(mod_id, uls, sup->ul[i]);
} }
} else { } else {
LOG_E(FLEXRAN_AGENT, "[%d] UL slice verification failed, refusing application\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d] UL slice verification failed, refusing application\n", mod_id);
...@@ -1416,7 +1416,7 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco ...@@ -1416,7 +1416,7 @@ int apply_new_slice_dl_config(mid_t mod_id, Protocol__FlexDlSlice *oldc, Protoco
int changes = 0; int changes = 0;
int slice_idx = flexran_find_dl_slice(mod_id, newc->id); int slice_idx = flexran_find_dl_slice(mod_id, newc->id);
if (slice_idx < 0) { if (slice_idx < 0) {
LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); LOG_W(FLEXRAN_AGENT, "[%d] cannot find index for slice ID %d\n", mod_id, newc->id);
return 0; return 0;
} }
if (oldc->percentage != newc->percentage) { if (oldc->percentage != newc->percentage) {
...@@ -1469,7 +1469,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco ...@@ -1469,7 +1469,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
int changes = 0; int changes = 0;
int slice_idx = flexran_find_ul_slice(mod_id, newc->id); int slice_idx = flexran_find_ul_slice(mod_id, newc->id);
if (slice_idx < 0) { if (slice_idx < 0) {
LOG_W(FLEXRAN_AGENT, "cannot find index for slice ID %d\n", newc->id); LOG_W(FLEXRAN_AGENT, "[%d] cannot find index for slice ID %d\n", mod_id, newc->id);
return 0; return 0;
} }
if (oldc->percentage != newc->percentage) { if (oldc->percentage != newc->percentage) {
...@@ -1480,13 +1480,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco ...@@ -1480,13 +1480,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
/*flexran_set_ul_slice_isolation(mod_id, slice_idx, newc->isolation); /*flexran_set_ul_slice_isolation(mod_id, slice_idx, newc->isolation);
*changes++;*/ *changes++;*/
LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting isolation is not supported\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting isolation is not supported\n",
mod_id, slice_idx); mod_id, newc->id);
} }
if (oldc->priority != newc->priority) { if (oldc->priority != newc->priority) {
/*flexran_set_ul_slice_priority(mod_id, slice_idx, newc->priority); /*flexran_set_ul_slice_priority(mod_id, slice_idx, newc->priority);
*changes++;*/ *changes++;*/
LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the priority is not supported\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the priority is not supported\n",
mod_id, slice_idx); mod_id, newc->id);
} }
if (oldc->first_rb != newc->first_rb) { if (oldc->first_rb != newc->first_rb) {
flexran_set_ul_slice_first_rb(mod_id, slice_idx, newc->first_rb); flexran_set_ul_slice_first_rb(mod_id, slice_idx, newc->first_rb);
...@@ -1496,7 +1496,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco ...@@ -1496,7 +1496,7 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
flexran_set_ul_slice_length_rb(mod_id, slice_idx, newc->length_rb); flexran_set_ul_slice_length_rb(mod_id, slice_idx, newc->length_rb);
changes++; changes++;
LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting length_rb is not supported\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting length_rb is not supported\n",
mod_id, slice_idx); mod_id, newc->id);
}*/ }*/
if (oldc->maxmcs != newc->maxmcs) { if (oldc->maxmcs != newc->maxmcs) {
flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs); flexran_set_ul_slice_maxmcs(mod_id, slice_idx, newc->maxmcs);
...@@ -1506,13 +1506,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco ...@@ -1506,13 +1506,13 @@ int apply_new_slice_ul_config(mid_t mod_id, Protocol__FlexUlSlice *oldc, Protoco
/*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n); /*flexran_set_ul_slice_sorting(mod_id, slice_idx, newc->sorting, n);
changes++;*/ changes++;*/
LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the sorting is not supported\n",
mod_id, slice_idx); mod_id, newc->id);
} }
if (oldc->accounting != newc->accounting) { if (oldc->accounting != newc->accounting) {
/*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting); /*flexran_set_ul_slice_accounting_policy(mod_id, slice_idx, newc->accounting);
*changes++;*/ *changes++;*/
LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n", LOG_W(FLEXRAN_AGENT, "[%d][UL slice %d] setting the accounting is not supported\n",
mod_id, slice_idx); mod_id, newc->id);
} }
if (!oldc->scheduler_name if (!oldc->scheduler_name
|| strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) { || strcmp(oldc->scheduler_name, newc->scheduler_name) != 0) {
......
...@@ -57,40 +57,48 @@ int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls) ...@@ -57,40 +57,48 @@ int flexran_verify_dl_slice(mid_t mod_id, Protocol__FlexDlSlice *dls)
/* verify parameters individualy */ /* verify parameters individualy */
/* label is enum */ /* label is enum */
if (!flexran_dl_slice_verify_pct(dls->percentage)) { if (!flexran_dl_slice_verify_pct(dls->percentage)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice percentage (%d)\n", mod_id, dls->percentage); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice percentage (%d)\n",
mod_id, dls->id, dls->percentage);
return 0; return 0;
} }
/* isolation is a protobuf bool */ /* isolation is a protobuf bool */
if (!flexran_dl_slice_verify_priority(dls->priority)) { if (!flexran_dl_slice_verify_priority(dls->priority)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice priority (%d)\n", mod_id, dls->priority); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice priority (%d)\n",
mod_id, dls->id, dls->priority);
return 0; return 0;
} }
if (!flexran_dl_slice_verify_position(dls->position_low, dls->position_high)) { if (!flexran_dl_slice_verify_position(dls->position_low, dls->position_high)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice position low (%d) and/or high (%d)\n", LOG_E(FLEXRAN_AGENT,
mod_id, dls->position_low, dls->position_high); "[%d][DL slice %d] illegal DL slice position low (%d) and/or high (%d)\n",
mod_id, dls->id, dls->position_low, dls->position_high);
return 0; return 0;
} }
if (!flexran_dl_slice_verify_maxmcs(dls->maxmcs)) { if (!flexran_dl_slice_verify_maxmcs(dls->maxmcs)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal DL slice max mcs %d\n", mod_id, dls->maxmcs); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] illegal DL slice max mcs %d\n",
mod_id, dls->id, dls->maxmcs);
return 0; return 0;
} }
if (dls->n_sorting == 0) { if (dls->n_sorting == 0) {
LOG_E(FLEXRAN_AGENT, "[%d] no sorting in DL slice", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no sorting in DL slice\n",
mod_id, dls->id);
return 0; return 0;
} }
if (!dls->sorting) { if (!dls->sorting) {
LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in DL slice\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no sorting found in DL slice\n",
mod_id, dls->id);
return 0; return 0;
} }
/* sorting is an enum */ /* sorting is an enum */
/* accounting is an enum */ /* accounting is an enum */
if (!dls->scheduler_name) { if (!dls->scheduler_name) {
LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] no scheduler name found\n",
mod_id, dls->id);
return 0; return 0;
} }
if (strcmp(dls->scheduler_name, "schedule_ue_spec") != 0) { if (strcmp(dls->scheduler_name, "schedule_ue_spec") != 0) {
LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " LOG_E(FLEXRAN_AGENT, "[%d][DL slice %d] setting the scheduler to something "
"than schedule_ue_spec is currently not allowed\n", mod_id); "different than schedule_ue_spec is currently not allowed\n",
mod_id, dls->id);
return 0; return 0;
} }
...@@ -125,7 +133,8 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin ...@@ -125,7 +133,8 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin
} }
if (n < 1 || n > MAX_NUM_SLICES) { if (n < 1 || n > MAX_NUM_SLICES) {
LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting DL slices (%d -> %d)\n",
mod_id, n_ex, n);
return 0; return 0;
} }
...@@ -144,7 +153,9 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin ...@@ -144,7 +153,9 @@ int flexran_verify_group_dl_slices(mid_t mod_id, Protocol__FlexDlSlice **existin
pct += update[i]->percentage; pct += update[i]->percentage;
} }
if (pct < 1 || pct > 100) { if (pct < 1 || pct > 100) {
LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); LOG_E(FLEXRAN_AGENT,
"[%d] invalid total RB share for DL slices (%d%% -> %d%%)\n",
mod_id, pct_orig, pct);
return 0; return 0;
} }
...@@ -162,41 +173,49 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls) ...@@ -162,41 +173,49 @@ int flexran_verify_ul_slice(mid_t mod_id, Protocol__FlexUlSlice *uls)
/* verify parameters individually */ /* verify parameters individually */
/* label is enum */ /* label is enum */
if (!flexran_ul_slice_verify_pct(uls->percentage)) { if (!flexran_ul_slice_verify_pct(uls->percentage)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->percentage); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice percentage (%d)\n",
mod_id, uls->id, uls->percentage);
return 0; return 0;
} }
/* isolation is a protobuf bool */ /* isolation is a protobuf bool */
if (!flexran_ul_slice_verify_priority(uls->priority)) { if (!flexran_ul_slice_verify_priority(uls->priority)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice percentage (%d)\n", mod_id, uls->priority); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice percentage (%d)\n",
mod_id, uls->id, uls->priority);
return 0; return 0;
} }
if (!flexran_ul_slice_verify_first_rb(uls->first_rb)) { if (!flexran_ul_slice_verify_first_rb(uls->first_rb)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice first RB (%d)\n", mod_id, uls->first_rb); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice first RB (%d)\n",
mod_id, uls->id, uls->first_rb);
return 0; return 0;
} }
if (!flexran_ul_slice_verify_maxmcs(uls->maxmcs)) { if (!flexran_ul_slice_verify_maxmcs(uls->maxmcs)) {
LOG_E(FLEXRAN_AGENT, "[%d] illegal UL slice max mcs (%d)\n", mod_id, uls->maxmcs); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] illegal UL slice max mcs (%d)\n",
mod_id, uls->id, uls->maxmcs);
return 0; return 0;
} }
/* TODO /* TODO
if (uls->n_sorting == 0) { if (uls->n_sorting == 0) {
LOG_E(FLEXRAN_AGENT, "[%d] no sorting in UL slice\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no sorting in UL slice\n",
mod_id, uls->id);
return 0; return 0;
} }
if (!uls->sorting) { if (!uls->sorting) {
LOG_E(FLEXRAN_AGENT, "[%d] no sorting found in UL slice\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no sorting found in UL slice\n",
mod_id, uls->id);
return 0; return 0;
} }
*/ */
/* sorting is an enum */ /* sorting is an enum */
/* accounting is an enum */ /* accounting is an enum */
if (!uls->scheduler_name) { if (!uls->scheduler_name) {
LOG_E(FLEXRAN_AGENT, "[%d] no scheduler name found\n", mod_id); LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] no scheduler name found\n",
mod_id, uls->id);
return 0; return 0;
} }
if (strcmp(uls->scheduler_name, "schedule_ulsch_rnti") != 0) { if (strcmp(uls->scheduler_name, "schedule_ulsch_rnti") != 0) {
LOG_E(FLEXRAN_AGENT, "[%d] setting the scheduler to something different " LOG_E(FLEXRAN_AGENT, "[%d][UL slice %d] setting the scheduler to something "
"than schedule_ulsch_rnti is currently not allowed\n", mod_id); "different than schedule_ulsch_rnti is currently not allowed\n",
mod_id, uls->id);
return 0; return 0;
} }
...@@ -235,7 +254,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin ...@@ -235,7 +254,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin
} }
if (n < 1 || n > MAX_NUM_SLICES) { if (n < 1 || n > MAX_NUM_SLICES) {
LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting slices (%d -> %d)\n", mod_id, n_ex, n); LOG_E(FLEXRAN_AGENT, "[%d] Illegal number of resulting UL slices (%d -> %d)\n",
mod_id, n_ex, n);
return 0; return 0;
} }
...@@ -254,7 +274,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin ...@@ -254,7 +274,8 @@ int flexran_verify_group_ul_slices(mid_t mod_id, Protocol__FlexUlSlice **existin
pct += update[i]->percentage; pct += update[i]->percentage;
} }
if (pct < 1 || pct > 100) { if (pct < 1 || pct > 100) {
LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n", mod_id, pct_orig, pct); LOG_E(FLEXRAN_AGENT, "[%d] invalid total RB share (%d%% -> %d%%)\n",
mod_id, pct_orig, pct);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment