Re: [PATCH v2 0/2] ipset: forceadd support

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

 



On 02/27/2014 09:41 PM, Phil Oester wrote:
On Thu, Feb 27, 2014 at 06:04:44PM -0500, Josh Hunt wrote:
Forceadd is a property for hash set types and is passed in duration creation.
When sets with this property enabled are full each subsequent 'add' operation
will attempt to evict a random entry from the set.

Wouldn't it be better to evict the oldest entry instead of a random one?

Phil

I was trying to introduce no extra overhead with this feature, in general and when we are doing adds to the set. I thought about doing what you're suggesting, but I would need to add something to track the oldest entry which may not be as trivial as it sounds given things like timeouts. In addition to that I'd still need to traverse the bucket to find this entry to evict. Given those two things I did not go down that path.

Thanks for reviewing!
Josh

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