From: Bourne Without <blackhole@airpost.net>
To: Josh Hunt <johunt@akamai.com>, kadlec@blackhole.kfki.hu
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 0/2] ipset: forceadd support
Date: Sat, 15 Feb 2014 16:07:45 +0100 [thread overview]
Message-ID: <52FF82C1.5010509@airpost.net> (raw)
In-Reply-To: <1391261452-11266-1-git-send-email-johunt@akamai.com>
On 01.02.2014 14:30, 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. The implementation tries to
> keep the overhead low by checking to see which bucket the new entry hashes to.
> If that bucket has any entries it will evict the first one and add the new
> entry.
>
> Ex usage:
> ipset create foo hash:ip forceadd
>
> The intended usecase is for things like 'ban' lists where you may not be concerned
> with possibly evicting something early, and more concerned with the size of
> the hash itself.
For all who want to save time typing while testing, I've already
implemented the forceadd support in the ipset-bash_completion code
available here:
As it's set to enable the feature from ipset v6.21+, you need to either
bump the ipset version, or just change line 886 in my code from:
if ((ips_version[0] == 6 && ips_version[1] >= 21)); then
to:
if ((ips_version[0] == 6 && ips_version[1] >= 20)); then
happy testing :)
next prev parent reply other threads:[~2014-02-15 15:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-01 13:30 [PATCH 0/2] ipset: forceadd support Josh Hunt
2014-02-01 13:30 ` [PATCH 1/2] ipset: add forceadd kernel support for hash set types Josh Hunt
2014-02-14 10:06 ` Jozsef Kadlecsik
2014-02-01 13:30 ` [PATCH 2/2] ipset: add forceadd userspace " Josh Hunt
2014-02-14 10:10 ` Jozsef Kadlecsik
2014-02-14 10:24 ` Jozsef Kadlecsik
2014-02-15 15:07 ` Bourne Without [this message]
2014-02-15 15:09 ` [PATCH 0/2] ipset: forceadd support Bourne Without
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52FF82C1.5010509@airpost.net \
--to=blackhole@airpost.net \
--cc=johunt@akamai.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.