Bug 241563

Summary: pf: altq Adaptive RED (Random Early Detection) queuing support
Product: Base System Reporter: Archit Pandey <architpandeynitk>
Component: kernAssignee: freebsd-pf (Nobody) <pf>
Status: Open ---    
Severity: Affects Some People CC: net, pf
Priority: --- Keywords: feature, needs-qa
Version: CURRENTFlags: koobs: mfc-stable12?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
ared.diff none

Description Archit Pandey 2019-10-29 04:56:57 UTC
Created attachment 208668 [details]
ared.diff

FreeBSD's PF firewall allows traffic shaping using Random Early Detection (RED). RED helps keep the average size of the queues low and allow occasional bursts of packets through the queue.

Adaptive RED (ARED) was proposed by Floyd et. al. [1] as an enhancement over RED. ARED solves most of the issues faced by RED with minimal changes and leaves its basic idea intact. The ARED algorithm regularly adapts the value of the maximum dropping probability and ensures that the queue length stays within the targeted range.

This patch implements ARED in PF ALTQ. It can be enabled by compiling the kernel with option ALTQ_ADAPTIVE_RED. The patch has been tested on FreeBSD-12.0-RELEASE. The results obtained from applying the patch have been included in our paper "Adaptive RED for FreeBSD: Design, Implementation and Challenges", recently presented at TENCON 2019.

[1] https://www.icir.org/floyd/papers/early.twocolumn.pdf

Authors:
Archit Pandey <architpandeynitk@gmail.com>
Mohit P Tahiliani <tahiliani@nitk.ac.in>
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-10-29 05:03:32 UTC
Thank you for the report and feature patch Archit/Mohit

If required, a patch against CURRENT would be appreciated as it will need to land in head first
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-10-29 05:09:02 UTC
Will also need to be added to altq(4) manual page
Comment 3 Archit Pandey 2019-10-29 06:29:35 UTC
Hello Kubilay Kocak,

Thanks for editing the bug as required.

> If required, a patch against CURRENT would be appreciated as it will need to 
> land in head first

I created the patch against FreeBSD git repository (https://github.com/freebsd/freebsd). I believe the git repo tracks CURRENT on its master. My bad for not mentioning in the initial comment.

> Will also need to be added to altq(4) manual page

I'll work on this and update the diff file. Thank you for pointing out!