Introduction
============
This file describes how to install the WRR scheduler on your system. 


Step A: Patching the kernel source
===================================
First you should patch the kernel with the file in the directory patch-linux
in this distribution. You should do this by switching to the directory of the
source code of the kernel and type somthing like:
 
   patch -p1 < wrr-linux-version.patch
   
You might also set PSCHED_CLOCK_SOURCE to an appropriate value in the file
include/net/pkt_sched.h. The value is described in the file tc/README.last 
included in the iproute2 package (see step C). If unsure it is worth trying 
to set it to PSCHED_CPU.



Step B: Configuring and compiling the kernel
============================================
Now go to the root of your kernel source and start your favorite way
of configuring the kernel. My favorite way is started by typing 
"make menuconfig".

You should the select the options

  "Prompt for development and/or incomplete code/drivers" (in "Code maturity level options")
  "Enable loadable module support"                        (in "Loadable module support section")
  "QoS and/or fair queuing"                               (in "Networking Options")
  "WRR packet scheduler"                                  (in "QoS and/or fair queuing")

Note that WRR must be compiled as a module!

Other things you probably want to enable is:

  "CBQ packet scheduler"            (in "QoS and/or fair queuing")
  "SFQ packet scheduler"            (in "QoS and/or fair queuing")
  "Packet classifier API"           (in "QoS and/or fair queuing")
  "U32 classifier"                  (in "QoS and/or fair queuing")
  "Bridging"                        (in Networking Options)
  "IP: advanced router"             (in Networking Options)
  "IP: policy routing"              (in Networking Options)
  
After this you should compile and install the kernel. This is all described in
detail in the Kernel HOWTO.


Step C: Patching the iproute2 package
=====================================
The iproute2 package contains a program called tc (Traffic Control) that 
is used to configure the Traffic Control functions of the Linux kernel. You 
need to patch this program in order to make it support the WRR scheduler. This 
is done in the following steps:

1) Get the source for the iproute2 package and unpack it. The main site of 
   this is:
    
     ftp://ftp.inr.ac.ru/ip-routing
     
2) Execute something like the following in the unpacked source code:

     patch -p1 < wrr-iproute2-2.2.4.patch

   Where the file wrr-iproute2-2.2.4.patch is included in this
   distribution.
   
3) Compile and install the tc program. You might also want to install the ip
   program, which is also created by this procedure.


Detroduction
============
The WRR scheduler should now be a part of your Linux system. See other 
documentation for information on how to set it up and use it.


--------------------------------------------------------------------
This document was written by Christian Worm Mortensen, cworm@it-c.dk
