Deactivate scheduler is now possible

This commit is contained in:
Quentin 2019-09-19 10:08:32 +02:00
parent 634edf04b5
commit cb9b9f7bc6

View file

@ -27,7 +27,10 @@ uint64_t compute_delta(struct timespec* prev_time, uint64_t max, uint8_t update)
}
int is_blacklisted(struct thunder_ctx* thunderc, int link_id) {
return thunderc->blacklisted[link_id] >= thunderc->received_pkts_on_link[link_id];
if (thunderc->scheduler_activated)
return thunderc->blacklisted[link_id] >= thunderc->received_pkts_on_link[link_id];
return 0;
}
void prepare(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buffer_packet* bp) {
@ -475,7 +478,7 @@ void algo_thunder_init(struct evt_core_ctx* ctx, struct algo_ctx* app_ctx, struc
if (ap->algo_specific_params != NULL) {
char *parse_ptr, *token, *params;
for (params = ap->algo_specific_params ; ; params = NULL) {
for (params = ap->algo_specific_params; ; params = NULL) {
token = strtok_r(params, ",", &parse_ptr);
if (token == NULL) break;
sscanf(token, "jitter=%ld", &thunderc->allowed_jitter_ms);