Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2019 07:30:22 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>, Victor Gamov <vit@otcnet.ru>, freebsd-net@freebsd.org
Subject:   Re: finding optimal ipfw strategy
Message-ID:  <25f37482-80b7-3aea-2c67-20faedadf429@grosbein.net>
In-Reply-To: <270233d9-fcdb-fee9-2557-c2d1ec7bf9e6@yandex.ru>
References:  <f38b21a5-8f9f-4f60-4b27-c810f78cdc88@otcnet.ru> <4ff39c8f-341c-5d72-1b26-6558c57bff8d@grosbein.net> <270233d9-fcdb-fee9-2557-c2d1ec7bf9e6@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
26.08.2019 3:37, Andrey V. Elsukov wrote:

> On 24.08.2019 22:34, Eugene Grosbein wrote:
>> If you are concerned of performance, general rule applies: less checks, better performance.
>>
>> First, use 'out xmit' instead of 'out via'. They are semantically equal and this is micro-optimization
>> but it still saves extra check unneeded when combined with "out" keyword.
>>
>> Also, you should use old table numbers instead of new symbolic table names
>> when you have many rules checking for interface names and much traffic
>> because checks for numbered tables are slightly more efficient.
>> You may use symbolic names still at source level:
> 
> There isn't any old tables, all tables have symbolic names. Even when
> you are creating "table(1)", its name is converted into symbolic name.

Yes, and this code path is slightly more efficient. A bit.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25f37482-80b7-3aea-2c67-20faedadf429>