revert iproute2 to the old version until the new one is fixed (#3026)

SVN-Revision: 10744
This commit is contained in:
Felix Fietkau 2008-04-06 17:13:00 +00:00
parent 720acc785a
commit 88cb2e91d6
5 changed files with 1512 additions and 3005 deletions

View file

@ -9,14 +9,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=iproute2
PKG_VERSION:=2.6.23
PKG_VERSION:=2.6.20-070313
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://developer.osdl.org/dev/iproute2/download/
PKG_MD5SUM:=2e59da739ef19990408cf0a5cb0cae3e
PKG_MD5SUM:=7bc5883aadf740761fa2dd70b661e8cc
PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/iproute-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,9 @@
Index: iproute-2.6.20-070313/Config
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ iproute-2.6.20-070313/Config 2007-06-09 13:53:58.000000000 +0100
@@ -0,0 +1,4 @@
+# Fixed config to disable ATM support even if present on host system
+TC_CONFIG_ATM:=n
+TC_CONFIG_ACTION_GACT=y
+TC_CONFIG_ACTION_PROB=y

View file

@ -0,0 +1,98 @@
Index: iproute-2.6.20-070313/tc/q_htb.c
===================================================================
--- iproute-2.6.20-070313.orig/tc/q_htb.c 2007-06-09 13:53:57.000000000 +0100
+++ iproute-2.6.20-070313/tc/q_htb.c 2007-06-09 13:54:00.000000000 +0100
@@ -35,10 +35,14 @@
" default minor id of class to which unclassified packets are sent {0}\n"
" r2q DRR quantums are computed as rate in Bps/r2q {10}\n"
" debug string of 16 numbers each 0-3 {0}\n\n"
- "... class add ... htb rate R1 burst B1 [prio P] [slot S] [pslot PS]\n"
+ "... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]\n"
+ " [prio P] [slot S] [pslot PS]\n"
" [ceil R2] [cburst B2] [mtu MTU] [quantum Q]\n"
" rate rate allocated to this class (class can still borrow)\n"
" burst max bytes burst which can be accumulated during idle period {computed}\n"
+ " mpu minimum packet size used in rate computations\n"
+ " overhead per-packet size overhead used in rate computations\n"
+
" ceil definite upper class rate (no borrows) {rate}\n"
" cburst burst but for ceil {computed}\n"
" mtu max packet size we create rate map for {1600}\n"
@@ -103,7 +107,9 @@
struct tc_htb_opt opt;
__u32 rtab[256],ctab[256];
unsigned buffer=0,cbuffer=0;
- int cell_log=-1,ccell_log = -1,mtu;
+ int cell_log=-1,ccell_log = -1;
+ unsigned mtu, mpu;
+ unsigned char mpu8 = 0, overhead = 0;
struct rtattr *tail;
memset(&opt, 0, sizeof(opt)); mtu = 1600; /* eth packet len */
@@ -120,6 +126,16 @@
if (get_u32(&mtu, *argv, 10)) {
explain1("mtu"); return -1;
}
+ } else if (matches(*argv, "mpu") == 0) {
+ NEXT_ARG();
+ if (get_u8(&mpu8, *argv, 10)) {
+ explain1("mpu"); return -1;
+ }
+ } else if (matches(*argv, "overhead") == 0) {
+ NEXT_ARG();
+ if (get_u8(&overhead, *argv, 10)) {
+ explain1("overhead"); return -1;
+ }
} else if (matches(*argv, "quantum") == 0) {
NEXT_ARG();
if (get_u32(&opt.quantum, *argv, 10)) {
@@ -191,14 +207,18 @@
if (!buffer) buffer = opt.rate.rate / HZ + mtu;
if (!cbuffer) cbuffer = opt.ceil.rate / HZ + mtu;
- if ((cell_log = tc_calc_rtable(opt.rate.rate, rtab, cell_log, mtu, 0)) < 0) {
+/* encode overhead and mpu, 8 bits each, into lower 16 bits */
+ mpu = (unsigned)mpu8 | (unsigned)overhead << 8;
+ opt.ceil.mpu = mpu; opt.rate.mpu = mpu;
+
+ if ((cell_log = tc_calc_rtable(opt.rate.rate, rtab, cell_log, mtu, mpu)) < 0) {
fprintf(stderr, "htb: failed to calculate rate table.\n");
return -1;
}
opt.buffer = tc_calc_xmittime(opt.rate.rate, buffer);
opt.rate.cell_log = cell_log;
- if ((ccell_log = tc_calc_rtable(opt.ceil.rate, ctab, cell_log, mtu, 0)) < 0) {
+ if ((ccell_log = tc_calc_rtable(opt.ceil.rate, ctab, cell_log, mtu, mpu)) < 0) {
fprintf(stderr, "htb: failed to calculate ceil rate table.\n");
return -1;
}
@@ -222,6 +242,7 @@
double buffer,cbuffer;
SPRINT_BUF(b1);
SPRINT_BUF(b2);
+ SPRINT_BUF(b3);
if (opt == NULL)
return 0;
@@ -244,10 +265,16 @@
fprintf(f, "ceil %s ", sprint_rate(hopt->ceil.rate, b1));
cbuffer = ((double)hopt->ceil.rate*tc_core_tick2usec(hopt->cbuffer))/1000000;
if (show_details) {
- fprintf(f, "burst %s/%u mpu %s ", sprint_size(buffer, b1),
- 1<<hopt->rate.cell_log, sprint_size(hopt->rate.mpu, b2));
- fprintf(f, "cburst %s/%u mpu %s ", sprint_size(cbuffer, b1),
- 1<<hopt->ceil.cell_log, sprint_size(hopt->ceil.mpu, b2));
+ fprintf(f, "burst %s/%u mpu %s overhead %s ",
+ sprint_size(buffer, b1),
+ 1<<hopt->rate.cell_log,
+ sprint_size(hopt->rate.mpu&0xFF, b2),
+ sprint_size((hopt->rate.mpu>>8)&0xFF, b3));
+ fprintf(f, "cburst %s/%u mpu %s overhead %s ",
+ sprint_size(cbuffer, b1),
+ 1<<hopt->ceil.cell_log,
+ sprint_size(hopt->ceil.mpu&0xFF, b2),
+ sprint_size((hopt->ceil.mpu>>8)&0xFF, b3));
fprintf(f, "level %d ", (int)hopt->level);
} else {
fprintf(f, "burst %s ", sprint_size(buffer, b1));

View file

@ -1,12 +1,12 @@
diff -Naur iproute-2.6.20-070313.orig/include/linux/pkt_sched.h iproute-2.6.20-070313/include/linux/pkt_sched.h
--- iproute-2.6.20-070313.orig/include/linux/pkt_sched.h 2007-03-13 14:50:56.000000000 -0700
+++ iproute-2.6.20-070313/include/linux/pkt_sched.h 2007-06-09 11:32:22.000000000 -0700
@@ -146,8 +146,37 @@
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.
+ * If you need to play with these values use esfq instead.
*/
+/* ESFQ section */
@ -17,7 +17,6 @@ diff -Naur iproute-2.6.20-070313.orig/include/linux/pkt_sched.h iproute-2.6.20-0
+ TCA_SFQ_HASH_CLASSIC,
+ TCA_SFQ_HASH_DST,
+ TCA_SFQ_HASH_SRC,
+ TCA_SFQ_HASH_FWMARK,
+ /* conntrack */
+ TCA_SFQ_HASH_CTORIGDST,
+ TCA_SFQ_HASH_CTORIGSRC,
@ -35,14 +34,54 @@ diff -Naur iproute-2.6.20-070313.orig/include/linux/pkt_sched.h iproute-2.6.20-0
+ unsigned flows; /* Maximal number of flows */
+ unsigned hash_kind; /* Hash function to use for flow identification */
+};
+
+
+
/* RED section */
enum
diff -Naur iproute-2.6.20-070313.orig/tc/Makefile iproute-2.6.20-070313/tc/Makefile
--- iproute-2.6.20-070313.orig/tc/Makefile 2007-03-13 14:50:56.000000000 -0700
+++ iproute-2.6.20-070313/tc/Makefile 2007-06-09 00:39:44.000000000 -0700
@@ -7,6 +7,7 @@
@@ -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 @@
TCMODULES :=
TCMODULES += q_fifo.o
TCMODULES += q_sfq.o
@ -50,10 +89,10 @@ diff -Naur iproute-2.6.20-070313.orig/tc/Makefile iproute-2.6.20-070313/tc/Makef
TCMODULES += q_red.o
TCMODULES += q_prio.o
TCMODULES += q_tbf.o
diff -Naur iproute-2.6.20-070313.orig/tc/q_esfq.c iproute-2.6.20-070313/tc/q_esfq.c
--- iproute-2.6.20-070313.orig/tc/q_esfq.c 1969-12-31 16:00:00.000000000 -0800
+++ iproute-2.6.20-070313/tc/q_esfq.c 2007-06-09 11:38:59.000000000 -0700
@@ -0,0 +1,198 @@
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
@@ -0,0 +1,200 @@
+/*
+ * q_esfq.c ESFQ.
+ *
@ -88,7 +127,7 @@ diff -Naur iproute-2.6.20-070313.orig/tc/q_esfq.c iproute-2.6.20-070313/tc/q_esf
+{
+ 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 | ctorigdst | ctorigsrc | ctrepldst | ctreplsrc | ctnatchg}\n");
+ fprintf(stderr,"HASHTYPE := { classic | src | dst | ctorigdst | ctorigsrc | ctrepldst | ctreplsrc | ctnatchg }\n");
+}
+
+#define usage() return(-1)
@ -130,8 +169,8 @@ diff -Naur iproute-2.6.20-070313.orig/tc/q_esfq.c iproute-2.6.20-070313/tc/q_esf
+ 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);
@ -145,24 +184,29 @@ diff -Naur iproute-2.6.20-070313.orig/tc/q_esfq.c iproute-2.6.20-070313/tc/q_esf
+ ok++;
+ } else if (strcmp(*argv, "hash") == 0) {
+ NEXT_ARG();
+ if (strcmp(*argv, "classic") == 0) {
+ opt.hash_kind = TCA_SFQ_HASH_CLASSIC;
+ } else if (strcmp(*argv, "dst") == 0) {
+ opt.hash_kind = TCA_SFQ_HASH_DST;
+ } else if (strcmp(*argv, "src") == 0) {
+ opt.hash_kind = TCA_SFQ_HASH_SRC;
+ } else if (strcmp(*argv, "fwmark") == 0) {
+ opt.hash_kind = TCA_SFQ_HASH_FWMARK;
+ } 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 if (strcmp(*argv, "ctnatchg") == 0) {
+ opt.hash_kind = TCA_SFQ_HASH_CTNATCHG;
+ if(strcmp(*argv, "classic") == 0) {
+ opt.hash_kind= TCA_SFQ_HASH_CLASSIC;
+ } else
+ if(strcmp(*argv, "dst") == 0) {
+ opt.hash_kind= TCA_SFQ_HASH_DST;
+ } else
+ if(strcmp(*argv, "src") == 0) {
+ opt.hash_kind= TCA_SFQ_HASH_SRC;
+ } 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
+ if(strcmp(*argv, "ctnatchg") == 0) {
+ opt.hash_kind= TCA_SFQ_HASH_CTNATCHG;
+ } else {
+ fprintf(stderr, "Illegal \"hash\"\n");
+ explain();
@ -216,9 +260,6 @@ diff -Naur iproute-2.6.20-070313.orig/tc/q_esfq.c iproute-2.6.20-070313/tc/q_esf
+ case TCA_SFQ_HASH_SRC:
+ fprintf(f,"src");
+ break;
+ case TCA_SFQ_HASH_FWMARK:
+ fprintf(f,"fwmark");
+ break;
+ case TCA_SFQ_HASH_CTORIGSRC:
+ fprintf(f,"ctorigsrc");
+ break;