Hello lartc, I have about 400Kbit/s link, and I need to divide it into 2 parts (for 2 computers). What I have done wrong? Correct please! tc qdisc add dev eth0 root handle 10: cbq bandwidth 400Kbit avpkt 1000 tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 400Kbit rate \ 400Kbit allot 1514 weight 40Kbit prio 8 maxburst 20 avpkt 1000 tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 400Kbit rate \ 100Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 400Kbit rate \ 300Kbit allot 1514 weight 30Kbit prio 5 maxburst 20 avpkt 1000 \ bounded tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15 tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15 tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst \ 10.0.0.2 flowid 10:200 tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 match ip dst \ 10.0.0.3 flowid 10:100 -- Best regards, Waters mailto:waters@inbox.lv
I was wondering if anybody can help me on this. I''m trying to apply Julian''s patches to Kernel 2.4.18 and they do not apply cleanly. I get the following: root@base:/usr/src/linux# patch -p1 -i routes-2.4.16-6.diff patching file include/net/ip_fib.h Hunk #1 FAILED at 162. 1 out of 2 hunks FAILED -- saving rejects to file include/net/ip_fib.h.rej patching file include/net/route.h Hunk #1 FAILED at 48. Hunk #2 FAILED at 122. Hunk #3 FAILED at 135. Hunk #4 FAILED at 162. 4 out of 4 hunks FAILED -- saving rejects to file include/net/route.h.rej patching file include/linux/netfilter_ipv4/ip_nat.h Hunk #1 FAILED at 124. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/netfilter_ipv4/ip_nat.h.rej patching file include/linux/rtnetlink.h Hunk #1 FAILED at 228. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/rtnetlink.h.rej patching file net/atm/clip.c Hunk #1 FAILED at 525. 1 out of 1 hunk FAILED -- saving rejects to file net/atm/clip.c.rej patching file net/ipv4/arp.c Hunk #1 FAILED at 316. Hunk #2 FAILED at 354. Hunk #3 FAILED at 751. Hunk #4 FAILED at 881. Hunk #5 FAILED at 964. 5 out of 5 hunks FAILED -- saving rejects to file net/ipv4/arp.c.rej patching file net/ipv4/fib_frontend.c Hunk #2 succeeded at 73 with fuzz 1. Hunk #3 FAILED at 212. Hunk #4 FAILED at 222. Hunk #5 FAILED at 244. Hunk #6 FAILED at 594. Hunk #7 FAILED at 626. 5 out of 7 hunks FAILED -- saving rejects to file net/ipv4/fib_frontend.c.rej patching file net/ipv4/fib_hash.c Hunk #1 FAILED at 71. Hunk #2 FAILED at 313. Hunk #3 FAILED at 427. Hunk #4 FAILED at 453. Hunk #5 FAILED at 622. 5 out of 5 hunks FAILED -- saving rejects to file net/ipv4/fib_hash.c.rej patching file net/ipv4/fib_rules.c Hunk #1 succeeded at 307 with fuzz 1. Hunk #2 FAILED at 377. 1 out of 2 hunks FAILED -- saving rejects to file net/ipv4/fib_rules.c.rej patching file net/ipv4/fib_semantics.c Hunk #1 FAILED at 148. Hunk #2 FAILED at 164. Hunk #3 FAILED at 378. Hunk #4 FAILED at 410. Hunk #5 FAILED at 598. Hunk #6 FAILED at 613. Hunk #7 FAILED at 892. Hunk #8 FAILED at 925. Hunk #9 FAILED at 977. Hunk #10 FAILED at 992. Hunk #11 FAILED at 1030. Hunk #12 FAILED at 1044. 12 out of 12 hunks FAILED -- saving rejects to file net/ipv4/fib_semantics.c.rej patching file net/ipv4/icmp.c Hunk #1 FAILED at 361. Hunk #2 FAILED at 478. Hunk #3 FAILED at 502. 3 out of 3 hunks FAILED -- saving rejects to file net/ipv4/icmp.c.rej patching file net/ipv4/igmp.c Hunk #1 FAILED at 207. Hunk #2 FAILED at 622. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv4/igmp.c.rej patching file net/ipv4/ipip.c Hunk #1 FAILED at 417. Hunk #2 FAILED at 427. Hunk #3 FAILED at 435. Hunk #4 FAILED at 560. Hunk #5 FAILED at 819. 5 out of 5 hunks FAILED -- saving rejects to file net/ipv4/ipip.c.rej patching file net/ipv4/ipmr.c Hunk #1 FAILED at 1145. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/ipmr.c.rej patching file net/ipv4/ip_gre.c Hunk #1 FAILED at 486. Hunk #2 FAILED at 496. Hunk #3 FAILED at 504. Hunk #4 FAILED at 747. Hunk #5 FAILED at 1102. Hunk #6 FAILED at 1173. 6 out of 6 hunks FAILED -- saving rejects to file net/ipv4/ip_gre.c.rej patching file net/ipv4/ip_input.c Hunk #1 FAILED at 317. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/ip_input.c.rej patching file net/ipv4/ip_nat_dumb.c Hunk #1 FAILED at 124. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/ip_nat_dumb.c.rej patching file net/ipv4/ip_options.c Hunk #1 FAILED at 597. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/ip_options.c.rej patching file net/ipv4/ip_output.c Hunk #1 FAILED at 368. Hunk #2 FAILED at 964. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv4/ip_output.c.rej patching file net/ipv4/netfilter/ip_fw_compat.c Hunk #1 FAILED at 141. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/netfilter/ip_fw_compat.c.rej patching file net/ipv4/netfilter/ip_fw_compat_masq.c Hunk #1 FAILED at 40. Hunk #2 FAILED at 67. Hunk #3 FAILED at 103. 3 out of 3 hunks FAILED -- saving rejects to file net/ipv4/netfilter/ip_fw_compat_masq.c.rej patching file net/ipv4/netfilter/ip_nat_core.c Hunk #1 FAILED at 206. Hunk #2 FAILED at 852. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv4/netfilter/ip_nat_core.c.rej patching file net/ipv4/netfilter/ip_nat_standalone.c Hunk #1 succeeded at 204 (offset -21 lines). Hunk #2 FAILED at 272. Hunk #3 FAILED at 297. 2 out of 3 hunks FAILED -- saving rejects to file net/ipv4/netfilter/ip_nat_standalone.c.rej patching file net/ipv4/netfilter/ipt_MASQUERADE.c Hunk #1 FAILED at 88. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/netfilter/ipt_MASQUERADE.c.rej patching file net/ipv4/netfilter/ipt_MIRROR.c Hunk #1 FAILED at 44. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/netfilter/ipt_MIRROR.c.rej patching file net/ipv4/netfilter/ipt_REJECT.c Hunk #1 FAILED at 130. Hunk #2 FAILED at 203. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv4/netfilter/ipt_REJECT.c.rej patching file net/ipv4/raw.c Hunk #1 FAILED at 408. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/raw.c.rej patching file net/ipv4/route.c Hunk #1 FAILED at 835. Hunk #2 FAILED at 1259. Hunk #3 FAILED at 1273. Hunk #4 FAILED at 1313. Hunk #5 FAILED at 1333. Hunk #6 FAILED at 1365. Hunk #7 FAILED at 1388. Hunk #8 FAILED at 1441. Hunk #9 FAILED at 1463. Hunk #10 FAILED at 1490. Hunk #11 FAILED at 1503. Hunk #12 FAILED at 1514. Hunk #13 FAILED at 1538. Hunk #14 FAILED at 1572. Hunk #15 FAILED at 1585. Hunk #16 FAILED at 1652. Hunk #17 FAILED at 1666. Hunk #18 FAILED at 1713. Hunk #19 FAILED at 1738. Hunk #20 FAILED at 1828. Hunk #21 FAILED at 1836. Hunk #22 FAILED at 1879. Hunk #23 FAILED at 1887. Hunk #24 FAILED at 1950. Hunk #25 FAILED at 2031. Hunk #26 FAILED at 2184. Hunk #27 FAILED at 2193. 27 out of 27 hunks FAILED -- saving rejects to file net/ipv4/route.c.rej patching file net/ipv4/syncookies.c Hunk #1 FAILED at 176. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/syncookies.c.rej patching file net/ipv4/tcp_ipv4.c Hunk #1 FAILED at 1154. Hunk #2 FAILED at 1782. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv4/tcp_ipv4.c.rej patching file net/ipv4/udp.c Hunk #1 FAILED at 517. 1 out of 1 hunk FAILED -- saving rejects to file net/ipv4/udp.c.rej patching file net/ipv6/sit.c Hunk #1 FAILED at 501. Hunk #2 FAILED at 773. 2 out of 2 hunks FAILED -- saving rejects to file net/ipv6/sit.c.rej Can anybody help me here please :) Thanks.
On Sunday 28 April 2002 03:08, Waters wrote:> Hello lartc, > > I have about 400Kbit/s link, and I need to divide it into 2 parts (for > 2 computers). What I have done wrong? Correct please!Bandwidth = NIC bandwidth = 10 or 100 mbit. The rest of the commands are ok. But you will have to remove the bounded option for class 10:100 and 10:200 if you want to them to be able to borrow unused bandwidth from each other. Stef> > tc qdisc add dev eth0 root handle 10: cbq bandwidth 400Kbit avpkt 1000 > > tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 400Kbit rate \ > 400Kbit allot 1514 weight 40Kbit prio 8 maxburst 20 avpkt 1000 > > tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 400Kbit rate > \ 100Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded > > tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 400Kbit rate > \ 300Kbit allot 1514 weight 30Kbit prio 5 maxburst 20 avpkt 1000 \ > bounded > > tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15 > tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15 > > tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst \ > 10.0.0.2 flowid 10:200 > > tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 match ip dst \ > 10.0.0.3 flowid 10:100-- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
Hello, On Sun, 28 Apr 2002 tslayer@phatchicks.com wrote:> I was wondering if anybody can help me on this. I''m trying to apply > Julian''s patches to Kernel 2.4.18 and they do not apply cleanly. I getMake sure that (1) you have a plain kernel from kernel.org or (2) you have downloaded the patch correctly.> Thanks.Regards -- Julian Anastasov <ja@ssi.bg>
I''ve the same problem with a plain 2.4.17 patched to 2.4.18-pre3 with FreeS/WAN 1.97 and ext3 patch. [root@fw linux]# patch -p1 < ../routes-2.4.16-6.diff patching file include/net/ip_fib.h patching file include/net/route.h patching file include/linux/netfilter_ipv4/ip_nat.h patching file include/linux/rtnetlink.h patching file net/atm/clip.c patching file net/ipv4/arp.c patching file net/ipv4/fib_frontend.c Hunk #6 succeeded at 590 (offset -4 lines). patching file net/ipv4/fib_hash.c Hunk #5 succeeded at 617 (offset -5 lines). patching file net/ipv4/fib_rules.c patching file net/ipv4/fib_semantics.c Hunk #7 succeeded at 888 (offset -4 lines). Hunk #9 succeeded at 973 (offset -4 lines). Hunk #11 succeeded at 1026 (offset -4 lines). patching file net/ipv4/icmp.c patching file net/ipv4/igmp.c patching file net/ipv4/ipip.c patching file net/ipv4/ipmr.c Hunk #1 succeeded at 1141 (offset -4 lines). patching file net/ipv4/ip_gre.c patching file net/ipv4/ip_input.c patching file net/ipv4/ip_nat_dumb.c patching file net/ipv4/ip_options.c patching file net/ipv4/ip_output.c patching file net/ipv4/netfilter/ip_fw_compat.c Hunk #1 succeeded at 151 (offset 10 lines). patching file net/ipv4/netfilter/ip_fw_compat_masq.c patching file net/ipv4/netfilter/ip_nat_core.c Hunk #2 succeeded at 864 (offset 12 lines). patching file net/ipv4/netfilter/ip_nat_standalone.c patching file net/ipv4/netfilter/ipt_MASQUERADE.c patching file net/ipv4/netfilter/ipt_MIRROR.c Hunk #1 succeeded at 49 (offset 5 lines). patching file net/ipv4/netfilter/ipt_REJECT.c patching file net/ipv4/raw.c patching file net/ipv4/route.c Hunk #26 succeeded at 2183 (offset -1 lines). patching file net/ipv4/syncookies.c patching file net/ipv4/tcp_ipv4.c Hunk #2 succeeded at 1785 (offset 3 lines). patching file net/ipv4/udp.c patching file net/ipv6/sit.c [root@fw linux]#> Hello, > > On Sun, 28 Apr 2002 tslayer@phatchicks.com wrote: > > > I was wondering if anybody can help me on this. I''m trying to apply > > Julian''s patches to Kernel 2.4.18 and they do not apply > cleanly. I get > > Make sure that (1) you have a plain kernel from kernel.org > or (2) you have downloaded the patch correctly. > > > Thanks. > > Regards >
Hello, On Mon, 29 Apr 2002, Carlo Borelli wrote:> I''ve the same problem with a plain 2.4.17 patched to 2.4.18-pre3 with > FreeS/WAN 1.97 and ext3 patch. > > [root@fw linux]# patch -p1 < ../routes-2.4.16-6.diff > patching file include/net/ip_fib.h > patching file include/net/route.h > patching file include/linux/netfilter_ipv4/ip_nat.h > patching file include/linux/rtnetlink.h > patching file net/atm/clip.c > patching file net/ipv4/arp.c > patching file net/ipv4/fib_frontend.c > Hunk #6 succeeded at 590 (offset -4 lines). > patching file net/ipv4/fib_hash.c > Hunk #5 succeeded at 617 (offset -5 lines). > patching file net/ipv4/fib_rules.c > patching file net/ipv4/fib_semantics.c > Hunk #7 succeeded at 888 (offset -4 lines). > Hunk #9 succeeded at 973 (offset -4 lines). > Hunk #11 succeeded at 1026 (offset -4 lines). > patching file net/ipv4/icmp.c > patching file net/ipv4/igmp.c > patching file net/ipv4/ipip.c > patching file net/ipv4/ipmr.c > Hunk #1 succeeded at 1141 (offset -4 lines). > patching file net/ipv4/ip_gre.c > patching file net/ipv4/ip_input.c > patching file net/ipv4/ip_nat_dumb.c > patching file net/ipv4/ip_options.c > patching file net/ipv4/ip_output.c > patching file net/ipv4/netfilter/ip_fw_compat.c > Hunk #1 succeeded at 151 (offset 10 lines). > patching file net/ipv4/netfilter/ip_fw_compat_masq.c > patching file net/ipv4/netfilter/ip_nat_core.c > Hunk #2 succeeded at 864 (offset 12 lines). > patching file net/ipv4/netfilter/ip_nat_standalone.c > patching file net/ipv4/netfilter/ipt_MASQUERADE.c > patching file net/ipv4/netfilter/ipt_MIRROR.c > Hunk #1 succeeded at 49 (offset 5 lines). > patching file net/ipv4/netfilter/ipt_REJECT.c > patching file net/ipv4/raw.c > patching file net/ipv4/route.c > Hunk #26 succeeded at 2183 (offset -1 lines). > patching file net/ipv4/syncookies.c > patching file net/ipv4/tcp_ipv4.c > Hunk #2 succeeded at 1785 (offset 3 lines). > patching file net/ipv4/udp.c > patching file net/ipv6/sit.c > [root@fw linux]#I don''t see problem. The problems come for pre5. Regards -- Julian Anastasov <ja@ssi.bg>