Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Aug 2006 15:27:17 +0200
From:      Ian FREISLICH <if@hetzner.co.za>
To:        Luigi Rizzo <rizzo@icir.org>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: ipfw performance and random musings. 
Message-ID:  <E1GGbiP-000DFG-1B@hetzner.co.za>
In-Reply-To: Message from Luigi Rizzo <rizzo@icir.org> of "Fri, 25 Aug 2006 04:52:07 MST." <20060825045207.A4746@xorpc.icir.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo wrote:
> i am basically ok with this except, as i said, that there is
> no point in replicating the interface name i.e. why re0-re5
> instead of just re0-5 ? you just open up to possible mistakes
> and the need for extra code to check what happens when the user
> types re2-de5 (by mistake or intentionally).

Ok, it's just syntactic sugar anyway which doesn't really affect
implimentation anyway.

So, to recap.  You will be fine with although I'm now leaning toward
"factor" in stead of "delta" but that will be a trivial change and
I'd like to change "@" to "indirect".

skipto @ via vlan2-264 base 100 delta 100

or as I'd prefer

skipto indirect via vlan2-264 base 100 factor 100

Only thing is that this slightly complicates displaying the rules
since the indirection is stored in the ipfw_insn_if structure so
at this time it's not known whether this is an indirection or not.

        /*
         * first print actions
         */
        for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule);
                        l > 0 ; l -= F_LEN(cmd), cmd += F_LEN(cmd)) {
                switch(cmd->opcode) {
...
                case O_SKIPTO:
                        PRINT_UINT_ARG("skipto ", cmd->arg1);
                        break;

I guess cmd->arg1 == 0 could be abused to flag this state.  Are you
happy with that?

Ian

--
Ian Freislich



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1GGbiP-000DFG-1B>