1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 23:29:22 +02:00

[package] iproute2: update to v2.6.31 (#7354)

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21513 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2010-05-20 06:09:49 +00:00
parent fddbe85964
commit 3f65319585
7 changed files with 21 additions and 156 deletions

View File

@ -8,12 +8,14 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=iproute2 PKG_NAME:=iproute2
PKG_VERSION:=2.6.29-1 #PKG_VERSION:=2.6.29-1
PKG_VERSION:=2.6.31
PKG_RELEASE:=2 PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://devresources.linux-foundation.org/dev/iproute2/download/ PKG_SOURCE_URL:=http://devresources.linux-foundation.org/dev/iproute2/download/
PKG_MD5SUM:=c1bc258a6c345905e79935ac7a3cc582 #PKG_MD5SUM:=c1bc258a6c345905e79935ac7a3cc582
PKG_MD5SUM:=230f35282a95451622f3e8394f9cd80a
PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/iproute2-$(PKG_VERSION)

View File

@ -1,8 +1,8 @@
--- a/doc/ip-cref.tex --- a/doc/ip-cref.tex
+++ b/doc/ip-cref.tex +++ b/doc/ip-cref.tex
@@ -1324,6 +1324,19 @@ peers are allowed to send to us. @@ -1307,6 +1307,19 @@ peers are allowed to send to us.
If it is not given, Linux uses the value selected with \verb|sysctl| --- \threeonly the clamp for congestion window. It is ignored if the \verb|lock|
variable \verb|net/ipv4/tcp_reordering|. flag is not used.
+\item \verb|hoplimit NUMBER| +\item \verb|hoplimit NUMBER|
+ +
@ -18,11 +18,11 @@
+ window size. If it is not given (or set to zero), Linux uses the + window size. If it is not given (or set to zero), Linux uses the
+ values specified in~\cite{RFC2414}. + values specified in~\cite{RFC2414}.
\item \verb|advmss NUMBER|
\item \verb|nexthop NEXTHOP| @@ -2666,6 +2679,9 @@ http://www.cisco.com/univercd/cc/td/doc/
@@ -2653,6 +2666,9 @@ http://www.cisco.com/univercd/cc/td/doc/ \bibitem{RFC2414} M.~Allman, S.~Floyd, C.~Partridge.
\bibitem{RFC-DHCP} R.~Droms. ``Increasing TCP's Initial Window'', RFC-2414.
``Dynamic Host Configuration Protocol.'', RFC-2131
+\bibitem{RFC2414} M.~Allman, S.~Floyd, C.~Partridge. +\bibitem{RFC2414} M.~Allman, S.~Floyd, C.~Partridge.
+``Increasing TCP's Initial Window'', RFC-2414. +``Increasing TCP's Initial Window'', RFC-2414.
@ -592,51 +592,9 @@
+}; +};
+ +
#endif #endif
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -73,7 +73,7 @@ static void usage(void)
fprintf(stderr, " [ rtt TIME ] [ rttvar TIME ]\n");
fprintf(stderr, " [ window NUMBER] [ cwnd NUMBER ] [ initcwnd NUMBER ]\n");
fprintf(stderr, " [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\n");
- fprintf(stderr, " [ rto_min TIME ]\n");
+ fprintf(stderr, " [ rto_min TIME ] [ hoplimit NUMBER ]\n");
fprintf(stderr, "TYPE := [ unicast | local | broadcast | multicast | throw |\n");
fprintf(stderr, " unreachable | prohibit | blackhole | nat ]\n");
fprintf(stderr, "TABLE_ID := [ local | main | default | all | NUMBER ]\n");
@@ -792,6 +792,30 @@ int iproute_modify(int cmd, unsigned fla
invarg("\"reordering\" value is invalid\n", *argv);
rta_addattr32(mxrta, sizeof(mxbuf), RTAX_REORDERING, reord);
#endif
+#ifdef RTAX_HOPLIMIT
+ } else if (strcmp(*argv, "hoplimit") == 0) {
+ unsigned hoplim;
+ NEXT_ARG();
+ if (strcmp(*argv, "lock") == 0) {
+ mxlock |= (1<<RTAX_HOPLIMIT);
+ NEXT_ARG();
+ }
+ if (get_unsigned(&hoplim, *argv, 0))
+ invarg("\"hoplimit\" value is invalid\n", *argv);
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_HOPLIMIT, hoplim);
+#endif
+#ifdef RTAX_INITCWND
+ } else if (strcmp(*argv, "initcwnd") == 0) {
+ unsigned initcwnd;
+ NEXT_ARG();
+ if (strcmp(*argv, "lock") == 0) {
+ mxlock |= (1<<RTAX_HOPLIMIT);
+ NEXT_ARG();
+ }
+ if (get_unsigned(&initcwnd, *argv, 0))
+ invarg("\"initcwnd\" value is invalid\n", *argv);
+ rta_addattr32(mxrta, sizeof(mxbuf), RTAX_INITCWND, initcwnd);
+#endif
} else if (strcmp(*argv, "rtt") == 0) {
unsigned rtt;
NEXT_ARG();
--- a/ip/iptunnel.c --- a/ip/iptunnel.c
+++ b/ip/iptunnel.c +++ b/ip/iptunnel.c
@@ -134,7 +134,7 @@ static int parse_args(int argc, char **a @@ -129,7 +129,7 @@ static int parse_args(int argc, char **a
NEXT_ARG(); NEXT_ARG();
p->o_flags |= GRE_KEY; p->o_flags |= GRE_KEY;
if (strchr(*argv, '.')) if (strchr(*argv, '.'))
@ -647,7 +605,7 @@
fprintf(stderr, "invalid value of \"okey\"\n"); fprintf(stderr, "invalid value of \"okey\"\n");
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -49,7 +49,7 @@ install: all @@ -57,7 +57,7 @@ install: all
$(DESTDIR)$(DOCDIR)/examples $(DESTDIR)$(DOCDIR)/examples
install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \ install -m 0644 $(shell find examples/diffserv -maxdepth 1 -type f) \
$(DESTDIR)$(DOCDIR)/examples/diffserv $(DESTDIR)$(DOCDIR)/examples/diffserv
@ -656,7 +614,7 @@
install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR) install -m 0644 $(shell find etc/iproute2 -maxdepth 1 -type f) $(DESTDIR)$(CONFDIR)
install -m 0755 -d $(DESTDIR)$(MANDIR)/man8 install -m 0755 -d $(DESTDIR)$(MANDIR)/man8
install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8 install -m 0644 $(shell find man/man8 -maxdepth 1 -type f) $(DESTDIR)$(MANDIR)/man8
@@ -67,7 +67,7 @@ snapshot: @@ -75,7 +75,7 @@ snapshot:
clean: clean:
rm -f cscope.* rm -f cscope.*
@ -679,7 +637,7 @@
--- a/tc/Makefile --- a/tc/Makefile
+++ b/tc/Makefile +++ b/tc/Makefile
@@ -14,6 +14,7 @@ TCMODULES += q_cbq.o @@ -15,6 +15,7 @@ TCMODULES += q_cbq.o
TCMODULES += q_rr.o TCMODULES += q_rr.o
TCMODULES += q_multiq.o TCMODULES += q_multiq.o
TCMODULES += q_netem.o TCMODULES += q_netem.o

View File

@ -1,6 +1,6 @@
--- a/ip/ipxfrm.c --- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c +++ b/ip/ipxfrm.c
@@ -491,7 +491,6 @@ void xfrm_selector_print(struct xfrm_sel @@ -467,7 +467,6 @@ void xfrm_selector_print(struct xfrm_sel
switch (sel->proto) { switch (sel->proto) {
case IPPROTO_TCP: case IPPROTO_TCP:
case IPPROTO_UDP: case IPPROTO_UDP:
@ -8,7 +8,7 @@
case IPPROTO_DCCP: case IPPROTO_DCCP:
default: /* XXX */ default: /* XXX */
if (sel->sport_mask) if (sel->sport_mask)
@@ -1154,7 +1153,6 @@ static int xfrm_selector_upspec_parse(st @@ -1130,7 +1129,6 @@ static int xfrm_selector_upspec_parse(st
switch (sel->proto) { switch (sel->proto) {
case IPPROTO_TCP: case IPPROTO_TCP:
case IPPROTO_UDP: case IPPROTO_UDP:

View File

@ -1,96 +0,0 @@
--- a/tc/q_htb.c
+++ b/tc/q_htb.c
@@ -35,10 +35,14 @@ static void explain(void)
" 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 @@ static int htb_parse_class_opt(struct qd
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 @@ static int htb_parse_class_opt(struct qd
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 @@ static int htb_parse_class_opt(struct qd
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 @@ static int htb_print_opt(struct qdisc_ut
double buffer,cbuffer;
SPRINT_BUF(b1);
SPRINT_BUF(b2);
+ SPRINT_BUF(b3);
if (opt == NULL)
return 0;
@@ -244,10 +265,16 @@ static int htb_print_opt(struct qdisc_ut
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

@ -79,7 +79,7 @@
enum enum
--- a/tc/Makefile --- a/tc/Makefile
+++ b/tc/Makefile +++ b/tc/Makefile
@@ -7,6 +7,7 @@ include ../Config @@ -8,6 +8,7 @@ SHARED_LIBS ?= y
TCMODULES := TCMODULES :=
TCMODULES += q_fifo.o TCMODULES += q_fifo.o
TCMODULES += q_sfq.o TCMODULES += q_sfq.o

View File

@ -1,6 +1,6 @@
--- a/Makefile --- a/Makefile
+++ b/Makefile +++ b/Makefile
@@ -22,7 +22,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o @@ -29,7 +29,7 @@ ADDLIB+=ipx_ntop.o ipx_pton.o
CC = gcc CC = gcc
HOSTCC = gcc HOSTCC = gcc

View File

@ -1,6 +1,7 @@
--- a/lib/Makefile --- a/lib/Makefile
+++ b/lib/Makefile +++ b/lib/Makefile
@@ -1,3 +1,4 @@ @@ -1,4 +1,4 @@
-CFLAGS += -fPIC
+CFLAGS+=$(FPIC) +CFLAGS+=$(FPIC)
UTILOBJ=utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o UTILOBJ=utils.o rt_names.o ll_types.o ll_proto.o ll_addr.o inet_proto.o