]> git.pld-linux.org Git - packages/iproute2.git/blobdiff - esfq-iproute2.patch
- up to kernel 2.6.20
[packages/iproute2.git] / esfq-iproute2.patch
index ba7191ebc77753129eee591891f71df20b12ffd7..ba3312817ecbfd8aaee7c47e6d661cda8f882404 100644 (file)
@@ -1,6 +1,51 @@
---- iproute2.orig/tc/Makefile  Sun Apr 16 20:42:53 2000
-+++ iproute2/tc/Makefile       Tue May 14 23:04:10 2002
-@@ -5,6 +5,7 @@
+diff -Naur iproute2-2.6.19-061214.orig/include/linux/pkt_sched.h iproute2-2.6.19-061214/include/linux/pkt_sched.h
+--- iproute2-2.6.19-061214.orig/include/linux/pkt_sched.h      2006-12-14 15:04:12.000000000 -0800
++++ iproute2-2.6.19-061214/include/linux/pkt_sched.h   2007-02-13 23:18:29.000000000 -0800
+@@ -146,8 +146,40 @@
+  *
+  *    The only reason for this is efficiency, it is possible
+  *    to change these parameters in compile time.
++ *
++ *    If you need to play with these values use esfq instead.
+  */
++/* ESFQ section */
++
++enum
++{
++      /* traditional */
++      TCA_SFQ_HASH_CLASSIC,
++      TCA_SFQ_HASH_DST,
++      TCA_SFQ_HASH_SRC,
++      TCA_SFQ_HASH_FWMARK,
++      /* direct */
++      TCA_SFQ_HASH_DSTDIR,
++      TCA_SFQ_HASH_SRCDIR,
++      TCA_SFQ_HASH_FWMARKDIR,
++      /* conntrack */
++      TCA_SFQ_HASH_CTORIGDST,
++      TCA_SFQ_HASH_CTORIGSRC,
++      TCA_SFQ_HASH_CTREPLDST,
++      TCA_SFQ_HASH_CTREPLSRC,
++};
++
++struct tc_esfq_qopt
++{
++      unsigned        quantum;        /* Bytes per round allocated to flow */
++      int             perturb_period; /* Period of hash perturbation */
++      __u32           limit;          /* Maximal packets in queue */
++      unsigned        divisor;        /* Hash divisor  */
++      unsigned        flows;          /* Maximal number of flows  */
++      unsigned        hash_kind;      /* Hash function to use for flow identification */
++};
++
+ /* RED section */
+ enum
+diff -Naur iproute2-2.6.19-061214.orig/tc/Makefile iproute2-2.6.19-061214/tc/Makefile
+--- iproute2-2.6.19-061214.orig/tc/Makefile    2006-12-14 15:04:12.000000000 -0800
++++ iproute2-2.6.19-061214/tc/Makefile 2007-02-11 11:56:13.000000000 -0800
+@@ -7,6 +7,7 @@
  TCMODULES :=
  TCMODULES += q_fifo.o
  TCMODULES += q_sfq.o
@@ -8,9 +53,10 @@
  TCMODULES += q_red.o
  TCMODULES += q_prio.o
  TCMODULES += q_tbf.o
---- iproute2.orig/tc/q_esfq.c  1969-12-31 16:00:00.000000000 -0800
-+++ iproute2/tc/q_esfq.c       2005-10-21 18:28:44.000000000 -0700
-@@ -0,0 +1,192 @@
+diff -Naur iproute2-2.6.19-061214.orig/tc/q_esfq.c iproute2-2.6.19-061214/tc/q_esfq.c
+--- iproute2-2.6.19-061214.orig/tc/q_esfq.c    1969-12-31 16:00:00.000000000 -0800
++++ iproute2-2.6.19-061214/tc/q_esfq.c 2007-02-13 23:18:26.000000000 -0800
+@@ -0,0 +1,224 @@
 +/*
 + * q_esfq.c           ESFQ.
 + *
@@ -22,7 +68,9 @@
 + * Authors:   Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
 + *
 + * Changes:   Alexander Atanasov, <alex@ssi.bg>
-+ *            Added depth,limit,divisor,hash_kind options.
++ *            Alexander Clouter, <alex@digriz.org.uk>
++ *            Corey Hickey, <bugfood-c@fatooh.org>
++ *
 + */
 +
 +#include <stdio.h>
