Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 2014 03:41:44 +0800
From:      Bill Yuan <bycn82@gmail.com>
To:        Luigi Rizzo <rizzo@iet.unipi.it>
Cc:        Luigi Rizzo <luigi@freebsd.org>, "Alexander V. Chernikov" <melifaro@freebsd.org>, FreeBSD Net <net@freebsd.org>
Subject:   Re: [CFT]: ipfw named tables / different tabletypes
Message-ID:  <CAC%2BJH2yPH_m4TKUFxTXGKLskXavbxKT=DKScqqcZrFB=%2BjxnrA@mail.gmail.com>
In-Reply-To: <CA%2BhQ2%2BjWJdRqG2kiuFE4CimvHwgN5cV6PMeW1ochAgwnOFmemA@mail.gmail.com>
References:  <5379FE3C.6060501@FreeBSD.org> <20140521111002.GB62462@onelab2.iet.unipi.it> <CAC%2BJH2yQsjLePvFQC=XkSTF8oD1hCn2EZxAZRHKZSyt3HsYSxQ@mail.gmail.com> <CA%2BhQ2%2BjWJdRqG2kiuFE4CimvHwgN5cV6PMeW1ochAgwnOFmemA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 22, 2014 at 12:49 AM, Luigi Rizzo <rizzo@iet.unipi.it> wrote:

>
>
>
> On Wed, May 21, 2014 at 11:17 AM, Bill Yuan <bycn82@gmail.com> wrote:
>
>> 1. "each table can have it's own name", I like this idea. I am also
>> working on this kind of functions, But I am in different way. In my
>> opinion. the "name" or "type" of the table, all this are utility functio=
n
>> for the user. in the kernel space. I want to keep all the things the sam=
e
>> as before. and add a translate function in the user land commands, so th=
at
>> means we need to find a space to keep the mapping of the name<->id or
>> type<->id,
>>
>
> =E2=80=8Bthis does not work, you'd have another database to keep in sync
> and on which you have races with modifications to the ipfw config.
>
> cheers
> luigi
> =E2=80=8B
>
Hi Luigi,
Thanks for your reply.

That is my original idea of the implementation. I though it is good because
it can minimize the changes in existing code.

Yes, It requires to have another database to keep in sync, But it is
not necessary to mix a lot with the existing code in the userland. that
also means we dont need to make any changes in the existing code of the
kernel space.

e.g. if we support the table name in the command , it will be:
   >ipfw table 1 name sales
this type of commands to create/update the mapping databases
   >ipfw table sales add 1.2.3.4
   >ipfw table sales list
this type of commands need to call function "get_id_from_name()" and it is
in the userland command.

And if the mapping is "type-name-id" then that means it can be generic
purpose.
e.g.
tablename-sale-10    --> sale table is id 10
pipename-vip-20      --> vip pipe's id is 20



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAC%2BJH2yPH_m4TKUFxTXGKLskXavbxKT=DKScqqcZrFB=%2BjxnrA>