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 7:48 PM, Patrick McHardy <kaber@xxxxxxxxx> wrote:
>> Changli Gao wrote:
>>
>> I'm interested in how this affects performance for the vast majority
>> of users, which process messages in order. A simple hash table looks
>> like a better choice here since we know the maximum number of entries
>> in advance and also could have the user specify the desired hash size.
>>
> 
> If there aren't much packets queued, the packet ids will be around 0,
> and idr isn't much slower.

Processing packets in order doesn't necessarily mean that there aren't
many packets queued. Its just that the current scheme is pretty much
optimal for this case since the verdict will always refer to the first
entry in the list.

>> You probably shouldn't be making the entry visible before the message
>> is successfully built and sent.
> 
> I wanted to keep the changeset small. But it seems wrong.
> 

--
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