@@ -43,7 +91,7 @@
 +{
 +      fprintf(stderr, "Usage: ... esfq [ perturb SECS ] [ quantum BYTES ] [ depth FLOWS ]\n\t[ divisor HASHBITS ] [ limit PKTS ] [ hash HASHTYPE]\n");
 +      fprintf(stderr,"Where: \n");
-+      fprintf(stderr,"HASHTYPE := { classic | src | dst | fwmark | src_dir | dst_dir | fwmark_dir }\n");
++      fprintf(stderr,"HASHTYPE := { classic | src | dst | fwmark | src_dir | dst_dir | fwmark_dir | ctorigdst | ctorigsrc | ctrepldst | ctreplsrc}\n");
 +}
 +
 +#define usage() return(-1)
 +                              fprintf(stderr, "Illegal \"divisor\"\n");
 +                              return -1;
 +                      }
-+                      if(opt.divisor >= 15) {
-+                              fprintf(stderr, "Illegal \"divisor\" must be < 15\n");
++                      if(opt.divisor >= 14) {
++                              fprintf(stderr, "Illegal \"divisor\": must be < 14\n");
 +                              return -1;
 +                      }
 +                      opt.divisor=pow(2,opt.divisor);
 +                      } else
 +                      if(strcmp(*argv, "dst_direct") == 0) {
 +                              opt.hash_kind= TCA_SFQ_HASH_DSTDIR;
++                              fprintf(stderr, "Warning: \"dst_direct\" is deprecated\n"
++                                      "use \"dst\" instead\n");
 +                      } else
 +                      if(strcmp(*argv, "src_direct") == 0) {
 +                              opt.hash_kind= TCA_SFQ_HASH_SRCDIR;
++                              fprintf(stderr, "Warning: \"src_direct\" is deprecated\n"
++                                      "use \"src\" instead\n");
 +                      } else
 +                      if(strcmp(*argv, "fwmark_direct") == 0) {
 +                              opt.hash_kind= TCA_SFQ_HASH_FWMARKDIR;
++                              fprintf(stderr, "Warning: \"fwmark_direct\" is deprecated\n"
++                                      "use \"fwmark\" instead\n");
++                      } else
++                      if(strcmp(*argv, "ctorigsrc") == 0) {
++                              opt.hash_kind= TCA_SFQ_HASH_CTORIGSRC;
++                      } else
++                      if(strcmp(*argv, "ctorigdst") == 0) {
++                              opt.hash_kind= TCA_SFQ_HASH_CTORIGDST;
++                      } else
++                      if(strcmp(*argv, "ctreplsrc") == 0) {
++                              opt.hash_kind= TCA_SFQ_HASH_CTREPLSRC;
++                      } else
++                      if(strcmp(*argv, "ctrepldst") == 0) {
++                              opt.hash_kind= TCA_SFQ_HASH_CTREPLDST;
 +                      } else {
 +                              fprintf(stderr, "Illegal \"hash\"\n");
 +                              explain();
 +      case TCA_SFQ_HASH_FWMARKDIR:
 +              fprintf(f,"fwmark_direct");
 +              break;
++      case TCA_SFQ_HASH_CTORIGSRC:
++              fprintf(f,"ctorigsrc");
++              break;
++      case TCA_SFQ_HASH_CTORIGDST:
++              fprintf(f,"ctorigdst");
++              break;
++      case TCA_SFQ_HASH_CTREPLSRC:
++              fprintf(f,"ctreplsrc");
++              break;
++      case TCA_SFQ_HASH_CTREPLDST:
++              fprintf(f,"ctrepldst");
++              break;
 +      default:
 +              fprintf(f,"Unknown");
 +      }
This page took 0.034673 seconds and 4 git commands to generate.