Packets going through multiple queues

Luigi Rizzo rizzo at icir.org
Sun Aug 10 22:11:36 PDT 2003


On Sun, Aug 10, 2003 at 06:10:49PM +0200, jeremie le-hen wrote:
...
<example about using net.inet.ip.fw.one_pass=0>
...
> One tricky way to avoid the behavior would be to add "skipto" rules after
> each "queue" rules, with exactly the same rule body, but this clearly adds
> a great overhead. Furthermore, my real traffic prioritizing framework uses
> 6 queues and number of rules, and adding "skipto" rules as I described here
> is just a hard and time-wasting work.

it is not a great overhead -- it is just one extra rule to check per
packet, which is fast (there are direct pointers to the jump
target). As for the 'hard and time-wasting work'... you just have to
design your ruleset correctly.

Basically what you want is

	<foo>
	switch (<some field in the packet>) {
	case A:
		<aaa>
		break;
	case B:
		<bbb>
		break;
	...
	case Z:
		<zzz>
		break;
	}
	<bar>

where the blocks in <> are ipfw instructions. Once you have designed your
ruleset this way, it is really trivial to implement it in terms of
conditional and unconditional jumps.

	cheers
	luigi

> At this point, I wonder if I missed something in ipfw(8) syntax or if the
> latter is simply not enough powerful to achieve this easily.
> 
> Thanks for your advices.
> Regards,
> -- 
> Jeremie aka TtZ/TataZ
> jeremie.le-hen at epita.fr
> _______________________________________________
> 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