Help adding Adaptive RED to Existing RED Code
Archit Pandey
architpandeynitk at gmail.com
Mon Nov 5 13:18:30 UTC 2018
Hello all!
We are working on implementing Adaptive RED over existing RED code that
can be found in /sys/net/altq/altq_red.c and /sys/net/altq/altq.h. We
have added the following fields and functions to the source:
1. In /sys/net/altq/altq_red.h
Added to struct red_t:
struct callout adaptive_callout;
int target_min;
int target_max;
2. In /sys/net/altq/altq_red.c
Functions added:
void red_adaptive_timer(): function that is responsible
for scheduling a callout for red_adaptive_algo() every 500ms
void red_adaptive_algo(): function that adjusts the drop
probability.
The most important part of the algorithm is the fact that it is called
every 500ms. We are unable to make that happen. We found resources
online pointing us to use callout_init(), callout_reset() and
callout_schedule(). However, we couldn't find documentation on how to
use them correctly and in what order.
Would really appreciate it if someone could point us to useful
resources, or could give us an example of using those functions.
Thanks for your time.
Warm regards,
---
Archit Pandey
Junior Year Undergrad
Department of Computer Science and Engineering
National Institute of Technology Karnataka
Surathkal, India
More information about the freebsd-net
mailing list