[PATCH] netfilter: ipset: fix typo in hash size macro

RubenKelevra posted 1 patch 3 months, 2 weeks ago
include/linux/netfilter/ipset/ip_set_hash.h | 2 +-
net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
[PATCH] netfilter: ipset: fix typo in hash size macro
Posted by RubenKelevra 3 months, 2 weeks ago
Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in
ip_set_hash_gen.h, matching the header typo-fix.

Signed-off-by: RubenKelevra <rubenkelevra@gmail.com>
---
 include/linux/netfilter/ipset/ip_set_hash.h | 2 +-
 net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/netfilter/ipset/ip_set_hash.h b/include/linux/netfilter/ipset/ip_set_hash.h
index 838abab672af1..56e883661f857 100644
--- a/include/linux/netfilter/ipset/ip_set_hash.h
+++ b/include/linux/netfilter/ipset/ip_set_hash.h
@@ -6,7 +6,7 @@
 
 
 #define IPSET_DEFAULT_HASHSIZE		1024
-#define IPSET_MIMINAL_HASHSIZE		64
+#define IPSET_MINIMAL_HASHSIZE		64
 #define IPSET_DEFAULT_MAXELEM		65536
 #define IPSET_DEFAULT_PROBES		4
 #define IPSET_DEFAULT_RESIZE		100
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 5251524b96afa..785d109645fed 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
 
 	if (tb[IPSET_ATTR_HASHSIZE]) {
 		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
-		if (hashsize < IPSET_MIMINAL_HASHSIZE)
-			hashsize = IPSET_MIMINAL_HASHSIZE;
+		if (hashsize < IPSET_MINIMAL_HASHSIZE)
+			hashsize = IPSET_MINIMAL_HASHSIZE;
 	}
 
 	if (tb[IPSET_ATTR_MAXELEM])
-- 
2.49.0

Re: [PATCH] netfilter: ipset: fix typo in hash size macro
Posted by Jozsef Kadlecsik 3 months, 2 weeks ago
Hello,

On Fri, 20 Jun 2025, RubenKelevra wrote:

> Rename IPSET_MIMINAL_HASHSIZE → IPSET_MINIMAL_HASHSIZE in
> ip_set_hash_gen.h, matching the header typo-fix.
> 
> Signed-off-by: RubenKelevra <rubenkelevra@gmail.com>

Patch is applied in the ipset git tree, thank you.

Best regards,
Jozsef
> ---
>  include/linux/netfilter/ipset/ip_set_hash.h | 2 +-
>  net/netfilter/ipset/ip_set_hash_gen.h       | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/linux/netfilter/ipset/ip_set_hash.h b/include/linux/netfilter/ipset/ip_set_hash.h
> index 838abab672af1..56e883661f857 100644
> --- a/include/linux/netfilter/ipset/ip_set_hash.h
> +++ b/include/linux/netfilter/ipset/ip_set_hash.h
> @@ -6,7 +6,7 @@
>  
>  
>  #define IPSET_DEFAULT_HASHSIZE		1024
> -#define IPSET_MIMINAL_HASHSIZE		64
> +#define IPSET_MINIMAL_HASHSIZE		64
>  #define IPSET_DEFAULT_MAXELEM		65536
>  #define IPSET_DEFAULT_PROBES		4
>  #define IPSET_DEFAULT_RESIZE		100
> diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
> index 5251524b96afa..785d109645fed 100644
> --- a/net/netfilter/ipset/ip_set_hash_gen.h
> +++ b/net/netfilter/ipset/ip_set_hash_gen.h
> @@ -1543,8 +1543,8 @@ IPSET_TOKEN(HTYPE, _create)(struct net *net, struct ip_set *set,
>  
>  	if (tb[IPSET_ATTR_HASHSIZE]) {
>  		hashsize = ip_set_get_h32(tb[IPSET_ATTR_HASHSIZE]);
> -		if (hashsize < IPSET_MIMINAL_HASHSIZE)
> -			hashsize = IPSET_MIMINAL_HASHSIZE;
> +		if (hashsize < IPSET_MINIMAL_HASHSIZE)
> +			hashsize = IPSET_MINIMAL_HASHSIZE;
>  	}
>  
>  	if (tb[IPSET_ATTR_MAXELEM])
> -- 
> 2.49.0
> 
> 

-- 
E-mail : kadlec@netfilter.org, kadlec@blackhole.kfki.hu, kadlecsik.jozsef@wigner.hu
Address: Wigner Research Centre for Physics
         H-1525 Budapest 114, POB. 49, Hungary