public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox•net>
To: Thomas Graf <tgraf@suug•ch>
Cc: Josh Hunt <johunt@akamai•com>,
	Pablo Neira Ayuso <pablo@netfilter•org>,
	Patrick McHardy <kaber@trash•net>,
	netfilter-devel@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: [PATCH 1/3] rhashtable: require max_shift definition
Date: Tue, 10 Feb 2015 09:30:03 +0100	[thread overview]
Message-ID: <54D9C18B.5090208@iogearbox.net> (raw)
In-Reply-To: <20150210005801.GA8951@casper.infradead.org>

On 02/10/2015 01:58 AM, Thomas Graf wrote:
> On 02/09/15 at 07:48pm, Josh Hunt wrote:
>>   	if ((params->key_len && !params->hashfn) ||
>> -	    (!params->key_len && !params->obj_hashfn))
>> +	    (!params->key_len && !params->obj_hashfn) ||
>> +	    (!params->max_shift))
>>   		return -EINVAL;
>
> You can drop the parenthesis around the new max_shift check.

Also, I think the test should be expanded to check if there's
a grow_decision given and only in that case require max_shift
to be non-zero, otherwise we would require users who don't
want to expand their table to give a upper expansion limit.

Thanks,
Daniel

  reply	other threads:[~2015-02-10  8:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10  0:48 [PATCH 0/3] nft hash set expansion fixes Josh Hunt
2015-02-10  0:48 ` [PATCH 1/3] rhashtable: require max_shift definition Josh Hunt
2015-02-10  0:58   ` Thomas Graf
2015-02-10  8:30     ` Daniel Borkmann [this message]
2015-02-10 15:56       ` Josh Hunt
2015-02-10 17:06         ` Daniel Borkmann
2015-02-10 17:22           ` Thomas Graf
2015-02-10 17:44             ` Patrick McHardy
2015-02-10 21:18               ` Josh Hunt
2015-02-10  0:48 ` [PATCH 2/3] nft_hash: define max_shift rhashtable param Josh Hunt
2015-02-10  0:48 ` [PATCH 3/3] nft_hash: introduce init_size set parameter Josh Hunt

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=54D9C18B.5090208@iogearbox.net \
    --to=daniel@iogearbox$(echo .)net \
    --cc=johunt@akamai$(echo .)com \
    --cc=kaber@trash$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    --cc=pablo@netfilter$(echo .)org \
    --cc=tgraf@suug$(echo .)ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox