dummynet patch

Luigi Rizzo rizzo at icir.org
Tue Sep 20 09:47:54 PDT 2005


On Tue, Sep 20, 2005 at 07:20:26PM +0300, vladone wrote:
> I know what is WF2Q, but still dont see what is the problem for wich
> dont't exist a possibility to limit bandwidth that is given to a
> queue, with queue settings.

it not implemented because there is an equivalently efficient
mechanism which is first pass packets through a shaper
and then to the WF2Q "queue".

say you want to select on src-ip:

	sysctl net.inet.ip.fw.one_pass=0

	// misc stuff that sends your traffic to rule 4500

(1)	ipfw add 4500 pipe 1 ip from any to any
	ipfw add 4501 queue 2 ip from any to any
	ipfw add 4502 allow ip from any to any

(2)	ipfw pipe 1 config bw 300kbit/s mask src-ip 0xffffffff
	ipfw queue 2 config weight 10 pipe 3 mask src-ip 0xffffffff
	ipfw pipe 3 config bw 1Mbit/s

and there you have 1mbit total, 300k max per flow.

if you think your proposed scheme (which saves lines 1 and 2
from the configuration, but part of line 2 must be folded back
into the next line) is more efficient, implement it and measure it.
My take is that it saves maybe 5-10us/packet on 500MHz class boxes.
To me, it is not worth the effort in terms of added code
complexity.

	cheers
	luigi


> And exist a precedent, "queue" paramater that exist for pipe and
> queue.
> For example, if a "bw" parameter is not used for queue, then bandwidth
> is given only acording with they weight, so use this option who want,
> like anothers parameters ("dst-ip, mask, queue, even weight").
> And my suggestion isn't a caprice.
> For example: if i have multiple users, that acces internet throught an
> freebsd gateway. How split bandwidth?
> I have two clear solutions:
> 1. assign for each host an pipe. But i dont know if in this mode, in
> conditions of heavy traffic, bandwidth is well splited. Is possibil
> for an user to take more bandwidth (according with his pipe), and
> another user remain without bandwidth.
> 2. share total bandwidth, to different hosts, with queue. This is more
> efficient but have a little problem. If an user is alone on traffic
> can get all bandwith. For this reason, i want (and i think many
> admins) an possibility to limit bandwidth that is given to a queue.
> 
> I don't think that passing packets to multiple pipe and queue is e
> efficiently for traffic flow.
> My sugestion about "bw" parameter for queue is only for convenience. U
> can named how you want, so i dont see problem about "... pipes and queues are two distinct objects which have
> different semantics."
> 
> _______________________________________________
> freebsd-ipfw at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe at freebsd.org"


More information about the freebsd-ipfw mailing list