Re: [PATCH] netfilter: use idr instead of list to speed up packet lookup by id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Changli Gao wrote:
> On Wed, Apr 7, 2010 at 10:16 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
>> You only know that during runtime, so this will get more complicated
>> than necessary. Why not simply use a hash table with a size specified
>> by userspace in the queue creation command?  The default behaviour
>> would be a size of 1, which is equivalent to the currently used single
>> list.
>>
> 
> We'd better not expose too many internal implementation details to
> userspace. If we do so, we can't change its implementation easily
> later. And letting user choose the size of hash table is much like the
> orginal epoll(2) design, there will be security consern, such as too
> much memory usage.

Userspace queueing is limited to root, so there's no concern about
memory usage. Regarding implementation details: alternatively add
a flag to specify out of order handling and size the hash table
based on the maximum number of queue entries.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux