Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 13:15:41 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        "Alexander V. Chernikov" <melifaro@yandex-team.ru>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, Luigi Rizzo <luigi@freebsd.org>, "Andrey V. Elsukov" <ae@freebsd.org>, freebsd-ipfw <freebsd-ipfw@freebsd.org>
Subject:   Re: [CFT] new tables for ipfw
Message-ID:  <CA%2BhQ2%2BgxVYmXb%2BHOw4qUm6tykmEvBRkrV0RhZsnC6B08FLKvdA@mail.gmail.com>
In-Reply-To: <53EC960A.1030603@yandex-team.ru>
References:  <53EBC687.9050503@yandex-team.ru> <CA%2BhQ2%2Bg=A_rLHCVpBqn0AtFLu_gNGtzbmXvc-7JhpLqPSWw44A@mail.gmail.com> <53EC880B.3020903@yandex-team.ru> <CA%2BhQ2%2BiPPhy47eN0=KaSYBaNMdObY20yko7dRY1MMuP_mfnmOQ@mail.gmail.com> <53EC960A.1030603@yandex-team.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 14, 2014 at 12:57 PM, Alexander V. Chernikov <
melifaro@yandex-team.ru> wrote:

>  On 14.08.2014 14:44, Luigi Rizzo wrote:
>
>
>
>
> On Thu, Aug 14, 2014 at 11:57 AM, Alexander V. Chernikov <
> melifaro@yandex-team.ru> wrote:
>
>>   On 14.08.2014 13:23, Luigi Rizzo wrote:
>>
>>
>>
>>
>> On Wed, Aug 13, 2014 at 10:11 PM, Alexander V. Chernikov <
>> melifaro@yandex-team.ru> wrote:
>>
>>> Hello list.
>>>
>>> I've been hacking ipfw for a while and It seems there is something read=
y
>>> to test/review in projects/ipfw branch.
>>>
>>
>>  =E2=80=8Bthis is a fantastic piece of work, thanks for doing it and for
>> integrating the feedback.
>>  =E2=80=8B
>> I have some detailed feedback that will send you privately,
>>  but just a curiosity:
>>
>>   =E2=80=8B...=E2=80=8B
>>>
>>> Some examples (see ipfw(8) manual page for the description):
>>>
>>>
>>> =E2=80=8B...
>>>
>>>
>>>   ipfw table mi_test create type cidr algo "cidr:hash masks=3D/30,/64"
>>>
>>
>>  =E2=80=8Bwhy do we need to specify mask lengths in the above=E2=80=8B ?
>>
>>  Well, since we're hashing IP we have to know mask to cut host bits in
>> advance.
>> (And the real reason is that I'm too lazy to implement hierarchical
>> matching (check /32, then /31, then /30) like how, for example,
>>
>
>  =E2=80=8Boh well for that we should use cidr:radix
>
>  Research results have never shown a strong superiority of
> hierarchical hash tables over good radix implementations,
>  and in those cases one usually adopts partial prefix
> expansion so you only have, say, masks that are a
>  multiple of 2..8 bits so you only need a small number of
> hash lookups.
>
> Definitely, especially for IPv6. So I was actually thinking about coverin=
g
> some special sparse cases (e.g. someone having a bunch of /32 and a bunch
> of /30 and that's all).
>
> Btw, since we're talking about "good radix implementation": what license
> does DXR have? :)
> Is it OK to merge it as another cidr implementation?
>

"cidr" is a very ugly name, i'd rather use "addr"

DXR has a =E2=80=8Bbsd license and of course it is possible to use it.
You should ask Marko Zec for his latest version of the code
(and probably make sure we have one copy of the code in the source tree).

Speaking of features, one thing that would be nice is the ability
for tables to reference the in-kernel tables (e.g. fibs, socket
lists, interface lists...), perhaps in readonly mode.
How complex do you think that would be ?

cheers
luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2BgxVYmXb%2BHOw4qUm6tykmEvBRkrV0RhZsnC6B08FLKvdA>