finding optimal ipfw strategy

Eugene Grosbein eugen at grosbein.net
Mon Aug 26 00:30:41 UTC 2019


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.




More information about the freebsd-net mailing list