1 |
vapier 11/12/02 22:24:36 |
2 |
|
3 |
Added: iproute2-3.1.0-mtu.patch |
4 |
Log: |
5 |
Version bump. |
6 |
|
7 |
(Portage version: 2.2.0_alpha75/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/iproute2/files/iproute2-3.1.0-mtu.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: iproute2-3.1.0-mtu.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/291907 |
18 |
|
19 |
This patch was merged from two patches extracted from this thread: |
20 |
http://markmail.org/thread/qkd76gpdgefpjlfn |
21 |
|
22 |
tc_stab.c: small fixes to commandline help |
23 |
|
24 |
|
25 |
tc_core.c: |
26 |
As kernel part of things relies on cell align which is always set to -1, |
27 |
I also added it to userspace computation stage. This way if someone |
28 |
specified e.g. 2048 and 512 for mtu and tsize respectively, one wouldn't |
29 |
end with tsize supporting mtu 4096 suddenly, New default mtu is also set |
30 |
to 2048 (disregarding weirdness of setting mtu to such values). |
31 |
|
32 |
|
33 |
Unless I missed something, this is harmless and feels cleaner, but if it's |
34 |
not allowed, documentation will have to be changed back to 2047 + extra |
35 |
explanation as well. |
36 |
|
37 |
--- iproute2/tc/tc_core.c |
38 |
+++ iproute2/tc/tc_core.c |
39 |
@@ -155,12 +155,12 @@ |
40 |
} |
41 |
|
42 |
if (s->mtu == 0) |
43 |
- s->mtu = 2047; |
44 |
+ s->mtu = 2048; |
45 |
if (s->tsize == 0) |
46 |
s->tsize = 512; |
47 |
|
48 |
s->cell_log = 0; |
49 |
- while ((s->mtu >> s->cell_log) > s->tsize - 1) |
50 |
+ while ((s->mtu - 1 >> s->cell_log) > s->tsize - 1) |
51 |
s->cell_log++; |
52 |
|
53 |
*stab = malloc(s->tsize * sizeof(__u16)); |
54 |
--- iproute2/tc/tc_stab.c |
55 |
+++ iproute2/tc/tc_stab.c |
56 |
@@ -32,7 +32,7 @@ |
57 |
fprintf(stderr, |
58 |
"Usage: ... stab [ mtu BYTES ] [ tsize SLOTS ] [ mpu BYTES ] \n" |
59 |
" [ overhead BYTES ] [ linklayer TYPE ] ...\n" |
60 |
- " mtu : max packet size we create rate map for {2047}\n" |
61 |
+ " mtu : max packet size we create size table for {2048}\n" |
62 |
" tsize : how many slots should size table have {512}\n" |
63 |
" mpu : minimum packet size used in rate computations\n" |
64 |
" overhead : per-packet size overhead used in rate computations\n" |