netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ipset: forceadd support
@ 2014-02-27 23:04 Josh Hunt
  2014-02-27 23:04 ` [PATCH v2 1/2] ipset: add forceadd kernel support for hash set types Josh Hunt
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Josh Hunt @ 2014-02-27 23:04 UTC (permalink / raw)
  To: netfilter-devel, kadlec; +Cc: Josh Hunt

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.

Since v1:

- Address Jozsef's comments in v1
- Remove forceadd attribute and corresponding code
- Utilize new create option flags field
- Bump LIBVERSION

Josh Hunt (2):
  ipset: add forceadd kernel support for hash set types
  ipset: add userspace support for forceadd

 Make_global.am                                     |    2 +-
 include/libipset/data.h                            |    4 +-
 kernel/include/linux/netfilter/ipset/ip_set.h      |    3 +
 kernel/include/uapi/linux/netfilter/ipset/ip_set.h |    3 +
 kernel/net/netfilter/ipset/ip_set_core.c           |    4 +
 kernel/net/netfilter/ipset/ip_set_hash_gen.h       |   14 ++
 kernel/net/netfilter/ipset/ip_set_hash_ip.c        |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_ipmark.c    |    2 +-
 kernel/net/netfilter/ipset/ip_set_hash_ipport.c    |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_ipportip.c  |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_ipportnet.c |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_net.c       |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_netiface.c  |    3 +-
 kernel/net/netfilter/ipset/ip_set_hash_netnet.c    |    2 +-
 kernel/net/netfilter/ipset/ip_set_hash_netport.c   |    3 +-
 .../net/netfilter/ipset/ip_set_hash_netportnet.c   |    3 +-
 lib/data.c                                         |    6 +
 lib/ipset_hash_ip.c                                |  123 ++++++++++++++
 lib/ipset_hash_ipmark.c                            |  142 ++++++++++++++++
 lib/ipset_hash_ipport.c                            |  147 +++++++++++++++++
 lib/ipset_hash_ipportip.c                          |  158 ++++++++++++++++++
 lib/ipset_hash_ipportnet.c                         |  169 ++++++++++++++++++++
 lib/ipset_hash_net.c                               |  119 ++++++++++++++
 lib/ipset_hash_netiface.c                          |  125 +++++++++++++++
 lib/ipset_hash_netnet.c                            |  125 +++++++++++++++
 lib/ipset_hash_netport.c                           |  132 +++++++++++++++
 lib/ipset_hash_netportnet.c                        |  149 +++++++++++++++++
 src/ipset.8                                        |    7 +
 28 files changed, 1448 insertions(+), 12 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-02-28 21:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-27 23:04 [PATCH v2 0/2] ipset: forceadd support Josh Hunt
2014-02-27 23:04 ` [PATCH v2 1/2] ipset: add forceadd kernel support for hash set types Josh Hunt
2014-02-28 21:29   ` Jozsef Kadlecsik
2014-02-27 23:04 ` [PATCH v2 2/2] ipset: add userspace support for forceadd Josh Hunt
2014-02-28  9:25   ` Pablo Neira Ayuso
2014-02-28 21:46   ` Jozsef Kadlecsik
2014-02-28 21:52     ` Josh Hunt
2014-02-28  3:41 ` [PATCH v2 0/2] ipset: forceadd support Phil Oester
2014-02-28 14:26   ` Josh Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).