iproute2: update to 3.3.0, drop a few useless old patches, add codel support
[openwrt.git] / package / iproute2 / patches / 006-iproute2-tc_esfq.patch
index d034754..8016dbb 100644 (file)
@@ -1,87 +1,12 @@
-diff -urN --exclude=.svn iproute2-2.6.11-050330/include/linux/pkt_sched.h iproute2-2.6.11-050330/include/linux/pkt_sched.h
---- iproute2-2.6.11-050330/include/linux/pkt_sched.h   2007-05-04 22:21:48.000000000 -0400
-+++ iproute2-2.6.11-050330/include/linux/pkt_sched.h   2007-05-04 22:27:12.000000000 -0400
-@@ -174,8 +174,38 @@
-  *
-  *    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,
-+      /* conntrack */
-+      TCA_SFQ_HASH_CTORIGDST,
-+      TCA_SFQ_HASH_CTORIGSRC,
-+      TCA_SFQ_HASH_CTREPLDST,
-+      TCA_SFQ_HASH_CTREPLSRC,
-+      TCA_SFQ_HASH_CTNATCHG,
-+};
-+
-+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
-@@ -551,8 +580,37 @@
-  *
-  *    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,
-+      /* conntrack */
-+      TCA_SFQ_HASH_CTORIGDST,
-+      TCA_SFQ_HASH_CTORIGSRC,
-+      TCA_SFQ_HASH_CTREPLDST,
-+      TCA_SFQ_HASH_CTREPLSRC,
-+      TCA_SFQ_HASH_CTNATCHG,
-+};
-+
-+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 -urN --exclude=.svn iproute2-2.6.11-050330/tc/Makefile iproute2-2.6.11-050330/tc/Makefile
---- iproute2-2.6.11-050330/tc/Makefile 2007-05-04 22:21:48.000000000 -0400
-+++ iproute2-2.6.11-050330/tc/Makefile 2007-05-04 22:27:37.000000000 -0400
-@@ -6,6 +6,7 @@
+---
+ include/linux/pkt_sched.h |   59 +++++++++++++
+ tc/Makefile               |    1 
+ tc/q_esfq.c               |  200 ++++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 260 insertions(+)
+
+--- a/tc/Makefile
++++ b/tc/Makefile
+@@ -8,6 +8,7 @@ SHARED_LIBS ?= y
  TCMODULES :=
  TCMODULES += q_fifo.o
  TCMODULES += q_sfq.o
@@ -89,9 +14,8 @@ diff -urN --exclude=.svn iproute2-2.6.11-050330/tc/Makefile iproute2-2.6.11-0503
  TCMODULES += q_red.o
  TCMODULES += q_prio.o
  TCMODULES += q_tbf.o
-diff -urN --exclude=.svn iproute2-2.6.11-050330/tc/q_esfq.c iproute2-2.6.11-050330/tc/q_esfq.c
---- iproute2-2.6.11-050330/tc/q_esfq.c 1969-12-31 19:00:00.000000000 -0500
-+++ iproute2-2.6.11-050330/tc/q_esfq.c 2007-05-04 22:37:54.000000000 -0400
+--- /dev/null
++++ b/tc/q_esfq.c
 @@ -0,0 +1,200 @@
 +/*
 + * q_esfq.c           ESFQ.
@@ -114,7 +38,7 @@ diff -urN --exclude=.svn iproute2-2.6.11-050330/tc/q_esfq.c iproute2-2.6.11-0503
 +#include <unistd.h>
 +#include <syslog.h>
 +#include <fcntl.h>
-+#include <math.h> 
++#include <math.h>
 +#include <sys/socket.h>
 +#include <netinet/in.h>
 +#include <arpa/inet.h>
@@ -140,7 +64,7 @@ diff -urN --exclude=.svn iproute2-2.6.11-050330/tc/q_esfq.c iproute2-2.6.11-0503
 +      memset(&opt, 0, sizeof(opt));
 +
 +      opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
-+      
++
 +      while (argc > 0) {
 +              if (strcmp(*argv, "quantum") == 0) {
 +                      NEXT_ARG();
@@ -186,7 +110,7 @@ diff -urN --exclude=.svn iproute2-2.6.11-050330/tc/q_esfq.c iproute2-2.6.11-0503
 +                      NEXT_ARG();
 +                      if(strcmp(*argv, "classic") == 0) {
 +                              opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
-+                      } else 
++                      } else
 +                      if(strcmp(*argv, "dst") == 0) {
 +                              opt.hash_kind= TCA_SFQ_HASH_DST;
 +                      } else