diff options
author | Jozsef Kadlecsik <kadlec@netfilter.org> | 2020-09-21 10:21:39 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@netfilter.org> | 2020-09-21 10:21:39 +0200 |
commit | de340a7f1a9cf21931d94ea8814545c4b2d172b0 (patch) | |
tree | 0a69eaed9d425a233d4213e3cb3e129d5d25796f /lib/args.c | |
parent | dfdbad53f9c5a7bc3f357b53f11a840c8fda3635 (diff) |
Add bucketsize parameter to all hash types
The parameter defines the upper limit in any hash bucket at adding new entries
from userspace - if the limit would be exceeded, ipset doubles the hash size
and rehashes. It means the set may consume more memory but gives faster
evaluation at matching in the set.
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
Diffstat (limited to 'lib/args.c')
-rw-r--r-- | lib/args.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -284,6 +284,14 @@ static const struct ipset_arg ipset_args[] = { .print = ipset_print_number, .help = "[skbqueue VALUE]", }, + [IPSET_ARG_BUCKETSIZE] = { + .name = { "bucketsize", NULL }, + .has_arg = IPSET_MANDATORY_ARG, + .opt = IPSET_OPT_BUCKETSIZE, + .parse = ipset_parse_uint8, + .print = ipset_print_number, + .help = "[bucketsize VALUE]", + }, }; const struct ipset_arg * |