Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2018 18:48:24 +0530
From:      Archit Pandey <architpandeynitk@gmail.com>
To:        freebsd-net@freebsd.org, anandtarun2@gmail.com
Subject:   Help adding Adaptive RED to Existing RED Code
Message-ID:  <b575f093-775e-3c31-a2b5-f78054c8460d@gmail.com>

next in thread | raw e-mail | index | archive | help
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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?b575f093-775e-3c31-a2b5-f78054c8460d>